IO error on disk

Below is the error I’m getting. This was while trying to do a replication send to another Rockstor and was after moving most of the data in the share. This is a single disk in a pool by itself.

How do I run the equivalent of a windows disk repair on a BTRFS volume?

Sep 06 12:30:35 vault kernel: ata5.00: exception Emask 0x0 SAct 0x300000 SErr 0x0 action 0x0
Sep 06 12:30:35 vault kernel: ata5.00: irq_stat 0x40000008
Sep 06 12:30:35 vault kernel: ata5.00: failed command: READ FPDMA QUEUED
Sep 06 12:30:35 vault kernel: ata5.00: cmd 60/40:a0:d0:79:a9/05:00:07:00:00/40 tag 20 ncq dma 688128 in
res 41/40:00:38:7c:a9/00:00:07:00:00/40 Emask 0x409 (media error)
Sep 06 12:30:35 vault kernel: ata5.00: status: { DRDY ERR }
Sep 06 12:30:35 vault kernel: ata5.00: error: { UNC }
Sep 06 12:30:35 vault kernel: ata5.00: configured for UDMA/133
Sep 06 12:30:35 vault kernel: sd 4:0:0:0: [sdd] tag#20 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=2s
Sep 06 12:30:35 vault kernel: sd 4:0:0:0: [sdd] tag#20 Sense Key : Medium Error [current]
Sep 06 12:30:35 vault kernel: sd 4:0:0:0: [sdd] tag#20 Add. Sense: Unrecovered read error - auto reallocate failed
Sep 06 12:30:35 vault kernel: sd 4:0:0:0: [sdd] tag#20 CDB: Read(10) 28 00 07 a9 79 d0 00 05 40 00
Sep 06 12:30:35 vault kernel: I/O error, dev sdd, sector 128547896 op 0x0:(READ) flags 0x84700 phys_seg 91 prio class 2
Sep 06 12:30:35 vault kernel: ata5: EH complete
Sep 06 12:30:38 vault kernel: ata5.00: exception Emask 0x0 SAct 0x4000000 SErr 0x0 action 0x0
Sep 06 12:30:38 vault kernel: ata5.00: irq_stat 0x40000008
Sep 06 12:30:38 vault kernel: ata5.00: failed command: READ FPDMA QUEUED
Sep 06 12:30:38 vault kernel: ata5.00: cmd 60/08:d0:38:7c:a9/00:00:07:00:00/40 tag 26 ncq dma 4096 in
res 41/40:00:38:7c:a9/00:00:07:00:00/40 Emask 0x409 (media error)
Sep 06 12:30:38 vault kernel: ata5.00: status: { DRDY ERR }
Sep 06 12:30:38 vault kernel: ata5.00: error: { UNC }
Sep 06 12:30:38 vault kernel: ata5.00: configured for UDMA/133
Sep 06 12:30:38 vault kernel: sd 4:0:0:0: [sdd] tag#26 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=2s
Sep 06 12:30:38 vault kernel: sd 4:0:0:0: [sdd] tag#26 Sense Key : Medium Error [current]
Sep 06 12:30:38 vault kernel: sd 4:0:0:0: [sdd] tag#26 Add. Sense: Unrecovered read error - auto reallocate failed
Sep 06 12:30:38 vault kernel: sd 4:0:0:0: [sdd] tag#26 CDB: Read(10) 28 00 07 a9 7c 38 00 00 08 00
Sep 06 12:30:38 vault kernel: I/O error, dev sdd, sector 128547896 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Sep 06 12:30:38 vault kernel: BTRFS error (device sdd): bdev /dev/sdd errs: wr 0, rd 2, flush 0, corrupt 0, gen 0
Sep 06 12:30:38 vault kernel: ata5: EH complete
Sep 06 12:30:38 vault kernel: BTRFS error (device sdd): send: IO error at offset 4247552 for inode 34125 root 264

In my non-expert opinion that looks more like a hardware error. That is, repairing the filesystem won’t help (if it even works) because the error is occurring at a lower level.

I would:

  1. make backups of anything important now if you can
  2. check the physical connections/cables on the drive
  3. check the drive in another system - don’t have to mount the filesystem, just check whether the drive still throws IO errors. You could even do it from a liveUSB operating system like Ubuntu Desktop.

Btrfs would normally use scrub as a kind of repair, but it really needs two copies to be able to do that. Having a single drive severely limits error correction options.

2 Likes