Growing My RAID
Friday, May 23rd, 2008The New Disk
Disk /dev/sdd: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x638212f6
Device Boot Start End Blocks Id System
/dev/sdd1 1 30401 244196001 fd Linux raid autodetect
The Old Disk(s)
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sda1 1 30401 244196001 fd Linux raid autodetect
They Match!
Time to add the new drive
mdadm --add /dev/md0 /dev/sdd1
mdadm: added /dev/sdd1
Now to grow the array
mdadm --grow /dev/md0 --raid-devices=4
mdadm: Need to backup 768K of critical section..
mdadm: ... critical section passed.
The growing/reshaping took 9 hours.
Time to check the integrity of the filesystem
fsck -f /dev/md0
fsck 1.40.8 (13-Mar-2008)
e2fsck 1.40.8 (13-Mar-2008)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
RAID: 96834/61063168 files (31.4% non-contiguous), 104634355/122097920 blocks
Now to resize the filesystem
resize2fs /dev/md0
resize2fs 1.40.8 (13-Mar-2008)
Resizing the filesystem on /dev/md0 to 183146880 (4k) blocks.
The filesystem on /dev/md0 is now 183146880 blocks long.
Whoohoo!
