Skip to contentSkip to conversation

critical target error?

DISCUSSION Ulli Horlacher 2 participants 3 messages Feb 5 Btrfs file system

lore
Share & tools
lore
#0 lore raw

After reboot I found in kern.log :

2026-02-05 14:51:03 kernel: sd 3:0:0:0: [sdg] Very big device. Trying to use READ CAPACITY(16).
2026-02-05 14:51:03 kernel: sd 3:0:0:0: [sdg] 33951716474 512-byte logical blocks: (17.4 TB/15.8 TiB)
2026-02-05 14:51:03 kernel: sd 3:0:0:0: [sdg] Write Protect is off
2026-02-05 14:51:03 kernel: sd 3:0:0:0: [sdg] Mode Sense: 6d 00 00 00
2026-02-05 14:51:03 kernel: sd 3:0:0:0: [sdg] Write cache: disabled, read cache: disabled, doesn't support DPO or FUA
2026-02-05 14:51:03 kernel: sd 3:0:0:0: [sdg] Very big device. Trying to use READ CAPACITY(16).
2026-02-05 14:51:03 kernel: sd 3:0:0:0: [sdg] Attached SCSI disk
2026-02-05 14:51:03 kernel: BTRFS: device label spool devid 1 transid 50265 /dev/sdg scanned by mount (648)
2026-02-05 14:51:03 kernel: BTRFS info (device sdg): first mount of filesystem 68c59310-da6a-440e-bf26-5aae2f38c3f1
2026-02-05 14:51:03 kernel: BTRFS info (device sdg): using crc32c (crc32c-intel) checksum algorithm
2026-02-05 14:51:03 kernel: BTRFS info (device sdg): using free-space-tree
2026-02-05 14:56:44 kernel: sd 3:0:0:0: [sdg] tag#88 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s
2026-02-05 14:56:44 kernel: sd 3:0:0:0: [sdg] tag#88 Sense Key : Illegal Request [current] 
2026-02-05 14:56:44 kernel: sd 3:0:0:0: [sdg] tag#88 Add. Sense: Invalid command operation code
2026-02-05 14:56:44 kernel: sd 3:0:0:0: [sdg] tag#88 CDB: Write same(16) 93 08 00 00 00 00 00 00 6a 18 00 00 01 e0 00 00
2026-02-05 14:56:44 kernel: critical target error, dev sdg, sector 27160 op 0x3:(DISCARD) flags 0x800 phys_seg 1 prio class 0

A media error is highly implausible, because sdg is a ESX virtual disk on a high redundant Netapp fileserver.
Maybe an internal btrfs problem?

root@fex:/var/log# grep sdg /proc/mounts 
/dev/sdg /spool btrfs rw,relatime,discard=async,space_cache=v2,user_subvol_rm_allowed,subvolid=5,subvol=/ 0 0
root@fex:/var/log# df -TH /spool/
Filesystem     Type   Size  Used Avail Use% Mounted on
/dev/sdg       btrfs   18T  105G   18T   1% /spool
Signature · 6 lines
Ullrich Horlacher              Server und Virtualisierung
Rechenzentrum TIK
Universitaet Stuttgart         E-Mail: [email protected]
Allmandring 30a                Tel:    ++49-711-68565868
70569 Stuttgart (Germany)      WWW:    https://www.tik.uni-stuttgart.de/
REF:<[email protected]>
#1 lore raw
Quoted 20 lines · Ulli Horlacher

After reboot I found in kern.log :

