Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
share|improve this question
    
The likelihood seems pretty low, but is it possible the kernel is missing ext4 support? –  killermist Jun 13 '12 at 14:43
    
Looks like your NAS is using some sort of RAID, do you know what kind? Presumably its mirrored. –  madmaze Jun 13 '12 at 14:43
    
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). –  Ian Jun 13 '12 at 14:45
    
Also, mkfs.ext4 is available as a command, so I believe ext4 is there... –  Ian Jun 13 '12 at 14:45
1  
Is it possible that the partition is false-flagged as ext4 when it is in fact something else, like ntfs (which is fairly common in NAS boxes)? –  killermist Jun 13 '12 at 15:01
show 9 more comments

2 Answers 2

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.

Let me know how it goes.

share|improve this answer
add comment

check this guide:

http://mybookworld.wikidot.com/forum/t-308252/how-to:install-debian-on-a-clean-hard-drive-for-the-white-li

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 :)

Best, Aron

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.