
Hi Bob, On Fri, Jul 19, 2019 at 10:10:46AM +1000, bob via luv-main wrote:
the RAID filing system. I have tried ddrescue which I have been able to use to copy data from the main partition on the damaged disk onto an old ntfs disk I had lying around but it is still unreadable as the raid filesystem refuses to mount and I still can't see the files.
firstly, my sympathies. raid recoveries are not fun :-/ there's some stuff here, but it looks quite synology specific https://serverfault.com/questions/568166/how-to-recover-an-mdadm-array-on-sy... if you are treating this as a generic linux recovery instead (probably safer IMHO) then yup, ddrescue is the right way to go. hopefully ddrescue didn't report many issues getting data off the drive? first check that the ddrescue image is vaguely ok with eg. file ddrescue.img losetup -P -r /dev/loop0 ddrescue.img to see what it looks like read-only. after that I would not touch the real disk again, or the orig ddrescue image either. make a copy of a the ddrescue image you have, and experiment with loopback mounts on that. losetup -d /dev/loop0 cp ddrescue.img play.img losetup -P /dev/loop0 play.img and then see if you can force mdadm to accept eg. /dev/loop0p2 in degraded mode. mdadm --examine .. I don't know the exact recipe for this that'd work off the top of my head, but it shouldn't be too hard. if something does wrong then you can always start again with another cp from ddrescue.img. you could do quick raid experiments with small loopback filesystems and mdadm too. another hint is that if the filesystem you store the images on supports sparse files then you can likely save some space with cp --sparse=always instead of cp. cheers, robin