0

I have a server that crashed and won't power on. I don't care about the server, but I'd like to recover the data attached to 2 external usb drives that were mirrored (raid 1) using mdadm. This system is about 3 years old and was running fedora and i'm guessing was formatted with ext3, maybe ext4.

I grabbed one of the drives from the dead system and attached it to a virtual machine running CentOS 7(localhost). fdisk and dmesg show it as /dev/sdc1. I ran:

[root@localhost ~]# **mdadm --assemble --run --force /dev/md127 /dev/sdc1**

mdadm: Merging with already-assembled /dev/md/workshed:0

mdadm: failed to add /dev/sdc1 to /dev/md/workshed:0: Device or resource busy

mdadm: /dev/md/workshed:0 has been started with 0 drives (out of 2).

(workshed was the name of my old host that won't power on)

Now I see this in /proc:

[root@localhost ~]# **cat /proc/mdstat**

Personalities : [raid1]
md127 : active raid1 sdb1[2]
  976760400 blocks super 1.2 [2/1] [_U]

unused devices: <none>
[root@localhost ~]#

Looks like it created /dev/md127 (not sure why md127) and it is active.

ok, lets try to mount:

[root@localhost ~]# **mkdir /mnt/test**

[root@localhost ~]# **mount /dev/md127 /mnt/test**

mount: /dev/md127: can't read superblock

[root@localhost ~]# **fsck /dev/md127**

fsck from util-linux 2.23.2
e2fsck 1.42.9 (28-Dec-2013)
fsck.ext2: Attempt to read block from filesystem resulted in short read while trying to open /dev/md127

Could this be a zero-length partition?

[root@localhost ~]# **fsck /dev/sdc1**

fsck from util-linux 2.23.2

(huh? ok, let's try e2fsck then...)

[root@localhost ~]# **e2fsck /dev/md127**
e2fsck 1.42.9 (28-Dec-2013)
e2fsck: Attempt to read block from filesystem resulted in short read  while trying to open /dev/md127

Could this be a zero-length partition?

[root@localhost ~]# **e2fsck /dev/sdc1**

e2fsck 1.42.9 (28-Dec-2013)
ext2fs_open2: Bad magic number in super-block
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/sdc1

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

[root@localhost ~]# **e2fsck -b 8193 /dev/sdc1**

e2fsck 1.42.9 (28-Dec-2013)
e2fsck: Bad magic number in super-block while trying to open /dev/sdc1

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

ok, so I must be doing something wrong here. I tried on the other drive that was part of the raid 1 array as well and got the same results. I can hear both drives spinning and I can hear it accessing the drives when I run fdisk. Seems awfully strange that both drives both have lost superblocks. Something tells me i'm doing something wrong...admittedly, its has been awhile since i've been hands on with linux. Any ideas on what to try next?

-Park

Santa
  • 569
  • 5
  • 15

0 Answers0