This does not satisfy as an answer, yet I came across your question and here is my observation. Below outputs are taken from journalctl -fa
Following this askubuntu topic I found out the lines outputting [sdb]
are actually due to eject command or some equivelant of it.
Output of eject /dev/sdb
:
Sep 05 14:30:54 knight kernel: sdb: detected capacity change from 60493824 to 0
Output of eject -t /dev/sdb
:
Sep 05 14:30:59 knight kernel: sd 2:0:0:0: [sdb] 60493824 512-byte logical blocks: (31.0 GB/28.8 GiB)
Sep 05 14:30:59 knight kernel: sdb: detected capacity change from 0 to 60493824
Sep 05 14:30:59 knight kernel: sdb: sdb1 sdb2
Sep 05 14:30:59 knight kernel: sdb: sdb1 sdb2
What was done above is safely removing (same output if performed from Thunar file manager as well), and replugging it in software (rather than physically).
You are pulling the rug under sd
's feet, it is not acknowledged and does not log it. But it logs if is properly acknowledged. However, I don't know why sd
does not log it afterwards either.
It seems plausible that it could state a missing disk, since somehow these lines were output:
Sep 05 14:31:24 knight kernel: usb 4-1: USB disconnect, device number 10
Sep 05 14:31:35 knight kernel: xhci_hcd 0000:00:10.0: Abort failed to stop command ring: -110
Sep 05 14:31:35 knight kernel: xhci_hcd 0000:00:10.0: Host halt failed, -110
Sep 05 14:31:35 knight kernel: xhci_hcd 0000:00:10.0: xHCI host controller not responding, assume dead
Sep 05 14:31:35 knight kernel: xhci_hcd 0000:00:10.0: HC died; cleaning up
Sep 05 14:31:35 knight kernel: xhci_hcd 0000:00:10.0: Timeout while waiting for setup device command
Sep 05 14:31:35 knight kernel: usb 4-1: device not accepting address 11, error -108
Sep 05 14:31:35 knight kernel: usb usb4-port1: couldn't allocate usb_device
But again, I am not knowledgeable enough on SCSI nor the kernel to answer the question at hand.
why does kernel not tell me which disk was disconnected?
- hmm but it does, what message did you expect to see? – Arkadiusz Drabczyk Sep 05 '22 at 17:22sdf
in this example). So something like:kernel: usb 2-10.2: USB disconnect, device /dev/sdf
. – Martin Vegter Sep 18 '22 at 05:16sda
,sdf
etc are coming from theblock
subsystem not from theusb
subsystem. As far as the latter is concerned, anything that's plugged in/out is a usb device and is reported as such, with thebus-port:device.interface
number. The messages from the former look likeblock device /sys/devices[...]/block/sda/sda1 has been removed
. I know this is a late comment but I found your question while searching for related posts before writing my answer here – don_crissti Nov 29 '23 at 13:54