Linux HDD troubles: short read, short writes, IO errors,

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
Jan 2, 2006
10,455
35
91
When I do dmesg | grep hdd I get:

end_request: I/O error, dev hdd, sector 320081872
end_request: I/O error, dev hdd, sector 320081880
end_request: I/O error, dev hdd, sector 320081888
end_request: I/O error, dev hdd, sector 320081896
end_request: I/O error, dev hdd, sector 320081904
end_request: I/O error, dev hdd, sector 320081912
end_request: I/O error, dev hdd, sector 320081920
end_request: I/O error, dev hdd, sector 320081928
etc...

When I do fdisk /dev/hdd I get:

Unable to read /dev/hdd

When I do hdparm -i /dev/hdd I get:

Model=Maxtor 6Y160P0, FwRev=YAR41BW0, SerialNo=Y481QSCE
Config={ Fixed }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=57
BuffType=DualPortCache, BuffSize=7936kB, MaxMultSect=16, MultSect=off
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6
AdvancedPM=yes: disabled (255) WriteCache=enabled
Drive conforms to: (null):

* signifies the current active mode

When I do mkfs -t ext3 /dev/hdd I get:

Warning: could not erase sector 2: Attempt to write block from filesystem resulted in short write
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
20021248 inodes, 40021632 blocks
2001081 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=41943040
1222 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

Warning: could not read block 0: Attempt to read block from filesystem resulted in short read
Warning: could not erase sector 0: Attempt to write block from filesystem resulted in short write
Writing inode tables: done
ext2fs_mkdir: Attempt to read block from filesystem resulted in short read while creating root dir

Is my HDD dead?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Definitely not a good sign, install smartmontools and run the long test or find the manfacturer's drive test, they're usually a bootable ISO that just runs the SMART tests but the manufacturer will require it if you want to RMA the drive.
 

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
Jan 2, 2006
10,455
35
91
How do I tell where the HDD is physically connected in my system? I have 3 of these Maxtor 160GB HDDs with one of them on an IDE controller card and the problem can be on any one of them.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Well if they're on a PATA controller two of them will be set for master/slave and hdd will be slave on the second port.
 

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
Jan 2, 2006
10,455
35
91
Ohhhh... ok.

So is this how Linux sets up the HDDs?

80GB OS drive on Primary IDE1 - HDA -WD
160GB drive on Secondary IDE1 - HDB - Hitachi

160GB drive on Primary IDE2 - HDC - Maxtor
160GB drive on Secondary IDE2 - HDD - Maxtor

160GB drive on Primary IDE3 (IDE controller card) - HDE - Maxtor

So if, say, I had originally installed my drives like:

drive @ Prim. IDE1
drive @ Sec. IDE1

drive @Prim. IDE2
Sec. IDE2 is blank

drive @Prim. IDE3
drive @Sec. IDE3

would /dev/hdd not exist then? Or would drive @Prim. IDE3 be hdd?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
So is this how Linux sets up the HDDs?

Disks using the older IDE drivers, yes. SCSI (and this includes SATA and newer PATA drivers since they all use the SCSI core) is essentially first come first serve and are presented as /dev/sd*. This is why it's a really good idea to use filesystem labels or some other distinguishing factor to mount your drives, it's very possible that a simple reboot can cause your drives to come up in a different order if you have more than one hard disk controller (not counting IDE so far).

would /dev/hdd not exist then? Or would drive @Prim. IDE3 be hdd?

hdd wouldn't exist, the IDE drivers are strange in that they allocate names for all devices whether something is attached or not.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
If you use hdparm it can show the serial number for the drive..
hdparm -i /dev/hdd

Maybe that will be usefull so you know for sure which one your pulling.