This happens whenever I connect and mount a USB disk $ sudo mount /dev/sdi1 /sata Then when I am finished with it, I do $ sudo umount /sata and then $ sudo eject /dev/sdi At this point the system log shows the below burst of errors (the disk is still plugged in).
Checking the system log I see this for the first time with kernel 6.5.12-200.fc38.x86_64
What is the correct order of commands when removing a USB disk?
TIA
$ uname -a Linux e7.eyal.emu.id.au 6.6.8-100.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 21 04:01:45 UTC 2023 x86_64 GNU/Linux
kernel: sd 7:0:0:0: [sdi] Media removed, stopped polling kernel: sd 7:0:0:0: [sdi] tag#9 device offline or changed kernel: blk_print_req_error: 16 callbacks suppressed kernel: I/O error, dev sdi, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 kernel: buffer_io_error: 126 callbacks suppressed kernel: Buffer I/O error on dev sdi, logical block 0, async page read kernel: sd 7:0:0:0: [sdi] tag#10 device offline or changed kernel: I/O error, dev sdi, sector 1 op 0x0:(READ) flags 0x0 phys_seg 7 prio class 2 kernel: Buffer I/O error on dev sdi, logical block 1, async page read kernel: Buffer I/O error on dev sdi, logical block 2, async page read kernel: Buffer I/O error on dev sdi, logical block 3, async page read kernel: Buffer I/O error on dev sdi, logical block 4, async page read kernel: Buffer I/O error on dev sdi, logical block 5, async page read kernel: Buffer I/O error on dev sdi, logical block 6, async page read kernel: Buffer I/O error on dev sdi, logical block 7, async page read kernel: sd 7:0:0:0: [sdi] tag#11 device offline or changed kernel: I/O error, dev sdi, sector 0 op 0x0:(READ) flags 0x0 phys_seg 8 prio class 2 kernel: Buffer I/O error on dev sdi, logical block 0, async page read kernel: Buffer I/O error on dev sdi, logical block 1, async page read kernel: sd 7:0:0:0: [sdi] tag#8 device offline or changed kernel: I/O error, dev sdi, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 kernel: sd 7:0:0:0: [sdi] tag#9 device offline or changed kernel: I/O error, dev sdi, sector 1 op 0x0:(READ) flags 0x0 phys_seg 7 prio class 2 kernel: ldm_validate_partition_table(): Disk read failed. kernel: sd 7:0:0:0: [sdi] tag#10 device offline or changed kernel: I/O error, dev sdi, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 kernel: sd 7:0:0:0: [sdi] tag#11 device offline or changed kernel: I/O error, dev sdi, sector 1 op 0x0:(READ) flags 0x0 phys_seg 7 prio class 2 kernel: sd 7:0:0:0: [sdi] tag#8 device offline or changed kernel: I/O error, dev sdi, sector 0 op 0x0:(READ) flags 0x0 phys_seg 8 prio class 2 kernel: sd 7:0:0:0: [sdi] tag#9 device offline or changed kernel: I/O error, dev sdi, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 kernel: sd 7:0:0:0: [sdi] tag#10 device offline or changed kernel: I/O error, dev sdi, sector 1 op 0x0:(READ) flags 0x0 phys_seg 7 prio class 2 kernel: sd 7:0:0:0: [sdi] tag#11 device offline or changed kernel: sdi: unable to read partition table kernel: sd 7:0:0:0: [sdi] tag#10 device offline or changed kernel: sd 7:0:0:0: [sdi] tag#11 device offline or changed kernel: sd 7:0:0:0: [sdi] tag#8 device offline or changed kernel: sd 7:0:0:0: [sdi] tag#9 device offline or changed kernel: ldm_validate_partition_table(): Disk read failed. kernel: sd 7:0:0:0: [sdi] tag#10 device offline or changed kernel: sd 7:0:0:0: [sdi] tag#11 device offline or changed kernel: sd 7:0:0:0: [sdi] tag#8 device offline or changed kernel: sd 7:0:0:0: [sdi] tag#9 device offline or changed kernel: sd 7:0:0:0: [sdi] tag#10 device offline or changed kernel: sd 7:0:0:0: [sdi] tag#11 device offline or changed kernel: sdi: unable to read partition table kernel: sd 7:0:0:0: [sdi] tag#10 device offline or changed kernel: sd 7:0:0:0: [sdi] tag#11 device offline or changed kernel: sd 7:0:0:0: [sdi] tag#8 device offline or changed kernel: sd 7:0:0:0: [sdi] tag#9 device offline or changed kernel: sd 7:0:0:0: [sdi] tag#10 device offline or changed kernel: sd 7:0:0:0: [sdi] tag#11 device offline or changed kernel: sd 7:0:0:0: [sdi] tag#8 device offline or changed
Later, when unplugging the disk:
kernel: usb 1-8: USB disconnect, device number 32 kernel: sd 7:0:0:0: [sdi] Synchronizing SCSI cache kernel: sd 7:0:0:0: [sdi] Synchronize Cache(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
On Sat, 2024-01-06 at 00:39 +1100, fedora@eyal.emu.id.au wrote:
This happens whenever I connect and mount a USB disk $ sudo mount /dev/sdi1 /sata Then when I am finished with it, I do $ sudo umount /sata and then $ sudo eject /dev/sdi At this point the system log shows the below burst of errors (the disk is still plugged in).
Checking the system log I see this for the first time with kernel 6.5.12-200.fc38.x86_64
What is the correct order of commands when removing a USB disk?
AFAIK eject unmounts the drive, so you're attempting to unmount it twice. For removable USB drives, unmount on its own is enough.
poc