0

Frankly I don't know what to title this issue/question...

I have this one particular drive in my basic home server that is causing me headaches. Just finished restructuring my media library (sorting and renaming photos, deleting duplicates, ...). It was a lot of work and now, the drive I restructured to, is failing/acting up.

It's a Seagate Barracuda ST31000528AS, 1TB, 7200rpm from 2009(-ish) with only one ext4 partition.

The drive is still readable and writable, but at a very slow speed (see below).

Can you help me figure out if this a hardware failure or some problem with the filesystem? I will definitly replace this drive in the future, as I have lost confidence in it... But the data on it is still important to me. So do I spend 21 days that it would take to copy the data off of it, or do the wizards of this forum have the power to get this drive back into working order?

EDIT Just remembered it, might also be the motherboard, as it is similarly old. I will try a different SATA port now...

EDIT 2 As per the previous edit, I switched to another SATA port on the Mainboard and this actually fixed everything. No errors in the logs, no IO Errors, 100s of MB/s of throughput. The drive is healthy, the Mainboard is not!

Symptoms:

  • badblocks is returning nothing for the first 233k blocks (0.1% of all blocks, which took over an hour)
  • the dmesg output below is repeating every second while badblocks or any other IO is running
  • /dev/sdb is the only drive running with UDMA2
  • sometimes after reboots some of the directorys throw I/O errors, which dirs this affects changes from reboot to reboot

hdparm

# hdparm -tT /dev/sdb

/dev/sdb:
 Timing cached reads:     2 MB in 28.84 seconds =  71.02 kB/sec
 Timing buffered disk reads:   2 MB in 40.20 seconds =  50.94 kB/sec
# hdparm -i /dev/sdb
/dev/sdb:

 Model=ST31000528AS, FwRev=CC38, SerialNo=9VP32GR8
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=unknown, BuffSize=unknown, MaxMultSect=16, MultSect=off
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=1953525168
 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=no WriteCache=enabled
 Drive conforms to: unknown:  ATA/ATAPI-4,5,6,7

 * signifies the current active mode

dmesg

# dmesg
[...]
[13892.088412] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[13892.091432] ata2.00: configured for UDMA/33
[13892.091459] sd 3:0:0:0: [sdb] tag#11 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[13892.091465] sd 3:0:0:0: [sdb] tag#11 Sense Key : Illegal Request [current] 
[13892.091471] sd 3:0:0:0: [sdb] tag#11 Add. Sense: Unaligned write command
[13892.091477] sd 3:0:0:0: [sdb] tag#11 CDB: Read(10) 28 00 10 1f f9 00 00 01 00 00
[13892.091484] blk_update_request: I/O error, dev sdb, sector 270530816 op 0x0:(READ) flags 0x80700 phys_seg 32 prio class 0
[13892.091527] ata2: EH complete
[13892.148412] ata2.00: exception Emask 0x50 SAct 0x600000 SErr 0x280900 action 0x6 frozen
[13892.148430] ata2.00: irq_stat 0x08000000, interface fatal error
[13892.148441] ata2: SError: { UnrecovData HostInt 10B8B BadCRC }
[13892.148451] ata2.00: failed command: READ FPDMA QUEUED
[13892.148468] ata2.00: cmd 60/00:a8:00:fa:1f/01:00:10:00:00/40 tag 21 ncq dma 131072 in
                        res 40/00:b0:00:f9:1f/00:00:10:00:00/40 Emask 0x50 (ATA bus error)
[13892.148486] ata2.00: status: { DRDY }
[13892.148494] ata2.00: failed command: READ FPDMA QUEUED
[13892.148510] ata2.00: cmd 60/08:b0:00:f9:1f/00:00:10:00:00/40 tag 22 ncq dma 4096 in
                        res 40/00:b0:00:f9:1f/00:00:10:00:00/40 Emask 0x50 (ATA bus error)
[13892.148528] ata2.00: status: { DRDY }
[13892.148537] ata2: hard resetting link
[...]

fsck

# fsck -n /dev/sdb1
fsck from util-linux 2.34
e2fsck 1.45.5 (07-Jan-2020)
Warning!  /dev/sdb1 is in use.                                                 # yes, it is unmounted
Warning: skipping journal recovery because doing a read-only filesystem check.
1TB_2 contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong (192424920, counted=192786254).
Fix? no

Free inodes count wrong (61035970, counted=61039035).
Fix? no

1TB_2: 19006/61054976 files (15.0% non-contiguous), 51765470/244190390 blocks
1
  • Please edit your question and post sudo smartctl -a /dev/sdb output. Commented May 31, 2022 at 15:31

1 Answer 1

0

Your question is really about hardware related issue, not Unix. Knowing how to interact with your hardware using software is good, but having experience working with the hardware makes life easier.

I have been doing computer repair for almost a decade, and all the symptoms you described were signs of hardware failure.

From my experience working with hundreds of broken computers, consumer HDDs lifespan is around 15-20k power-on hours. After that you can expect tons of bad sectors and various mechanical issues. On the other hand, I have a dozen of enterprise HDDs from HD (OEM by Seagate) which run over 80k hours 24/7 with no problem whatsoever. Your HDD is merely a cheap old consumer HDD from 2009. You probably guess what is going on.

Slowness when reading/writing means your HDD have a lot of bad sectors, as the drive head needs to move back and forth to the reserved area of the disk. Random IO errors and freezing during full scan mean there are too many bad sectors. If it emits noises, it also means drive head failure.

Motherboard failure does not cause the drive to be slow. I would not waste my time digging through system logs and software testing, because the problem is obvious. If you need to make sure, just do a quick S.M.A.R.T test. I prefer using Windows over Linux for SMART test because it is easier.

P.S: it's time to say goodbye to your data. There is no way to recover the data from a damaged sector. When a sector goes bad, the data stored inside is gone forever.

2
  • Fortunately it wasn't the drive. I remembered that the first component of a PC to fail is often the Motherboard. So that's why I tried a different SATA port and low and behold, it works. I edited the original question. I forgot about smarctl -a when writing the question, the drive has 8k hours, so maybe there is still live left. ...in the drives, at least. Thanks for your insight on the lifetimes.
    – siglm
    Commented May 31, 2022 at 17:38
  • @siglm Speaking from a server perspective, the first component to go is usually the power supply. Followed by DIMMs, then spinning disks. SSD failures happen but not as often as you're lead to expect. Optics for fiber networking are next if you use them. Motherboards and PCI card failures are rare. Mount your disk read-only and copy the data elsewhere.
    – doneal24
    Commented May 31, 2022 at 17:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .