Issue on Red Hat Linux 5.
Due to some miscommunication two LUNs in our environment were enlarged from 1.2 TB to 1.7 TB.
Now, after a reboot, mdadm does not find the superblocks to build the array again.
The common format — known as version 0.90 — has a superblock that is
4K long and is written into a 64K aligned block that starts at least
64K and less than 128K from the end of the device (i.e. to get the
address of the superblock round the size of the device down to a
multiple of 64K and then subtract 64K).
I found some old documentation:
# mdadm -D /dev/md0
/dev/md0:
Version : 0.90
Creation Time : Tue Jul 10 17:45:00 2012
Raid Level : raid1
Array Size : 1289748416 (1230.00 GiB 1320.70 GB)
Used Dev Size : 1289748416 (1230.00 GiB 1320.70 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Wed Apr 17 15:03:50 2013
State : active
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
UUID : 2799bd51:67eb54d2:1fcd3c90:293311a1
Events : 0.39
Number Major Minor RaidDevice State
0 253 10 0 active sync /dev/dm-10
1 253 11 1 active sync /dev/dm-11
# fdisk -l /dev/dm-10 /dev/dm-11
Disk /dev/dm-10: 1320.7 GB, 1320702443520 bytes
255 heads, 63 sectors/track, 160566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/dm-10 doesn't contain a valid partition table
Disk /dev/dm-11: 1320.7 GB, 1320702443520 bytes
255 heads, 63 sectors/track, 160566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/dm-11 doesn't contain a valid partition table
Best Answer
Reverting the devices to their original size should just restore the RAID device.
You can confirm that by doing:
mdadm
should now find the superblock if the size is correct. Then you can resize your disks back to that size (-r
above is for read-only, so it won't do any harm).If you actually do want to enlarge the md0 array and keep the 0.9 metadata, one thing you could do is:
Once again,
should display the raid device.
Assemble the array on those mapper devices:
And then resize the devices to the full extent:
Then, you can use
--grow
to use that extra space:Wait for the extra space to be resynced, stop the array, cleanup the extra dm devices and reassemble on the original devices:
You can use loop devices to do tests beforehand to verify the procedure. Here's a screen capture of what I did to verify that it worked: