Can't mount filesystem on HD that came from WD NAS

7,792

Solution 1

I’m assuming you need the mdadm Linux software raid utility to deal with the partition #4 listed below from the WD Rescue procedure 2 web page. It is likely it is part of a software RAID array even if it is on a single disk. We see this on the Seagate NAS as well.

Your partition table should look like this:

  • Unallocated space. (This space is used to store individual system specific data, such as MAC address, serial number, etc.)
  • Partition #1, formatted as ext3. (This is the boot partition, with /boot, /root, etc. on it.)
  • Partition #2, formatted as swap (This is the system paging file.)
  • Partition #3, formatted as ext3 (This is the rest of the O/S, /var, etc.)
  • Partition #4, unknown format. (This is the data-store, don't modify or change this!)

The Partition #4 will likely need to be mounted as a RAID array. It is leaking the file system format of ext4 through but is probably still a RAID partition. Take a look at the above website for details on recovering a software raid partition.

Solution 2

Check this guide. It’s worth to read the whole site, it’s very useful.

The command(s) you are searching for:

# if your filesystem is corrupted run this, then mkfs...    
mdadm --zero-superblock /dev/sdb1          

# creating /dev/md0    
mdadm --create /dev/md0 --raid-devices=2 --level=raid1 --run --metadata=0.90 /dev/sdb1 missing
  • assumed that your drive is /dev/sdb.
  • I recommend to read the guide before doing anything.
Share:
7,792
Ehtesham Siddiqui
Author by

Ehtesham Siddiqui

People tell me I'm too verbose.

Updated on September 18, 2022

Comments

  • Ehtesham Siddiqui
    Ehtesham Siddiqui over 1 year

    I have a WD NAS drive, I need to recover some deleted files, so I've taken the drive out and plugged it into an Ubuntu machine to get direct access to the filesystem...

    When I check the drive in parted I see:

    Model: ATA WDC WD20EURS-63S (scsi)
    Disk /dev/sdb: 2000GB
    Sector size (logical/physical): 512B/4096B
    Partition Table: gpt
    
    Number  Start   End     Size    File system  Name     Flags
     3      15.7MB  528MB   513MB                primary
     1      528MB   2576MB  2048MB  ext3         primary  raid
     2      2576MB  4624MB  2048MB  ext3         primary  raid
     4      4624MB  2000GB  1996GB  ext4         primary
    

    However, when I try mounting /dev/sdb4 with ext4...

    root# mount -t ext4 /dev/sdb4 /media/2TB
    mount: wrong fs type, bad option, bad superblock on /dev/sdb4,
           missing codepage or helper program, or other error
           In some cases useful info is found in syslog - try
           dmesg | tail  or so
    

    Any ideas why it wont mount?

    Edit: When mounting without -t (for all partitions):

    root# mount /dev/sdb /media/2TB
    mount: you must specify the filesystem type
    root# mount /dev/sdb1 /media/2TB
    mount: unknown filesystem type 'linux_raid_member'
    root# mount /dev/sdb2 /media/2TB
    mount: unknown filesystem type 'linux_raid_member'
    root# mount /dev/sdb3 /media/2TB
    mount: you must specify the filesystem type
    root# mount /dev/sdb4 /media/2TB
    mount: wrong fs type, bad option, bad superblock on /dev/sdb4,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
    
    • killermist
      killermist almost 12 years
      The likelihood seems pretty low, but is it possible the kernel is missing ext4 support?
    • madmaze
      madmaze almost 12 years
      Looks like your NAS is using some sort of RAID, do you know what kind? Presumably its mirrored.
    • Ehtesham Siddiqui
      Ehtesham Siddiqui almost 12 years
      There's only 1 drive in the NAS, so I really doubt there was any RAID going on... (it's a 2TB WD "MyBook Live" drive).
    • Ehtesham Siddiqui
      Ehtesham Siddiqui almost 12 years
      Also, mkfs.ext4 is available as a command, so I believe ext4 is there...
    • madmaze
      madmaze almost 12 years
      Yea but you have raid flags in the first 2 partitions. Have you tried mounting it without specifying -t
    • Ehtesham Siddiqui
      Ehtesham Siddiqui almost 12 years
      I just edited the question to show what happens when I try without -t.
    • Ehtesham Siddiqui
      Ehtesham Siddiqui almost 12 years
      I should note that I am unfamiliar as to how to mount raid partitions...
    • Ehtesham Siddiqui
      Ehtesham Siddiqui almost 12 years
      I did however notice that /dev/sd1 and /dev/sd2 are the NAS's OS and are both identical..... but I'm looking for the data volume...
    • Ehtesham Siddiqui
      Ehtesham Siddiqui almost 12 years
      I tried mounting it with ext2, ext3, ext4, ntfs, vfat, xfs... no dice
    • killermist
      killermist almost 12 years
      It looks like even without the raid flag, the 4th partition may be raid (in spite of being not used for raid...) mybookworld.wikidot.com/forum/t-90514/…
    • Ehtesham Siddiqui
      Ehtesham Siddiqui almost 12 years
      When I try running mdadm --assemle /dev/md4 /dev/sdb4 it throws mdadm: no recogniseable superblock on /dev/sdb4 mdadm: /dev/sdb4 has no superblock - assembly aborted
    • Ehtesham Siddiqui
      Ehtesham Siddiqui over 11 years
      Sorry, this happened a while ago, I think the solution I used was to just kill the RAID and reformat... I don't remember though.