1

I had a disk failure on my dedicated server with 1and1. They have sent me this guide.

http://help.1and1.co.uk/servers-c40665/dedicated-server-linux-c40577/rescue-and-recovery-c40581/rebuild-the-software-raid-array-after-a-drive-replacement-a729756.html

It means very little to me but after reading it and looking at my output it looks like some of the work might be done.

For instance, there is no (F) after my drives.

rescue:/# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [faulty]
md1 : active raid1 sda1[0]
      4194240 blocks [2/1] [U_]

md3 : active raid1 sda3[1]
      970470016 blocks [2/1] [_U]

unused devices: <none>

fdisk show this:

rescue:/# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc05267b6

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048     8390655     4194304   fd  Linux raid autodetect
/dev/sda2         8390656    12584959     2097152   82  Linux swap / Solaris
/dev/sda3        12584960  1953525167   970470104   fd  Linux raid autodetect

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x55555555

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/md3: 993.8 GB, 993761296384 bytes
2 heads, 4 sectors/track, 242617504 cylinders, total 1940940032 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md3 doesn't contain a valid partition table

Disk /dev/md1: 4294 MB, 4294901760 bytes
2 heads, 4 sectors/track, 1048560 cylinders, total 8388480 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md1 doesn't contain a valid partition table

Disk /dev/mapper/vg00-usr: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders, total 8388608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/vg00-usr doesn't contain a valid partition table

Disk /dev/mapper/vg00-var: 859.0 GB, 858993459200 bytes
255 heads, 63 sectors/track, 104433 cylinders, total 1677721600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/vg00-var doesn't contain a valid partition table

Disk /dev/mapper/vg00-home: 6442 MB, 6442450944 bytes
255 heads, 63 sectors/track, 783 cylinders, total 12582912 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/vg00-home doesn't contain a valid partition table
rescue:/# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [faulty]
md1 : active raid1 sda1[0]
      4194240 blocks [2/1] [U_]

md3 : active raid1 sda3[1]
      970470016 blocks [2/1] [_U]

unused devices: <none>

So I am looking at step 9 abd cat /etc/mdadm.conf doesn't contain what I expect or is this written once you do step 7?

Copy the same partition structure from the good drive (sda) to the blank drive (sdb). The command below may potentially wipe the good drive if used incorrectly. Make sure the first drive specified is the functional drive and the second drive specified is the blank drive.

How do I know which is the good drive and which is blank drive?

Also, if it would be easier I would pay an expert to look at it for me.

Thanks.

1 Answer 1

0

You need to partition /dev/sdb to have a similar partition table to /dev/sda, then you need to insert the relevant partitions into the relevant arrays (mdadm -a /dev/md1 /dev/sdb1 ; mdadm -a /dev/md2 /dev/sdb3).

I'm not entirely sure what /dev/sdb2 is for; it seems that swap is unRAIDed. In that case you might want to consider adding /dev/sdb2 as a second swap partition; this may already have been done, but without seeing your /etc/fstab it's not possible to be definite. If you want to do that you'll need to set that partition up for swapping with mkswap /dev/sdb2.

Finally, if you want the new second drive to be bootable in the absence of /dev/sda you'll need to set the bootable flag on /dev/sdb1 (I don't quite understand why it's not set on /dev/sda1) and install grub on sdb's MBR (man grub-install).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .