LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Problem mounting, checking or reading partition (probably a physical damage) (https://www.linuxquestions.org/questions/linux-general-1/problem-mounting-checking-or-reading-partition-probably-a-physical-damage-796892/)

scmbg 03-21-2010 01:21 PM

Problem mounting, checking or reading partition (probably a physical damage)
 
Hi guys.

I have a problem when trying mounting, checking my ext3 partition.

Is a external HD with my "portable" Linux system.

Suddenly started to fail, when I try to boot it, the GRUB can't locate the config file, and show me the command line.

I boot from my internal HD and try to mount it and have this messages.

Code:

sd 2:0:0:0: [sdb] Attached SCSI disk
sd 2:0:0:0: Attached scsi generic sg2 type 0
sd 2:0:0:0: [sdb] Unhandled sense code
sd 2:0:0:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK
sd 2:0:0:0: [sdb] Sense Key : Medium Error [current]
sd 2:0:0:0: [sdb] Add. Sense: Unrecovered read error
end_request: I/O error, dev sdb, sector 512023680
Buffer I/O error on device sdb2, logical block 0
Buffer I/O error on device sdb2, logical block 1
Buffer I/O error on device sdb2, logical block 2
Buffer I/O error on device sdb2, logical block 3

After a second try.

Code:

sd 2:0:0:0: [sdb] Sense Key : Medium Error [current]
sd 2:0:0:0: [sdb] Add. Sense: Unrecovered read error
end_request: I/O error, dev sdb, sector 512023680
Buffer I/O error on device sdb2, logical block 0
Buffer I/O error on device sdb2, logical block 1
Buffer I/O error on device sdb2, logical block 2
Buffer I/O error on device sdb2, logical block 3

Third

Code:

sd 2:0:0:0: [sdb] Unhandled sense code
sd 2:0:0:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK
sd 2:0:0:0: [sdb] Sense Key : Medium Error [current]
sd 2:0:0:0: [sdb] Add. Sense: Unrecovered read error
end_request: I/O error, dev sdb, sector 512023680
__ratelimit: 7 callbacks suppressed
Buffer I/O error on device sdb2, logical block 0
Buffer I/O error on device sdb2, logical block 1
Buffer I/O error on device sdb2, logical block 2
Buffer I/O error on device sdb2, logical block 3
Buffer I/O error on device sdb2, logical block 4
Buffer I/O error on device sdb2, logical block 5
Buffer I/O error on device sdb2, logical block 6
Buffer I/O error on device sdb2, logical block 7
Buffer I/O error on device sdb2, logical block 8
Buffer I/O error on device sdb2, logical block 9

Then I try to mount with different super block and forcing the ext3 type

# mount -t ext3 /dev/sdb2 /mnt/ -o sb=8193

Code:

VFS: Can't find ext3 filesystem on dev sdb2
After run some forensic tools I see that the sector 512023680 appear repeatedly damaged. So I started to suspect it was physical damage. But all my data still there an looks fine.

Here is some questions.

1.- What exactly is in this first sectors (ext3 metadata?)

2.- Is there some way to fix this quickly, maybe with some "sectors relocation", Or re-create the first logical sectors.

3.- If not, who could i make a full backup (something like dd copy), of all the partition.

4.- How fix it?, even with a long prosses, i don't know, maybe backup the file structure (with forensic tools) and copy into a new (and re-located) partition. This is my last option because the forensic tools sometime can't recover all files and sometimes only parts, or very old files.

Thanks.

mario.almeida 03-21-2010 02:14 PM

Hi,

Did you try to run
Code:

e2fsck -fD /dev/sdb2
Check the below site to take backup
http://en.wikipedia.org/wiki/Dd_%28Unix%29

never say never 03-21-2010 02:49 PM

The first thing you should do is copy the disk using a tool like Clonezilla (it is free software). Did I mention that you should do this FIRST BEFORE ANYTHING ELSE?

Next try to run fsck to see if it can solve the problem. If, as you suspect the problem is physical in nature fsck is not likely to solve teh problem.

If it fails, you can try a tool like SpinRight Not free but not real expensive either. It has saved a lot of data for me over the years. Though I have to admit that it has also trashed some disks with physical problems, so always backup first. Overall it has helped far more than it has hurt.

Good Luck

syg00 03-21-2010 05:24 PM

I doubt that is a valid secondary superblock - try "mkfs.ext3 -n /dev/sdb2". That generates a list of what it would have used by default - the "-n" stops it actually writing to the disk.
Then use one (or more) of the secondary superblocks with fsck.ext3 to see if it can fix it.

With externals, make sure you "umount" prior to pulling the plug out, else (journal) data may not have been written back, and you get a broken filesystem. That is a logical, not physical, problem - at this point I can't say which yours is.

scmbg 03-21-2010 06:32 PM

Sorry, I forgot mention that I also try "fsck" but return the next error

Code:

e2fsck 1.41.4 (27-Jan-2009)
e2fsck: Attempt to read block from filesystem resulted in short read while trying to open /dev/sdb2
Could this be a zero-length partition?

Now I gonna try fsck with others super blocks.

Also, I have a list of superblocks given by the forensic tools (yes, are in the common places). The number above was the last tried.

I use SpinRight some time ago and works, this could be my next step (mmm... where is that old cd?).

And yes, I always umount external ext3 file systems, and this external HD has Fedora and I only plug-out when the system power off.

Thanks guys for the help. I will keep you informed, jejeje!!

syg00 03-21-2010 06:46 PM

Parted tries to guess the filesystems in partitions it finds. What does this show (as root)
Code:

parted  /dev/sdb "print"

jiml8 03-22-2010 12:28 AM

Your IO errors very strongly suggest a hardware failure.

The USB interface is likely blocking you from being able to use a lot of tools. I strongly suggest you try to copy the drive. Try it first through the USB interface, and if that doesn't work, remove it from the USB box and plug it into a computer and try to copy it. Use cloning software. Clonezilla has been suggested; dd *should* also work.

After that, try to recover it, if you can. You might try Spinrite on it - that is (IMNSHO) the BEST software out there for working on a failing drive. It MIGHT get you going for a bit. However, Spinrite is not free.

Sounds to me like either the drive is failing, or the USB interface is failing. Possibly also a bad cable or something like that.

scmbg 05-26-2010 11:55 AM

Ups, I forgot this thread, is SOLVED.

With TestDisk [ http://www.cgsecurity.org/wiki/TestDisk ] Scan for old partition and show me all superblocks found. I try everyone, and the last works, the partition was checked with fsck and I can recovery the data (well, the important).

And the problem was the USB interface, is failing, and in some circumstances break my systems files.


All times are GMT -5. The time now is 11:39 PM.