2026-02-05 14:51:03 kernel: sd 3:0:0:0: [sdg] Very big device. Trying to use READ CAPACITY(16).
2026-02-05 14:51:03 kernel: sd 3:0:0:0: [sdg] 33951716474 512-byte logical blocks: (17.4 TB/15.8 TiB)
2026-02-05 14:51:03 kernel: sd 3:0:0:0: [sdg] Write Protect is off
2026-02-05 14:51:03 kernel: sd 3:0:0:0: [sdg] Mode Sense: 6d 00 00 00
2026-02-05 14:51:03 kernel: sd 3:0:0:0: [sdg] Write cache: disabled, read cache: disabled, doesn't support DPO or FUA
2026-02-05 14:51:03 kernel: sd 3:0:0:0: [sdg] Very big device. Trying to use READ CAPACITY(16).
2026-02-05 14:51:03 kernel: sd 3:0:0:0: [sdg] Attached SCSI disk
2026-02-05 14:51:03 kernel: BTRFS: device label spool devid 1 transid 50265 /dev/sdg scanned by mount (648)
2026-02-05 14:51:03 kernel: BTRFS info (device sdg): first mount of filesystem 68c59310-da6a-440e-bf26-5aae2f38c3f1
2026-02-05 14:51:03 kernel: BTRFS info (device sdg): using crc32c (crc32c-intel) checksum algorithm
2026-02-05 14:51:03 kernel: BTRFS info (device sdg): using free-space-tree
2026-02-05 14:56:44 kernel: sd 3:0:0:0: [sdg] tag#88 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s
2026-02-05 14:56:44 kernel: sd 3:0:0:0: [sdg] tag#88 Sense Key : Illegal Request [current]
2026-02-05 14:56:44 kernel: sd 3:0:0:0: [sdg] tag#88 Add. Sense: Invalid command operation code
2026-02-05 14:56:44 kernel: sd 3:0:0:0: [sdg] tag#88 CDB: Write same(16) 93 08 00 00 00 00 00 00 6a 18 00 00 01 e0 00 00
2026-02-05 14:56:44 kernel: critical target error, dev sdg, sector 27160 op 0x3:(DISCARD) flags 0x800 phys_seg 1 prio class 0
Quoted 4 lines

A media error is highly implausible, because sdg is a ESX virtual disk on a high redundant Netapp fileserver.
Maybe an internal btrfs problem?

Kernel attempted to discard unused blocks (you use the option "discard") and decided to use WRITE_SAME SCSI command that the disk rejected. It is completely unrelated to the btrfs; normally SCSI device should report what features it supports. Either your device lies or there is a bug in sd driver resulting in selecting the wrong discard method or parameters of it.

Quoted 8 lines
root@fex:/var/log# grep sdg /proc/mounts
/dev/sdg /spool btrfs rw,relatime,discard=async,space_cache=v2,user_subvol_rm_allowed,subvolid=5,subvol=/ 0 0
root@fex:/var/log# df -TH /spool/
Filesystem     Type   Size  Used Avail Use% Mounted on
/dev/sdg       btrfs   18T  105G   18T   1% /spool
#2 lore raw
Quoted 6 lines · Andrei Borzenkov
Quoted 5 lines
2026-02-05 14:56:44 kernel: critical target error, dev sdg, sector 27160 op 0x3:(DISCARD) flags 0x800 phys_seg 1 prio class 0

A media error is highly implausible, because sdg is a ESX virtual disk on a high redundant Netapp fileserver.
Maybe an internal btrfs problem?

Quoted 6 lines

Kernel attempted to discard unused blocks (you use the option "discard") and decided to use WRITE_SAME SCSI command that the disk rejected. It is completely unrelated to the btrfs; normally SCSI device should report what features it supports. Either your device lies or there is a bug in sd driver resulting in selecting the wrong discard method or parameters of it.

I have no explicit discard option in /etc/fstab :

root@fex:# grep /spool /etc/fstab 
LABEL=spool  /spool btrfs   user_subvol_rm_allowed  0 2

But:

root@fex:# grep /spool /proc/mounts 
/dev/sdg /spool btrfs rw,relatime,discard=async,space_cache=v2,user_subvol_rm_allowed,subvolid=5,subvol=/ 0 0

Shall I add nodiscard to the btrfs mount options in /etc/fstab? Or can I simply ignore this error?

Signature · 6 lines
Ullrich Horlacher              Server und Virtualisierung
Rechenzentrum TIK
Universitaet Stuttgart         E-Mail: [email protected]
Allmandring 30a                Tel:    ++49-711-68565868
70569 Stuttgart (Germany)      WWW:    https://www.tik.uni-stuttgart.de/
REF:<[email protected]>