I have done something very stupid. I upgraded to Debian 9 and was having issues getting X to work. After tons of troubleshooting, I saw that one of my raid devices was showing as an invalid block size. I failed it from the array and removed it. I partitioned it and added it back into the raid array.
After a reboot, grub was unable to boot. I burned a Debian 9 live CD and booted into it. I wanted to run grub-install but it could not find a valid root (/). My raid array wasn't showing but all my hard drives were so I built the raid from the correct partitions. The Debian 9 rescue went on to write the changes to the partition table and started to install a new base system.
After that, I booted into the system and all my files are now gone. I've installed TestDisk and tried running it on each hard drive and on the /dev/md0 device but I cannot find my deleted files.
Because of how long TestDisk has taken, the resync of the raid 5 array has completed which I am now reading may have actually overwritten all my old data.
Is all hope lost? Are all my files gone? Any help is greatly appreciated!
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Recovering data from overwritten Raid 5 array?
- GarryRicketson
- Posts: 5644
- Joined: 2015-01-20 22:16
- Location: Durango, Mexico
Re: Recovering data from overwritten Raid 5 array?
Use the backup you made before starting to do this.
https://www.debian.org/releases/stable/ ... ng.en.html
https://www.debian.org/releases/stable/ ... ng.en.html
4.1.1. Back up any data or configuration information
Before upgrading your system, it is strongly recommended that you make a full backup, or at least back up any data or configuration information you can't afford to lose. The upgrade tools and process are quite reliable, but a hardware failure in the middle of an upgrade could result in a severely damaged system.
The main things you'll want to back up are the contents of /etc, /var/lib/dpkg, /var/lib/apt/extended_states and the output of dpkg --get-selections "*" (the quotes are important). If you use aptitude to manage packages on your system, you will also want to back up /var/lib/aptitude/pkgstates.
Re: Recovering data from overwritten Raid 5 array?
Unfortunately I did not make a backup. Like I said, I did something really stupid.
Re: Recovering data from overwritten Raid 5 array?
Step 1. Swipe-and-right-click your thread title
Step 2. Select "Search <search engine name> for 'Recovering data...'"
Step 3. Pray
Good luck.
Step 2. Select "Search <search engine name> for 'Recovering data...'"
Step 3. Pray
You did several somethings really stupid, starting with implementing RAID 5 simply because is sounded so l33t and kewl. The actual point of RAID is data protection, just like, y'know, backups.r_4_20 wrote:Unfortunately I did not make a backup. Like I said, I did something really stupid.
Good luck.
Re: Recovering data from overwritten Raid 5 array?
Hmm I've done a lot of searching on this problem already. That's why I decided finally to just post myself. I was hoping to get some new help. I'm going to try SystemRescueCD tonight. I've already tried a couple Linux Live CD's that are designed for data recovery. Fingers crossed.