# Hard drive not mounting - e2fsck not helping

## WhiteSpade

So, I might have to cry if I actually lose all this data.  I have a SATA HD and its no longer mounting.  So I looked in /var/log/messages and this is what I see

```
May  6 21:41:14 liberace sd 0:0:1:0: WARNING: (0x06:0x002C): Command (0x28) timed out, resetting card.

...

...

May  6 21:42:01 liberace end_request: I/O error, dev sdb, sector 527777855

May  6 21:42:01 liberace EXT3-fs error (device sdb1): ext3_find_entry: reading directory #32980993 offset 0

May  6 21:42:01 liberace end_request: I/O error, dev sdb, sector 63

May  6 21:42:01 liberace Buffer I/O error on device sdb1, logical block 0

May  6 21:42:01 liberace lost page write due to I/O error on sdb1
```

It doesn't seem to be a good thing in the least and this is my only unmirrored drive (conveniently).  It is running on a 3ware 9500S SATA RAID card.

However, the hard drive doesn't even spin up anymore, so I took the logic board off of another identical HD and now it spins up.  Pleased about this, I then try to access it, but I can't.  Then I try to e2fsck it, but it gives me this error

```
e2fsck: Attempt to read block from filesystem resulted in short read while trying to open /dev/sdb

Could this be a zero-length partition?
```

This is obviously not a good thing.  So I run

```
mke2fs -n /dev/sdb
```

and the output I get is 

```
mke2fs 1.40-WIP (14-Nov-2006)

/dev/sdb is entire device, not just one partition!

Proceed anyway? (y,n) y

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

61063168 inodes, 122096646 blocks

6104832 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=0

3727 block groups

32768 blocks per group, 32768 fragments per group

16384 inodes per group

Superblock backups stored on blocks:

        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,

        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,

        102400000
```

I then use the backup superblock info to try and run 

```
e2fsck -b 32768 /dev/sdb
```

However, it gives me the same error.  I try the same thing on all the backup blocks.  All the up to and including 4096000 I get the same error.  However, from 7962624 and up it instead says 

```
e2fsck 1.40-WIP (14-Nov-2006)

e2fsck: Invalid argument while trying to open /dev/sdb

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>
```

What can else can I do to try and recover this data?  I have so much work stored on there.  If anyone has any ideas, please let me know and I will try them right away.  Thank you for your time thus far.

---Alex

----------

## mudrii

before doing any thing to disk try full backup of all the data with dd 

if you change logical board in some cases is incompatible check first the partition table fdisk -l

----------

## salahx

You want to run e2fsck on the partition (/dev/sdb1) not the whole drive (/dev/sdb)

----------

## WhiteSpade

 *Quote:*   

> You want to run e2fsck on the partition (/dev/sdb1) not the whole drive (/dev/sdb)

 

I was unable to do so because it doesn't bring up any partitions for the drive.  It leaves it at /dev/sdb

 *Quote:*   

> if you change logical board in some cases is incompatible check first the partition table fdisk -l

 

When I run fdisk -l /dev/sdb doesn't even show up.  The drive that I'm borrowing a logic board from is identical in everything, including firmware.  They were manufactured 9 days apart.  I check all the versions and number; it all seems to be identical.

If I try to access the partition table using fdisk /dev/sdb it says 

```
Unable to read /dev/sdb
```

Upon bootup these are the errors I get

```
sd 1:0:0:0: SCSI error: return code = 0x08000002

sdb: Current [descriptor]: sense key=0xb

    ASC=0x0 ASCQ=0x0

Descriptor sense data with sense descriptors (in hex):

        72 0b 00 00 00 00 00 0c 00 0a 80 00 00 00 00 00 

        00 00 00 00 

end_request: I/O error, dev sdb, sector 0

ata2: EH complete

ata2.00: speed down requested but no transfer mode left

ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0

ata2.00: cmd c4/00:08:00:00:00/00:00:00:00:00/e0 tag 0 cdb 0x0 data 4096 in

         res 51/04:08:00:00:00/00:00:3a:00:00/e0 Emask 0x1 (device error)

ata2.00: configured for PIO0

ata2: EH complete

...

Buffer I/O error on device sdb, logical block 0

Buffer I/O error on device sdb, logical block 1

Buffer I/O error on device sdb, logical block 2

Buffer I/O error on device sdb, logical block 3

...

SCSI device sdb: 976773168 512-byte hdwr sectors (500108 MB)

sdb: Write Protect is off

sdb: Mode Sense: 00 3a 00 00

SCSI device sdb: write cache: enabled, read cache: enabled, doesn't support DPO or FUA

...
```

It actually prints all of these a bunch of times.  I'm guessing this is the end of the line for my poor hard drive unless anyone else has any ideas...

---Alex

----------

## Bigun

Same issue here, and I have two hard drives in this system, I'm about to replace one and see if I can at least partition one of the three.  If I cannot, I'd say it's a driver/BIOS issue somewhere.

*EDIT*

Cannot partition any of them.  I'm using a 2007.0 LiveCD for installation, I'm going to try the 2006.1 version and see if that helps.

----------

## warrawarra

Have you checked the actual cable that connects the drive and or swapped the cable with another cable or another connector on the motherboard.

It can also be the actual drivers / firmware / module that is unstable or buggy and if replaced / using another driver / module newer or older / live dvd it might work / giving you a idea as to what the problem might be.

Also have you tried connecting the hd to another motherboard / computer to figure out if it is the motherboard or the drive itself that has problems.

Have you used UBCD or linux repair cd or similar on the drive or using a live dvd to access the drive and or fix it , not including the in os repairs you tried on current motherboard  

or on temp other pc / motherboard.

This is usually the steps I take to get closer to the actual problem hardware / software and then going from there trying to fix it.

Hope this helps to figure out what is going on.

----------

## eccerr0r

I don't know about anyone else but _never_ run mkfs or fsck on the disk until you're sure you're safe.  Looking that you did run mke2fs on the troubled disk you might have blew away some critical data already  :Sad: 

When you have a disk give errors the first thing to do is to COPY it, as much as you can,  duplicate all the "good" sectors to a disk that can handle them.  Work on the duplicate.  Don't write anything back onto the failed disk until you're out of options and "ready to take complete data loss".

Looks like you may have to resort to a data recovery specialist at this point, and possibly a lot of re-typing...

----------

## Bigun

These are blank drives.... they aren't even partitioned yet, I run no risk of data loss.

As far as a "bad cable", keep in mind we are talking about two drives here... and there is no cable involved, they are snap-in drives.

----------

## Bigun

 *Bigun wrote:*   

> These are blank drives.... they aren't even partitioned yet, I run no risk of data loss.
> 
> As far as a "bad cable", keep in mind we are talking about two drives here... and there is no cable involved, they are snap-in drives.

 

Heh... I did some background checking on this machine's history in our database.  The last record is showing:

 *Quote:*   

> Taken offline for troubleshooting

 

So needless to say my next search is for a new server.

----------

