Nicolas Kovacs
2018-Dec-04 22:01 UTC
[CentOS] Accidentally nuked my system - any suggestions ?
Hi, My workstation is running CentOS 7 on two disks (sda and sdb) in a software RAID 1 setup. It looks like I accidentally nuked it. I wanted to write an installation ISO file to a USB disk, and instead of typing dd if=install.iso of=/dev/sdc I typed /dev/sdb. As soon as I hit <Enter>, the screen froze. I tried a hard reset, but of course, the boot process would stop short very early in the process. Now, I have backups of the important stuff of course, so no real catastrophe. But it would be nice if I could get back the data from my disk directly. I booted a rescue disk (Slax 9.6.4) and I can see my disks as well as raid arrays /dev/md125, /dev/md126 and /dev/md127. Oh, my partitioning scheme is manual and quite simple. Everything is RAID 1, I have a /boot array on /dev/sda1 + /dev/sdb1, swap on /dev/sda2 + /dev/sdb2 and / on /dev/sda3 + /dev/sdb3. I tried to mount /dev/sda3 directly from the rescue disk: # mount /dev/sda3 /mnt But I only get this: mount: unknown filesystem type 'linux_raid_member' I'd be very grateful for suggestions. Cheers, Niki -- Microlinux - Solutions informatiques durables 7, place de l'?glise - 30730 Montpezat Site : https://www.microlinux.fr Blog : https://blog.microlinux.fr Mail : info at microlinux.fr T?l. : 04 66 63 10 32
Gordon Messmer
2018-Dec-04 22:10 UTC
[CentOS] Accidentally nuked my system - any suggestions ?
On 12/4/18 2:01 PM, Nicolas Kovacs wrote:> I tried a hard reset, but of course, the boot process would stop short > very early in the process.The system should boot normally if you disconnect sdb.? Have you tried that?
Nicolas Kovacs wrote:> > My workstation is running CentOS 7 on two disks (sda and sdb) in a > software RAID 1 setup. > > It looks like I accidentally nuked it. I wanted to write an installation > ISO file to a USB disk, and instead of typing dd if=install.iso > of=/dev/sdc I typed /dev/sdb. As soon as I hit <Enter>, the screen froze. > > I tried a hard reset, but of course, the boot process would stop short > very early in the process. > > Now, I have backups of the important stuff of course, so no real > catastrophe. But it would be nice if I could get back the data from my disk > directly. > > I booted a rescue disk (Slax 9.6.4) and I can see my disks as well as > raid arrays /dev/md125, /dev/md126 and /dev/md127. Oh, my partitioning > scheme is manual and quite simple. Everything is RAID 1, I have a /boot > array on /dev/sda1 + /dev/sdb1, swap on /dev/sda2 + /dev/sdb2 and / on > /dev/sda3 + /dev/sdb3. > > > I tried to mount /dev/sda3 directly from the rescue disk: > > > # mount /dev/sda3 /mnt > > > But I only get this: > > > mount: unknown filesystem type 'linux_raid_member' > > > I'd be very grateful for suggestions. >Condolences. I think how I'd go about it would be to boot off a rescue disk, then either try to mount the raid, or just edit the /etc/mdadm.conf, and tell it only sda, and maybe sdb marked as failed. Then see if you can mount the raid. mark
Gordon Messmer wrote:> On 12/4/18 2:01 PM, Nicolas Kovacs wrote: > >> I tried a hard reset, but of course, the boot process would stop short >> very early in the process. > > The system should boot normally if you disconnect sdb.? Have you tried > that?Duh! thanks, Gordon, a simpler answer than mine, with the same effect, that /dev/sdb failed as far as mdadm was concerned. mark
Nicolas Kovacs
2018-Dec-04 22:31 UTC
[CentOS] Accidentally nuked my system - any suggestions ?
Le 04/12/2018 ? 23:10, Gordon Messmer a ?crit :> The system should boot normally if you disconnect sdb. Have you > tried that?Unfortunately that didn't work. The boot process stops here: [OK] Reached target Basic System. Now what ? -- Microlinux - Solutions informatiques durables 7, place de l'?glise - 30730 Montpezat Site : https://www.microlinux.fr Blog : https://blog.microlinux.fr Mail : info at microlinux.fr T?l. : 04 66 63 10 32
Nicolas Kovacs
2018-Dec-04 22:50 UTC
[CentOS] Accidentally nuked my system - any suggestions ?
Le 04/12/2018 ? 23:12, mark a ?crit :> I think how I'd go about it would be to boot off a rescue disk, then > either try to mount the raid, or just edit the /etc/mdadm.conf, and > tell it only sda, and maybe sdb marked as failed. Then see if you can > mount the raid.OK, I got a partial success that's not so bad. The bad news is that the system won't boot even if I unplug sdb. The good news is I'm currently retrieving my data. Once I booted a Slax Live CD with only sda connected, I couldn't mount it since it's a RAID member. So here's what I did. # mdadm -Ss # mdadm -A -R /dev/md9 /dev/sda3 # mount /dev/md9 /mnt A peek in /mnt, seems like everything's still there. So I'm currently transferring 300 GB of data to my server. A word on backups. I have all the vital stuff on my server, with daily snapshots using Rsnapshot. But all the audio and video stuff is excluded, not to mention all my settings in Firefox, Thunderbird, etc. Anyway: thanks very much for your help, guys. Cheers, Niki -- Microlinux - Solutions informatiques durables 7, place de l'?glise - 30730 Montpezat Site : https://www.microlinux.fr Blog : https://blog.microlinux.fr Mail : info at microlinux.fr T?l. : 04 66 63 10 32
Reasonably Related Threads
- Accidentally nuked my system - any suggestions ?
- Accidentally nuked my system - any suggestions ?
- Accidentally nuked my system - any suggestions ?
- Accidentally nuked my system - any suggestions ?
- CentOS 7: software RAID 5 array with 4 disks and no spares?