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 whilebadblocks
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
sudo smartctl -a /dev/sdb
output.