I added two new devices two my software RAID 1 system. They are recognized by mdadm but I can't use the addition space.
Here is how I proceed:
- I added the two new disk to my PC and created on each an ext4 partition
- I added the partitions as hotspare to the RAID 1
mdadm /dev/md0 --add /dev/sdX1 mdadm /dev/md0 --add /dev/sdY1
- then I grow the raid with backup file
mdadm --grow --raid-devices=4 /dev/md0 --backup-file=/tmp/md0.bak
- and try to extend the disk after a disk check
fsck.ext4 -f /dev/md0 resize2fs /dev/md0
resize2fs returns:The filesystem is already * blocks long. Nothing to do!
What went wrong here?
Here some more system details:
uname -a Linux server 3.8.0-44-generic #66~precise1-Ubuntu SMP Tue Jul 15 04:01:04 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux mdadm --detail /dev/md0 /dev/md0: Version : 1.2 Creation Time : Wed Oct 16 11:50:14 2013 Raid Level : raid1 Array Size : 2930134016 (2794.39 GiB 3000.46 GB) Used Dev Size : 2930134016 (2794.39 GiB 3000.46 GB) Raid Devices : 4 Total Devices : 4 Persistence : Superblock is persistent Update Time : Tue May 12 17:55:36 2015 State : clean Active Devices : 4 Working Devices : 4 Failed Devices : 0 Spare Devices : 0 Name : server:md0 UUID : 4993aaa0:cc999f7a:c3f6e0fb:1a23bbb7 Events : 755 Number Major Minor RaidDevice State 0 8 65 0 active sync /dev/sde1 1 8 81 1 active sync /dev/sdf1 3 8 17 2 active sync /dev/sdX1 2 8 1 3 active sync /dev/sdY1 cat /etc/mdadm/mdadm.conf [...] ARRAY /dev/md/md0 level=raid1 num-devices=4 metadata=1.2 name=server:md0 UUID=4993aaa0:cc999f7a:c3f6e0fb:1a23bbb7 devices=/dev/sde1,/dev/sdf1,/dev/sdX1,/dev/sdY1