Hi roy. Thank you for your time. Now, I'm doing a photorec on /dev/sda and /dev/sdd and I get better results on (some) of the data recovered if I do it on top of /dev/md0. I don't care anymore about recovering the filesystem, I just want to maximize the quality of data recovered with photorec. Best regards, Jorge Roy Sigurd Karlsbakk <roy@xxxxxxxxxxxxx> escreveu no dia terça, 5/04/2022 à(s) 10:17: > > I re-did these tests this morning, since I was unsure if I could have made some mistake last night - I was tired. There results were about the same - complete data loss. > > As for curiousity, I also tried to skip the expand phase after creating the initial raid5 on top of the raid1. After creating it, I stopped it and recreated the old raid1 with --assume-clean. This worked well - no errors from mount or fsck. > > So I guess it was the mdadm --grow --raid-devices=4 that was the final nail in the coffin. > > I just hope you find a way to backup your files next time. I'm quite sure we've all been there - thought we were smart enough or something and the shit hit the fan and no - we weren't. > > Vennlig hilsen > > roy > -- > Roy Sigurd Karlsbakk > (+47) 98013356 > http://blogg.karlsbakk.net/ > GPG Public key: http://karlsbakk.net/roysigurdkarlsbakk.pubkey.txt > -- > Hið góða skaltu í stein höggva, hið illa í snjó rita. > > ----- Original Message ----- > > From: "Roy Sigurd Karlsbakk" <roy@xxxxxxxxxxxxx> > > To: "Jorge Nunes" <jorgebnunes@xxxxxxxxx> > > Cc: "Linux Raid" <linux-raid@xxxxxxxxxxxxxxx> > > Sent: Tuesday, 5 April, 2022 02:29:03 > > Subject: Re: RAID 1 to RAID 5 failure > > >> Didn't do a backup :-( > > > > First mistake… *Always* keep a backup (or three) > > > >> > >> Unmount everything: > > > > No need - what you should have done, was just to grow the array by > > > > Partition the new drives exactly like the old ones > > mdadm --add /dev/md0 /dev/sd[cd]1 # note that sd[cd] means sdc and sdd, but can > > be written this way on the commandline > > mdadm --grow --level=5 --raid-devices=4 > > > > This would have grown and converted the array to raid5 without any data loss. > > > >> $ sudo mdadm --create /dev/md0 -a yes -l 5 -n 2 /dev/sda /dev/sdd > > > > As earlier mentioned, this is to create a new array, not a conversion. > > > >> So, my question is: Is there a chance to redo the array correctly > >> without losing the information inside? Is it possible to recover the > >> 'lost' partition that existed on RAID 1 to be able to do a convenient > >> backup? Or the only chance is to have a correct disk alignment inside > >> the array to be able to use photorec to recover the files correctly? > > > > As mentioned, it doesn't look promising, but there are a few things that can be > > tried. > > > > Your data may still reside on the sda1 and sdd1, but since it was converted to > > RAID-5, the data would have been distributed among the two drives and not being > > the same on both. Further growing the raid, would move the data around to the > > other disks. I did a small test here on some vdisks to see if this could be > > reversed somehow and see if I could find the original filesystem. I could - but > > it was terribly corrupted, so not a single file remained. > > > > If this was valuable data, there might be a way to rescue them, but I fear a lot > > is overwritten already. Others in here (or other places) may know more about > > how to fix this, though. If you find out how, please tell. It'd be interesting > > to learn :) > > > > PS: I have my personal notebook for technical stuff at > > https://wiki.karlsbakk.net/index.php/Roy's_notes in case you might find that > > interesting. There's quite a bit about storage there. Simply growing a raid is > > apparently forgotten, since I thought that was too simple. I'll add it. > > > > So hope you didn't lose too much valuable data > > > > Vennlig hilsen / Best regards > > > > roy > > -- > > Roy Sigurd Karlsbakk > > (+47) 98013356 > > -- > > I all pedagogikk er det essensielt at pensum presenteres intelligibelt. Det er > > et elementært imperativ for alle pedagoger å unngå eksessiv anvendelse av > > idiomer med xenotyp etymologi. I de fleste tilfeller eksisterer adekvate og > > relevante synonymer på norsk.