Cannot mount RAID-1 hard drive
Lonni J Friedman
netllama at gmail.com
Wed Nov 28 07:12:32 PST 2012
On Wed, Nov 28, 2012 at 5:12 AM, CHONG Yu Meng <chongym at cymulacrum.net> wrote:
> Hi all,
>
> I've been given a NAS that has stopped working, and it appears that the
> motherboard is fried. So I take out the hard disks from the NAS which
> were in a RAID-1 (mirrored) array previously, and try to mount them.
>
> And, embarrassingly, I can't seem to get them mounted!
>
> Here's what I did:
> 1. I booted a PC from a Live CD of OpenSUSE 12.2, launch a terminal
> window, connect one of the hard disks via USB, and type this:
>
> linux:~ # parted /dev/sdb print
> Model: WDC WD50 00AACS-00ZUB0 (scsi)
> Disk /dev/sdb: 500GB
> Sector size (logical/physical): 512B/512B
> Partition Table: msdos
>
> Number Start End Size Type File system Flags
> 1 32.3kB 543MB 543MB primary linux-swap(v1) type=82
> 2 543MB 499GB 498GB primary ext2 type=83
>
> Ok, so I know the data is probably in the second partition, so that
> should be /dev/sdb2, right?
>
> 2. So, now I create a mount point and try to mount:
> linux:~ # mkdir /mnt/hdd0
> linux:~ # mount /dev/sdb2 /mnt/hdd0
> mount: unknown filesystem type 'linux_raid_member'
>
> Ok, so it was one half of a Software RAID system in the NAS (D-Link
> DNS-323). With a previous NAS, I was able to mount by simply specifying
> the filesystem type, so:
> linux:~ # mount -t ext2 /dev/sdb2 /mnt/hdd0
> mount: /dev/sdb2 is already mounted or /mnt/hdd0 busy
>
> 3. So now, I am beginning to worry, because I know next to nothing about
> Software RAID in Linux. I Google around and I find out that I need to
> stop the RAID array, so:
> linux:~ # cat /proc/mdstat
> Personalities : [raid1]
> md127 : active raid1 sdb2[2]
> 4999156 blocks super 1.2 [2/1] [U_]
>
> unused devices: <none>
> linux:~ # mdadm --stop /dev/md127
> mdadm: stopped /dev/md127
>
> 4. So, now I try to mount the data partition again:
> linux:~ # mount -t ext2 /dev/sdb2 /mnt/hdd0
> mount: wrong fs type, bad option, bad superblock on /dev/sdb2,
> missing codepage or helper program, or other error
> In some cases useful info is found in syslog - try
> dmesg | tail or so
> linux:~ # mount /dev/sdb2 /mnt/hdd0
> mount: unknown filesystem type 'linux_raid_member'
>
> WTH, it's still seen as a "linux_raid_member"! So I check the status of
> the software RAID:
> linux:~ # cat /proc/mdstat
> Personalities : [raid1]
> unused devices: <none>
>
> Looks like it is stopped! So, why is the partition still seen as part of
> the RAID-1 array?
>
> I'm out of ideas. Can somebody help me out here? Am I doing this
> correctly? What else can I do? I need to get the data out of that hard
> disk.
With Linux mdraid, there are two components. You have the ondisk
format for the array, and then you have the state of the array (in
/proc/mdstat ). What seems wrong/broken in your setup is that the
partition type should be id=fd (Linux raid), and not type=83.
However, the fact that the array was seemingly started (and visible in
/proc/mdstat ) suggests that the array is fine, but the discrepancy
between the partition type & filesystem information is causing
confusion. You might try changing the partition type to fd, and see
if you can then mount it.
Also you never said, which Linux distribution was managing this RAID
array prior to the disk failure? Its possible, although unlikely that
something in that SUSE Live CD is either broken or incompatible with
whatever is on disk.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L. Friedman netllama at gmail.com
LlamaLand https://netllama.linux-sxs.org
More information about the Linux-users
mailing list