Linux spinning drive failure
My backup disk on my Linux box failed.
[ 6.006233] kernel: sd 1:0:0:0: [sdb] tag#26 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 6.006302] kernel: sd 1:0:0:0: [sdb] tag#26 Sense Key : Medium Error [current]
[ 6.006358] kernel: sd 1:0:0:0: [sdb] tag#26 Add. Sense: Unrecovered read error - auto reallocate failed
[ 6.006428] kernel: sd 1:0:0:0: [sdb] tag#26 CDB: Read(10) 28 00 00 00 0b b8 00 00 08 00
[ 6.006496] kernel: blk_update_request: I/O error, dev sdb, sector 3000 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 6.006568] kernel: Buffer I/O error on dev sdb1, logical block 119, async page read
That’s read errors, I think during fsck. I think it can’t read anything at all; badblocks just returns a list of integers from 1 to whenever I hit Ctrl-C. Higher level tools complain they can’t find a superblock, so that’s bad. Fortunately it’s just a backup volume so I don’t need to read the data off of it.
It’s a 2TB Western Digital Drive I bought back in 2015, six+ years is not too bad. (Confused it shows only 31313 hours = 3.5 years of power on time). I didn’t notice it failing; the errors from the backup script were going to root mail which I never read. Also I don’t have proper SMART alerting. Oops.
I’m replacing it with a WD Red Plus drive, 4TB. Spinning drives are basically a dead end product category. Except for server storage, so now there’s a lot of marketing around these “NAS drives”. The Seagate Ironwolf brand also gets recommended for NAS storage but Seagate drives tend to be noisier so I stuck with WD.
In theory drives will map around a few bad blocks but Linux has a long-standing thing where this process doesn’t (always?) happen automatically and I’ve never found a good tool to force it. There’s some instructions in a FAQ somewhere for an elaborate procedure of mapping that “logical block” to a physical sector on the disk and forcing a write to the sector, which causes a remap. But it’s scary. Meanwhile you already know the disc is beginning to fail; is it really worth trying to recover it? If you need the data ddrescue is probably the safer bet.