Koozali.org: home of the SME Server

Help please - Replacement of failed drive with larger capacity

Offline ntblade

  • *
  • 252
  • +0/-0
Hi all,
I have a server that had two 750GB SATA drives in RAID1.  One of the drives was kicked out of the array and the server was running with a degraded array.  I obtained 2 x 2TB replacement drives, and removed the faulty drive from the array:
Code: [Select]
mdadm --remove /dev/md1 /dev/sda1I then shut the server down, installed the new drive and rebooted.  Whe I go to the console and select "Manage disk redundancy" I see this:
Code: [Select]
Personalities : [raid1]
md3 : active raid1 sdd1[1] sdc1[0]
      732571904 blocks [2/2] [UU]

md2 : active raid1 sdb2[1]
      244091520 blocks [2/1] [_U]

md1 : active raid1 sdb1[1]
      104320 blocks [2/1] [_U]
And a message saying manual intervention is required.  (MD3 is another two drives mounted for backuppc)

Now, the trouble is, http://wiki.contribs.org/Raid#Upgrading_the_Hard_Drive_Size implies that the steps I have done so far are correct but I cannot add the new drive to the existing array using the console.

Do I have to manually format it and add it?

Can anyone help please?

Thanks,

NTB
8o)

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Help please - Replacement of failed drive with larger capacity
« Reply #1 on: June 20, 2011, 08:42:15 PM »
And a message saying manual intervention is required.  (MD3 is another two drives mounted for backuppc)

Remove those two drives and try again.

Or manually partition your new drive and manually add the partitions into the existing degraded arrays.

Your choice.

Offline ntblade

  • *
  • 252
  • +0/-0
Re: Help please - Replacement of failed drive with larger capacity
« Reply #2 on: June 20, 2011, 09:57:21 PM »
Hi Charlie, many thanks for the reply.

I formated the first partition of the drive so the tables look like:
Code: [Select]
Disk /dev/sda: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   fd  Linux raid autodetect

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          13      104391   fd  Linux raid autodetect
/dev/sdb2              14       30401   244091610   fd  Linux raid autodetect

Then added to the array:
Code: [Select]
mdadm --add /dev/md1 /dev/sda1
Which sync'd up in no time.  (only 100M I suppose)  but now I don't know how to partition the rest of the drive.  Should I create the next partition to be the same size as the old drive or should I maximise the space before adding to the array?

Thanks again,

N

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Help please - Replacement of failed drive with larger capacity
« Reply #3 on: June 21, 2011, 12:53:03 AM »
Should I create the next partition to be the same size as the old drive or should I maximise the space before adding to the array?

Either should be OK, but maximising the space might be better in the long run (you have the possibility to later resize the array).

Offline ntblade

  • *
  • 252
  • +0/-0
Re: Help please - Replacement of failed drive with larger capacity
« Reply #4 on: June 21, 2011, 09:34:20 AM »
Hmmm...
Code: [Select]
[root@stinky ~]# fdisk -l /dev/sda

Disk /dev/sda: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   fd  Linux raid autodetect
/dev/sda2              14      243201  1953407610   fd  Linux raid autodetect

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

If I try to add /dev/sda2 to the array:
Code: [Select]
[root@stinky ~]# mdadm -a /dev/md2 /dev/sda2
mdadm: cannot find /dev/sda2: No such file or directory

So, looks like I need to reboot.  Do I need to do anything with GRUB before I reboot since /dev/md1 (/boot) has sync'd?

Thanks,

Norrie

Offline ntblade

  • *
  • 252
  • +0/-0
Re: Help please - Replacement of failed drive with larger capacity
« Reply #5 on: July 13, 2011, 12:25:04 PM »
Hi

Upon rebooting the machine I had to change the boot order in the machine's BIOS so that the second drive was the first bootable one.

What do I have to do with GRUB (I presume) to allow booting please?

NTB