2

I had a RAID1 setup (md0), mirroring two 2TB drives (sdb, sdc). When trying to remove the RAID to use the disks individually with the data on them, I ran

mdadm --stop /dev/md0
mdadm --zero-superblock /dev/sdb1
mdadm --zero-superblock /dev/sdc1
mdadm --remove /dev/md0

However, afterwards, if I want to mount /dev/sdb1, I get the following: "wrong fs type, bad option, bad superblock on /dev/sdb, missing codepage or helper program, or other error".

On my attempts to recreate the ext4 file system, I think I already nuked sdc beyond recovery (I ran mkfs.ext4 /dev/sdc1).

Is there still hope for me to recover my data from sdb and if so how?

fra-san
  • 10,205
  • 2
  • 22
  • 43
gro
  • 29
  • Very carefully make a backup of the corrupted drive. Please excercise Extreme Caution: dd if=/dev/sdb of=/dev/blankdrive Then you can play around with trying to recover the journal structure, partition tables, etc. – jmunsch Nov 03 '18 at 16:16
  • Good call, I have it backed up and hope that someone can point me to a potential way of recovery. Thanks! – gro Nov 03 '18 at 17:23
  • what's the output of mdadm --examine /dev/sdb1 ? also see: https://unix.stackexchange.com/a/72285/61110 – jmunsch Nov 03 '18 at 17:29
  • mdadm: No md superblock detected on /dev/sdb1. EDIT: And guessing the offset didn't work :p – gro Nov 03 '18 at 17:33
  • aha! I did mdadm --examine /dev/sdb (the whole disk instead of the partition) and this gave me /dev/sdb: MBR Magic : aa55 Partition[0] : 3907026944 sectors at 2048 (type 83) – gro Nov 04 '18 at 13:04
  • and fdisk -l gives me Device: /dev/sdb1; Start: 2048; End: 3907028991; Sectors: 3907026944; Size: 1,8T; Id 83; Type: Linux – gro Nov 04 '18 at 13:13
  • Oh hey that's great! Maybe something like this then? : https://unix.stackexchange.com/questions/316401/how-to-mount-a-disk-image-from-the-command-line/316407#316407 – jmunsch Nov 04 '18 at 14:28
  • @jmunsch, I'm afraid I don't get what you are going for. Are you suggesting I should dd the hard disk to an iso image and then try to mount that? – gro Nov 04 '18 at 18:25
  • 1
    maybe this might be a better example: https://unix.stackexchange.com/questions/64889/how-to-mount-recover-data-on-a-disk-that-was-part-of-a-mdadm-raid-1-on-another-m i was thinking it might be possible to mount it based on some kind of offset. – jmunsch Nov 05 '18 at 00:35

0 Answers0