I’ve running Ubuntu 11.04 (kernel 2.6.38-11). I replaced 2x160GB with 2x500GB drives. They are configured as RAID1.
The partition tables show the right sizes. Here’s sfdisk:
But I’m not seeing the new space:
I tried mdadm and resize2fs:
Added per request
Comment via email:
I regularly use mdadm and consider it one of the most dangerous Linux utilities. However, if you employ the correct safety precautions you can avoid most cases of potential data loss Backup all your data!!! i have been bitten twice by mdadm in the past, lost over 700GB of data and very very little of it was able to be recovered, you have been warned.
There is a very good chance you will need to create the RAID array again as mdadm does not expect or compensate for drives suddenly increasing in size. It will use the size stated in the raid superblock and not the drive itself. Provided that the drives are already synced, you shouldn’t have many problems.
Remember if you want to boot of it use superblock version 0.9.
This is how i would do it, untested!
Create a RAID1 with a missing dive just so we can quickly test that the data remains while still having another drive with a copy of the data, your old metadata was 0.90 so we will keep the same version here.
Mount it to test that everything works
check your data
If it all looks ok then unmount the drive and resize.
Once that is all ok you can add the other drive to the array.
and wait for the drives to resync
Then you’ll be able to use
To let file system match the raid size. All of that is done online without even unmounting the md2.
From looking at /proc/partitions, it’s apparent that linux thinks sda3 and sdb3 are smaller than they are.
Sum the sizes of the partitions
and you’ll get a number much lower than the size of the disk.
152248005 blocks of 1024 bytes is consistent with the size
Did you initially create these partitions with a smaller size, then later recreate them to utilize the rest of the disks? If so, rebooting should allow the kernel to re-read the partition table. After that, growing the RAID device and resizing the filesystem should work.