I have a partition /dev/sdb2 formatted as fd and that is mounted as /var. I need to make this partition ready to raid 1 ( for this example /dev/md1 ). I still don't have the second HD, but want to prepare it in a way that when the HD arrives, it's just a matter of plugging and adding to raid array.
As this partition is my /var, i rebooted system with a live cd and tried to create with the following command:
mdadm --create /dev/md1 --level=1 --raid-disks=2 /dev/sdc2 missing
It complains about this being a part on an array, but i accept and md1 is created. Them i use:
mdadm --examine --scan >> /mnt/sdc1/etc/mdadm.conf
To copy mdadm information to the / hd. Also, i change fstab, to use /dev/md1.
The issue is that when i reboot, i get an error because of differences between physical and filesystem size. The full error is:
The filesystem size (according to the superblock is 52428127 blocks The physical size of the device is 52428096 blocks Either the superblock or the partition table is likely to be corrupt! Abort(y)?
Any ideas of what causes this?
After that, the only way to get the system back is rebooting again to live cd, and running this on partition:
mdadm --zero-superblock /dev/sdc2
Thanks.