HELP! Recovering linux ext2/ext3 RAID on windows

Discussion in 'OT Technology' started by NCS, Apr 13, 2010.

  1. NCS

    NCS Active Member

    Joined:
    Apr 2, 2002
    Messages:
    5,777
    Likes Received:
    0
    My WD NAS drive broke. I am certain the HD is fine but the network controller fried.

    So i opened it and got a standard usb external enclosure. I can clearly see and run different software to try and recover the files on those disks.

    What i see is a linux ext2 or ext3 raid configuration in 4 volumes: 2.8GB, 101.98Mb, 964.84MB, and 927GB

    what software can i use to get my files back? I don't have a linux OS (i do have a mac, however).
     
  2. crontab

    crontab (uid = 0)

    Joined:
    Nov 14, 2000
    Messages:
    23,446
    Likes Received:
    12
    how do you know it linux raid if you don't have a linux OS?

    a live cd may help in this situation on just accessing the data, knoppix, ubuntu, fedora, centos, etc... many have livecd's that can see lvm/lvm2/mdadm volumes.

    do you have a shell prompt in what you're looking at?
     
  3. NCS

    NCS Active Member

    Joined:
    Apr 2, 2002
    Messages:
    5,777
    Likes Received:
    0
    i guess i will install knoppix

    no i dont have a shell prompt yet. i know its a linux raid because i've searched and certain recovery programs see it as such too
     
  4. NCS

    NCS Active Member

    Joined:
    Apr 2, 2002
    Messages:
    5,777
    Likes Received:
    0
    ok i can boot with knoppix live cd, how the hell do i see the drives on an external usb drive?
     
  5. crontab

    crontab (uid = 0)

    Joined:
    Nov 14, 2000
    Messages:
    23,446
    Likes Received:
    12
    the drives should automatically be mounted or clickable on the left side of the desktop.

    open up a terminal an run the following

    df -hl
    su
    fdisk -l
    lvs
    cat /proc/mdstat

    and post it here
     
  6. NCS

    NCS Active Member

    Joined:
    Apr 2, 2002
    Messages:
    5,777
    Likes Received:
    0
    [email protected]:~$ df -hl
    Filesystem Size Used Avail Use% Mounted on
    /dev/sr0 3.7G 3.7G 0 100% /mnt-system
    tmpfs 1.0G 3.4M 1021M 1% /ramdisk
    /dev/cloop 8.5G 8.5G 0 100% /KNOPPIX
    unionfs 1.0G 3.4M 1021M 1% /UNIONFS
    unionfs 1.0G 3.4M 1021M 1% /home
    tmpfs 10M 56K 10M 1% /UNIONFS/var/run
    tmpfs 10M 0 10M 0% /UNIONFS/var/lock
    tmpfs 100M 52K 100M 1% /UNIONFS/var/log
    tmpfs 1.0G 8.0K 1.0G 1% /tmp
    udev 20M 404K 20M 2% /dev
    tmpfs 1.0G 4.0K 1.0G 1% /dev/shm
    [email protected]:~$ su
    [email protected]:/home/knoppix# fdisk -l

    Disk /dev/sda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x2eb06550

    Device Boot Start End Blocks Id System
    /dev/sda1 1 1020 8192000 1c Hidden W95 FAT32 (LBA)
    Partition 1 does not end on cylinder boundary.
    /dev/sda2 * 1020 12695 93772800 7 HPFS/NTFS
    /dev/sda3 12695 19458 54323200 f W95 Ext'd (LBA)
    /dev/sda5 12695 19458 54322176 7 HPFS/NTFS

    Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00007c00

    Device Boot Start End Blocks Id System
    /dev/sdb1 4 369 2939895 fd Linux raid autodetect
    /dev/sdb2 370 382 104422+ fd Linux raid autodetect
    /dev/sdb3 383 505 987997+ fd Linux raid autodetect
    /dev/sdb4 506 121601 972703620 fd Linux raid autodetect
    [email protected]:/home/knoppix# lvs
    [email protected]:/home/knoppix# cat /proc/mdstat
    cat: /proc/mdstat: No such file or directory
    [email protected]:/home/knoppix#
     
  7. NCS

    NCS Active Member

    Joined:
    Apr 2, 2002
    Messages:
    5,777
    Likes Received:
    0
    from what i can tell its this sdb1-4 that is one physical disk, and i want the data on there...
     
  8. crontab

    crontab (uid = 0)

    Joined:
    Nov 14, 2000
    Messages:
    23,446
    Likes Received:
    12
    try this

    su
    mkdir /mnt/disk1 /mnt/disk2 /mnt/disk3 /mnt/disk4
    mount /dev/sdb1 /mnt/disk1
    mount /dev/sdb2 /mnt/disk2
    mount /dev/sdb3 /mnt/disk3
    mount /dev/sdb4 /mnt/disk4

    You should then see icons for the 4 drives mounted. Else, if they mount, you can just cd into the directories to see your content.
     
  9. NCS

    NCS Active Member

    Joined:
    Apr 2, 2002
    Messages:
    5,777
    Likes Received:
    0
    mount: unknown filesystem type 'linux_raid_member'

    i'm a sad panda.
     
  10. crontab

    crontab (uid = 0)

    Joined:
    Nov 14, 2000
    Messages:
    23,446
    Likes Received:
    12
    what if you try

    su
    mdadm --detail --scan
     
  11. crontab

    crontab (uid = 0)

    Joined:
    Nov 14, 2000
    Messages:
    23,446
    Likes Received:
    12
    Or you can just specify the fs type

    try ext3 first, and ext2 second if it doesn't work. Better than trying to rebuild the raid.

    mount -t ext3 /dev/sdb1 /mnt/disk1
    mount -t ext3 /dev/sdb2 /mnt/disk2
    mount -t ext3 /dev/sdb3 /mnt/disk3
    mount -t ext3 /dev/sdb4 /mnt/disk4
     
  12. NCS

    NCS Active Member

    Joined:
    Apr 2, 2002
    Messages:
    5,777
    Likes Received:
    0
    excellent! the large partition (sdb4) is intact and i can see/read all my files.

    now... how the do i get them on a windows drive or a network share? (second would be the easiest...)
     
  13. crontab

    crontab (uid = 0)

    Joined:
    Nov 14, 2000
    Messages:
    23,446
    Likes Received:
    12
    su
    mkdir /mnt/windows_share
    mount -t cifs -o username=administrator,password=password //server/directory /mnt/windows_share
     
  14. NCS

    NCS Active Member

    Joined:
    Apr 2, 2002
    Messages:
    5,777
    Likes Received:
    0
    the share bit seemed too complicated, i mounted another external hd (windows NTFS) and started to copy. after a few files i get "Error: Success" pop-up , and if i try to read the directory of the source drive, i get "dir: reading directory .: Input/output error"

    as the pop-up showed up, i get a "journal commit I/O error"
    raaaah.....

    if i fdisk -l , the letter has incremented (i.e. sdb becomes sdc). i can mount again, copy another file, and the thing repeats...
     
  15. crontab

    crontab (uid = 0)

    Joined:
    Nov 14, 2000
    Messages:
    23,446
    Likes Received:
    12
    Are you sure it's just the controller that is bad?

    You can try to remount the sdb or sdc or sdd as ext2 to bypass journaling. I would not do a fsck to risk further corruption of data.
     
  16. NCS

    NCS Active Member

    Joined:
    Apr 2, 2002
    Messages:
    5,777
    Likes Received:
    0
    if i do moutn -t ext2 (etc...) i get "wrong fs type, bad option, bad superblock on /dev/sdg4, missing codepage or helper program, or other error"

    i am not sure its just the controller that is bad. but i am sure that the controller fried. i'm also sure that the disk sounds healthy, and on windows nothing 'unusual' happens when i run it through scanning/datarecovery programs although they dont find anything...

    its funny, i can go on the disk and read files (most are video). they load fine although seeking only keeps audio, probably more of a codec problem. for this reason i think the disk is intact... but who knows. as i browse folders, the disk stops working... then i can remount it.

    any other ideas?
     
  17. crontab

    crontab (uid = 0)

    Joined:
    Nov 14, 2000
    Messages:
    23,446
    Likes Received:
    12
    when you read files can you read the entire video? or does it stop partway?

    if you have multiple instances of the sdb drive mounted, that wouldn't help things.

    i don't know why it would be journaling if you're just reading.

    you can mount the fs read only

    mount -t ext3 -o ro /dev/sdb1 /mnt/disk1

    see if that does any good.

    if not, last resort is to try to fix the file system, descriptors, inodes, because it sounds like the fs wasn't sync'd properly.

    ensure none of the sdb stuff is mounted, then run

    su
    fsck /dev/sdb1
    fsck /dev/sdb2
    .
    .

    then remount them to see if that help. else, the file system is borked.
     
  18. NCS

    NCS Active Member

    Joined:
    Apr 2, 2002
    Messages:
    5,777
    Likes Received:
    0
    before i do the fsck, could you take a glance at this link?
    http://mybookworld.wikidot.com/rescue-procedure

    i don't understand anything there but apparently this "fixes" the raid?? i don't know if it would help in my case because all i want to do is recover files, not use it again like i did in the past.

    as for the videos i can skip through them but only get audio, not video (once i seek). since i'm not used to the OS/apps i have no idea if thats an issue or just the application.
     
  19. crontab

    crontab (uid = 0)

    Joined:
    Nov 14, 2000
    Messages:
    23,446
    Likes Received:
    12
    hi it looks more like the user re-purposed that mybook without raid. also note that he destroys all of the data on the drive. he seems to save the mybook linux os to an image. redo the partitions, takes out the linux raid references, puts the image back, formats the sdb4 partition. gets mybook working a new fresh fashion. that's not what you want.
     
  20. AbortionSurvivor

    AbortionSurvivor Active Member

    Joined:
    Jun 5, 2002
    Messages:
    3,016
    Likes Received:
    0
    Location:
    Nor. Cal
    hey NCS...
    Crontab is spot on with his steps, but have you tried putting the drive in a windows machine and running data recovery software? Many data recovery tools can read linux FS types including ext2 and ext3.

    I've had great success with r-studio.com.
    The trial version doesn't allow you to retrieve your files but only lets you view what would be recoverable. The full version can easily be obtained if you pay for it OR if you know "WHERE" to look (TPB)..
     
  21. NCS

    NCS Active Member

    Joined:
    Apr 2, 2002
    Messages:
    5,777
    Likes Received:
    0
    hey guys -- thanks for the help. crontab, i really appreciate all the time you took here to help me save my precious files.

    the read option doesn't solve the problem.

    in the meantime i will try this program. i tried using diskinternals raid recovery / linux recovery but that didnt work. in the meantime i actually got an email from them saying to use uneraser for this situation, which i didn't try.
     
    Last edited: Apr 14, 2010

Share This Page