mail at robertoragusa.it
Mon Jul 19 12:09:04 UTC 2010
Konstantin Svist wrote:
> so I sized it down a bit:
> # mdadm --grow -z 293033472 --backup-file=/root/grow_md0_size.bak /dev/md0
And there is your error.
You resized the device without first resizing the fileystem.
The filesystem is *in* the device.
So if you want to enlarge, you enlarge the device and then the filesystem.
If you want to shrink, you shrink the filesystem and then the device.
You basically destroyed a few random blocks from the end of the filesystem.
I don't know how serious the damage is. fsck will tell you.
It is also impossible to undo the error because you have reshaped the RAID
after the shrinking, so the "lost" blocks are not easily reincludeable
(with an opposite --grow, I mean).
The small number of missing blocks and their position at the end of the disk
give you a reasonable confidence that you will save your data.
I'm not sure if it is better to run an fsck and pray or it is better
to reenlarge the device with some zeroed blocks to avoid the "read beyond
partition size" condition (I personally would think about linearly concatenation
of your RAID with another small zeroed partition (or file) just to exceed the
size of the "contained" filesystem).
Roberto Ragusa mail at robertoragusa.it
More information about the users