Bug 217633

Summary: the insertion of disk to DVD make bad remout /dev/sda
Product: File System Reporter: rouckat
Component: ext4Assignee: fs_ext4 (fs_ext4)
Status: RESOLVED INVALID    
Severity: high CC: tytso
Priority: P3    
Hardware: All   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:

Description rouckat 2023-07-04 09:29:24 UTC

    
Comment 1 rouckat 2023-07-04 09:36:45 UTC
after the insertion goes /sda out from partitions table.

 0    7018942 sr0
 259        0  500107608 nvme0n1
 259        1     614400 nvme0n1p1
 259        2    1048576 nvme0n1p2
 259        3  497394688 nvme0n1p3
 259        4    1048576 nvme0n1p4
 252        0    8388608 zram0
   8       16   30375936 sdb
   8       17   30374912 sdb1

monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[10871.772732] change   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata5/host4/target4:0:0/4:0:0:0/block/sr0 (block)
KERNEL[10876.433514] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/bsg/1:0:0:0 (bsg)
KERNEL[10876.433570] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/scsi_generic/sg0 (scsi_generic)
KERNEL[10876.433597] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/scsi_device/1:0:0:0 (scsi_device)
KERNEL[10876.433618] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/scsi_disk/1:0:0:0 (scsi_disk)
UDEV  [10876.441039] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/bsg/1:0:0:0 (bsg)
UDEV  [10876.441133] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/scsi_generic/sg0 (scsi_generic)
UDEV  [10876.442675] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/scsi_disk/1:0:0:0 (scsi_disk)
UDEV  [10876.442929] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/scsi_device/1:0:0:0 (scsi_device)
KERNEL[10876.457419] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/block/sda/sda1 (block)
KERNEL[10876.457471] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/block/sda/sda2 (block)
UDEV  [10876.460502] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/block/sda/sda1 (block)
UDEV  [10876.460602] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/block/sda/sda2 (block)
KERNEL[10876.461050] remove   /devices/virtual/bdi/8:0 (bdi)
KERNEL[10876.461071] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/block/sda (block)
UDEV  [10876.462135] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/block/sda (block)
UDEV  [10876.463158] remove   /devices/virtual/bdi/8:0 (bdi)
KERNEL[10876.473176] unbind   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0 (scsi)
KERNEL[10876.473201] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0 (scsi)
KERNEL[10876.473211] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0 (scsi)
UDEV  [10876.474368] unbind   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0 (scsi)
UDEV  [10876.475291] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0 (scsi)
UDEV  [10876.476240] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0 (scsi)
UDEV  [10879.958313] change   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata5/host4/target4:0:0/4:0:0:0/block/sr0 (block)
KERNEL[10880.138548] add      /module/crc_itu_t (module)
UDEV  [10880.144065] add      /module/crc_itu_t (module)
KERNEL[10880.157417] add      /module/udf (module)
UDEV  [10880.158763] add      /module/udf (module)
KERNEL[10880.610168] change   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata5/host4/target4:0:0/4:0:0:0/block/sr0 (block)
UDEV  [10881.966211] change   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata5/host4/target4:0:0/4:0:0:0/block/sr0 (block)
KERNEL[10917.572773] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0 (scsi)
KERNEL[10917.572845] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0 (scsi)
KERNEL[10917.572868] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/scsi_device/1:0:0:0 (scsi_device)
KERNEL[10917.572965] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/scsi_disk/1:0:0:0 (scsi_disk)
KERNEL[10917.573952] add      /devices/virtual/bdi/8:32 (bdi)
KERNEL[10917.575162] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/scsi_generic/sg0 (scsi_generic)
KERNEL[10917.575242] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/bsg/1:0:0:0 (bsg)
UDEV  [10917.580543] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0 (scsi)
UDEV  [10917.582646] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0 (scsi)
UDEV  [10917.584954] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/scsi_device/1:0:0:0 (scsi_device)
UDEV  [10917.586523] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/scsi_disk/1:0:0:0 (scsi_disk)
UDEV  [10917.587248] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/bsg/1:0:0:0 (bsg)
UDEV  [10917.589603] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/scsi_generic/sg0 (scsi_generic)
UDEV  [10917.595180] add      /devices/virtual/bdi/8:32 (bdi)
KERNEL[10925.177408] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/block/sdc (block)
KERNEL[10925.177475] bind     /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0 (scsi)
KERNEL[10929.265960] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/bsg/1:0:0:0 (bsg)
KERNEL[10929.266787] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/scsi_generic/sg0 (scsi_generic)
KERNEL[10929.266833] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/scsi_device/1:0:0:0 (scsi_device)
KERNEL[10929.266854] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/scsi_disk/1:0:0:0 (scsi_disk)
KERNEL[10929.266875] remove   /devices/virtual/bdi/8:32 (bdi)
KERNEL[10929.267024] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/block/sdc (block)
UDEV  [10929.269365] remove   /devices/virtual/bdi/8:32 (bdi)
KERNEL[10929.278135] unbind   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0 (scsi)
KERNEL[10929.278166] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0 (scsi)
KERNEL[10929.278177] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0 (scsi)
UDEV  [10929.306227] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/block/sdc (block)
UDEV  [10929.306267] bind     /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0 (scsi)
UDEV  [10929.307983] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/scsi_generic/sg0 (scsi_generic)
UDEV  [10929.308041] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/scsi_disk/1:0:0:0 (scsi_disk)
UDEV  [10929.308055] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/bsg/1:0:0:0 (bsg)
UDEV  [10929.308372] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/block/sdc (block)
UDEV  [10929.308726] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/scsi_device/1:0:0:0 (scsi_device)
UDEV  [10929.309769] unbind   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0 (scsi)
UDEV  [10929.310259] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0 (scsi)
UDEV  [10929.310681] remove   /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0 (scsi)
KERNEL[10932.500855] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0 (scsi)
KERNEL[10932.500944] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0 (scsi)
KERNEL[10932.500968] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/scsi_device/1:0:0:0 (scsi_device)
KERNEL[10932.500997] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/scsi_generic/sg0 (scsi_generic)
KERNEL[10932.501690] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/scsi_disk/1:0:0:0 (scsi_disk)
KERNEL[10932.501756] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/bsg/1:0:0:0 (bsg)
KERNEL[10932.501776] add      /devices/virtual/bdi/8:32 (bdi)
UDEV  [10932.508112] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0 (scsi)
UDEV  [10932.510222] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0 (scsi)
UDEV  [10932.512325] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/scsi_device/1:0:0:0 (scsi_device)
UDEV  [10932.514290] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/scsi_generic/sg0 (scsi_generic)
UDEV  [10932.514937] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/scsi_disk/1:0:0:0 (scsi_disk)
UDEV  [10932.515724] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/bsg/1:0:0:0 (bsg)
UDEV  [10932.539103] add      /devices/virtual/bdi/8:32 (bdi)
KERNEL[10932.642215] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/block/sdc (block)
KERNEL[10932.642271] bind     /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0 (scsi)
UDEV  [10932.694222] add      /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/block/sdc (block)
UDEV  [10932.700667] bind     /devices/pci0000:00/0000:00:01.2/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0 (scsi)
Comment 2 Theodore Tso 2023-07-04 20:09:23 UTC
This isn't an ext4-related problem.

Also, the bug report does not explain what /dev/sda was before the disk was inserted.  What device was that associated with?   Such a bug report would need to include a complete description of the hardware associated with the system, including what SATA and SCSI devices were attached to the system.   I would recommend trying to reproduce the problem on a freshly booted system, and then saving the output "dmesg" which would be helpful for someone to understand what might be going on.

Finally, it's not clear whether this is in fact a kernel bug, or just a misunderstanding of what is supposed to be happening.  If this is a distribution-supplied kernel, I would recommend reaching out to the distribution's help channels first before assuming that upstream kernel developers will give you free support for something which might not be a bug, but just simply a user education issue.
Comment 3 rouckat 2023-07-05 06:28:41 UTC
Thank you for answer. only you information: if /dev/sda was the systemdisk or not, problem was the same. After the remount, usually had to be shut down and switch up. Now it looks like: problem, may be in the  cabeling. it looks like connection the disk and dvd to another power cables solve? this problem? I'l try this. I am so sorry and I will inform you, if it will necessary.