Robbinsweb lives…again


Yeah, ok, so I know I already wrote about this, but the ole’ boy died again. This time I lost a drive. For once in my life i was glad I had mirrored drives on a home server. The down time was rather epic considering my complete lack of motivation to rebuild it, and its difficult to find an 80 GB drive any more. For the interested here are the steps I followed to restore the array:

1) Install the drive in place of the dead drive (like I needed to tell you that)

2) Boot the degraded array and go start up fdisk indicating the new drive (something to the effect of ‘fdisk /dev/sdb’) The reason I used fdisk rather than the far sexier cfdisk, is that cfdisk was having fits about the drive having an incorrect block count or something that made no sense on a new drive. Fdisk handled it perfectly.

3) Partition the drive EXACTLY like the current drive (size, order on disk, etc.)

4) Add the partitions back into the array one by one. So if you have three partitions in the array, say root, swap and home as sdb1, sdb2, and sdb3 respectively, add them into the array like this:

mdadm –add /dev/md0 /dev/sdb1
mdadm –add /dev/md1 /dev/sdb2
mdadm –add /dev/md2 /dev/sdb3

That is assuming your array partitions line up to your disk partitions that way.. Then you can watch the rsync updating the partitions by doing a ‘cat /proc/mdstat’

, ,

Comments are closed.