Ext3 partition unreadable in OpenSuse 11
Hi,
A customer of mine loaded his entire music collection (200+GB) on a Maxtor external drive/network attached storage device. After he moved all the files over, the device stopped responding, with the only copy of his music stranded on it. The NAS was Linux based, so the drive was in ext3 format. He hired me to recover it. The NAS was no longer under warranty, so I took out the hard drive and put it in an external USB hard drive enclosure. I installed OpenSUSE 11 on an old Pentium 3 PC, and was able to get in and find his files. My customer had another network attached storage box, a buffalo Terastation, that he wanted his music collection transferred to. Here's where it all went wrong: I only recently started using Linux, and after spending all morning trying and failing to get the OpenSuse machine to see the terastation on the local network with Samba, I decided to try things from the other side and installed a program called Ext2 IFS 1.11 on my windows XP laptop that in theory would allow it to read ext2 and ext3 partitions. When it didn't work, I took my USB enclosure back over to the Linux machine. This time I couldn't get dolphin to mount any of the four partitions on the hard drive. I rebooted, and afterward I was able to get into 3 of the partitions, but the last one (the one with the music collection on it) gave me the following error code when I tried to access it: "an error occurred while accessing 'Volume (ext3)' the system said: org.freedesktop.hal.device.volume.unknownfailure: mount: wrong fs type, bad option, bad superblock on /dev/sdc6, missing codepage or helper program, or other error" Occasionally when I unmount, disconnect and reconnect the hard drive the partition will be accessible, it appears empty, but the free space indicates that it's half full. I tried connecting the hard drive to another machine also running Opensuse 11, and got the same error message and weird behavior. Is there anything that I can use to recover the partition? Thanks in advance -DLH |
You could try TestDisk which is part of the SystemRescueCD to recover data. Google it, small download.
|
I would try mounting the partition manually from the terminal instead of using a GUI program. The feedback might be more instructive. Open up another terminal and run "sudo tail -f /var/log/messages". This will follow the kernel messages. If you try to mount a partition, and it fails there should be a kernel message printed. That may provide more information.
In the first terminal, try "sudo mount -t ext3 /dev/sdc6 /mnt/ -o ro" There is a program "fsck.ext3" that you can use to repair the ext3 filesystem. Use it when the partition is not mounted, which I guess will be no problem! "sudo -n /sbin/fsck.ext3 /dev/sdc6" will run a check but not make any changes. "sudo -p /sbin/fsck.ext3 /dev/sdc6" will run a check and repair items automatically that can be done safely without intervention. "sudo -y /sbin/fsck.ext3 /dev/sdc6" will run a check and assume a "y" response to all questions. Your best bet may be the -p option. Please scan through the manpages for "fsck.ext3" and "mount". There are some other options you may need. For example, if the superblock is bad, you can try using a backup instead when running fsck.ext3. |
jschiwal,
I tried sudo -p /sbin/fsck.ext3 /dev/sdc6, it ran for a few minutes, then ended with this error: sudo: pam_authenticate: Conversation error The tail information is as follows: Jun 26 21:30:16 linux-e4lg sudo: pam_unix2(sudo:auth): conversation failed Jun 26 21:30:16 linux-e4lg sudo: chris : pam_authenticate: Conversation error ; TTY=pts/2 ; PWD=/home/chris ; USER=root ; COMMAND=/dev/sdc6 yancek, I've downloaded and burned SystemRescueCD, thanks for the recommendation, I'm a little bit nervous about running the software until I know a little bit more about what the problem is, but I may use it. |
I'm not quite sure why the sudo -p suggestion (just because I've never used it), but I'd simply try su'ing to the root account and trying fsck form there, so
su - <enter root password> /sbin/fsck.ext3 /dev/sdc6 since it looks like an authentication issue rather than a fsck issue. I may be wrong here in that Suse changed their root policy IIRC. If the above doesn't work, perhaps a simple sudo /sbin/fsck.ext3 /dev/sdc6 |
I tried SU'ing into the root account. It seems to have gotten past the authentication issue, but it threw up another error message:
"linux-e4lg:~ # /sbin/fsck.ext3 /dev/sdc6 e2fsck 1.40.8 (13-Mar-2008) /sbin/fsck.ext3: Superblock invalid, trying backup blocks... /sbin/fsck.ext3: Bad magic number in super-block while trying to open /dev/sdc6 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>" Will e2fsck work with ext3? |
From man e2fsck
Quote:
|
e2fsck -b 8193 /dev/sdc6 gives me the same error:
linux-e4lg:~ # e2fsck -b 8193 /dev/sdc6 e2fsck 1.40.8 (13-Mar-2008) e2fsck: No such file or directory while trying to open /dev/sdc6 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> It mentions an alternate superblock. Can I use any number or does it have to be specific? Thanks for the help so far by the way, I would have never gotten this far on my own. |
On my Fedora system there are distinct fsck tools available:
$ ls /sbin/fsck* /sbin/fsck /sbin/fsck.cramfs /sbin/fsck.ext2 /sbin/fsck.ext3 /sbin/fsck.ext4 /sbin/fsck.ext4dev /sbin/fsck.msdos /sbin/fsck.vfat Some of these are symlinks (/sbin/fsck.msdos -> dosfsck and /sbin/fsck.vfat -> dosfsck) Linux |
I'd get friendly with "man e2fsck"
Code:
-b superblock |
Ok, so I've read up on e2fsck and mke2fs -n. I managed to find a list of alternate superblocks, and after trying a few with e2fsck, I found one that appears to work, it didnt give me an error message at the least.
I entered e2fsck -b 163840 -p dev\sdc6\ and got a new line that only displayed ">" When I highlighted the command above to copy it, I pressed ctrl+c out of habit, and it brought back the normal prompt. I re-ran e2fsck along with sudo tail -f /var/log/messages, but it doesn't show anything happening. is there anything it's expecting me to enter at the >? |
I tried mounting the partition again and got the same error as before. the tail information gave me the following error:
Jun 27 16:09:02 linux-e4lg kernel: VFS: Can't find ext3 filesystem on dev sdc6. fdisk -l /dev/sdc6 returns the following information: Disk /dev/sdc6: 998.8 GB, 998894421504 bytes 255 heads, 63 sectors/track, 121441 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xc011de0c Disk /dev/sdc6 doesn't contain a valid partition table |
All times are GMT -5. The time now is 04:30 AM. |