User:Metalus

This page is a work in progress.

This howto aims to explain what to do in terms of partitioning after you have replaced a defective hard drive with a bigger drive, in a RAID 1 configuration. It is written for users with some experience as it does not get into details about RAID.

When a disk fails, RAID 1 protects your data, but eventually you want to replace the broken drive, and most likely, you end up buying a drive larger than the original.

Suppose you start with a setup like the following:



You have two identical 160G, and they are partitioned in an identical manner. You have placed the boot volume in one partition, and the / (root) volume occupies the rest of the disk.

Eventually, one of the drives will fail, and you will replace it with a bigger one, like so:



The question becomes, is there a way to partition this new drive now to allow for the growing of the / (root) volume to 319G in the future, so when the other 160G fails, the / (root) volume can grow to a full 319G, as show here:



The answer is that the first replacement drive (the 320G one) must be partitioned exactly like the original remaining drive (the 160G one). It is only when the smaller of the two is replaced that the 320G can be fully utilized. When that time comes, we need to:


 * 1) boot with a rescue disk
 * 2) grow the /dev/sda3 partition to fill all the space on the 320G drive
 * 3) use resize_reiserfs to grow /dev/sda3 on the 320G drive to occupy all the space on the device (resize_reiserfs must be done on an unmounted file system)
 * 4) partition the 500G drive identically to the 320G drive (leaving the excess unpartitioned)
 * 5) reboot
 * 6) add the 500G drive to the RAID

This page is a work in progress.

Notes: change the pictures to show the file systems (boot is ext2, / is reiserfs)

Does LVM make any of this simpler?