Linux Mastering Development

How to compare RAID mirror elements?

I’ve got a RAID mirror (md1) with three devices (sdc, sdd, sdf). Something went wrong overnight, the array went readonly, and fsck found thousands of inodes with inline_data_fl set and/or on the orphaned inode list.

I’ve stopped the array with mdadm --manage /dev/md1 --stop, and am running smartctl -t long on each device.

I presume there’s a reasonable chance that, when smartctl finished, the devices will differ and thus the array won’t reassemble. Is there a standard(?) way of diff’ing three filesystems? And/or doing some sort of automated best-of-three error correction?

I’m running Debian Stable, and have on-disk and off-site backups. I also have a vague plan of shifting to ZFS, to avoid exactly this scenario …

Leave a Reply

Your email address will not be published. Required fields are marked *