Recovering data from a noob mistake?

  • Hello everyone,


    I'm not sure if I'm in the right section but I think i've made a big mistake.


    So I wanted to edit my config.xml so i tried "cp config.xml /dev/md0/" to copy it on the root of my first RAID 1.


    Now my RAID is inaccessible and resyncing. Did i f*ck this RAID and lost all of my data?

  • You may try to disconnect one raid HD and see if it comes up, if not, try the other. If nothing comes up... bad luck. If one disk works, repartition the bad one, add it bavk and try to sync the array. However I guess you just might be lucky if you write to /dev/sda or /dev sdb but if you write to /dev/md0 you're lost.

  • cp config.xml /dev/md0


    How large is config.xml? If you know this you know the amount of data you've overwritten at the beginning of the md0 device. Now use some Google-Fu to explore how mdraid organizes it's data on the used disks, maybe it's as easy as rewriting RAID superblocks or whatever magic is involved (no idea, I don't use mdraid and especially not the close to useless RAID-1 mode)


    That having said and since you seem to miss your data what about thinking about backup the next time (instead of availability -- RAID is just that, a naïve try to provide data availability in case a disk dies, it's useless wrt everything else especially attempts like data protection)

  • Thank you for your passive-aggressive response... Fortunately, I have a backup of this RAID1. I just wanted to know if I could recover these data without using my backup.


    Have fun jerking off your wide knowledge. Nice representation of this community...

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!