So I got the gist of swapping out smaller hard drivers for bigger ones in an MDADM RAID5:
Fail and remove one drive.
mdadm -f /dev/md0 /dev/sdd1 mdadm -r /dev/md0 /dev/sdd1
Shutdown, swap the hard drive, partition and add back to array
mdadm --add /dev/md0 /dev/sdd1
Wait for resync and continue with all the remaining drives.
Finally grow the array
mdadm --grow /dev/md0 --size=max
My question is how do you partition the new bigger drives? I see different instructions around the net and I know most of them are outdated so I wanted to see if anyone has done it recently.
Partition the new drives to be the same size as the old drives in the array
Partition the new drives to be the maximum size of the drive.
I have a really simple setup, 4 drives RAID5 350GB each. I only have one partition on each drive and build a single array. This is a data archive disk so no need for multiple arrays or partitions.
The other approach I am thinking is backup to one drive, build a 3 drive array, add the backup drive to the array. That is:
- Remove one drive (350GB)
- Add a new drive (1TB)
- Backup all my data into the new drive (my raid data will fit in a new drive)
- Take out the remaining 3 (350GB) old drives
- Put in the rest of the 3 (1TB) new drives
- Build a 3 drive array
- Copy the data to the array from the 1st new drive
- Wipe the backup disk and add to the array to make it 4 drives.
Is this safer? Faster? Thoughts?