Re: Regression v6.11 booting cannot mount harddisks (xfs)
From: Damien Le Moal <dlemoal@kernel.org>
Date: 2024-09-10 13:06:27
Also in:
linux-ide, linux-xfs, lkml
On 2024/09/10 21:19, Jesper Dangaard Brouer wrote:
Hi Linus, My testlab kernel devel server isn't booting correctly on v6.11 branches (e.g. net-next at 6.11.0-rc5) I just confirmed this also happens on your tree tag: v6.11-rc7. The symptom/issue is that harddisk dev names (e.g /dev/sda, /dev/sdb, /dev/sdc) gets reordered. I switched /etc/fstab to use UUID's instead (which boots on v6.10) but on 6.11 it still cannot mount harddisks and doesn't fully boot.
Parallel SCSI device scanning has been around for a long time... This is controlled with CONFIG_SCSI_SCAN_ASYNC. And yes, that can cause disk names to change, which is why it is never a good idea to rely on them but instead use /dev/disk/by-* names. Disabling CONFIG_SCSI_SCAN_ASYNC will likely not guarantee that disk names will be constant, given that you seem to have 2 AHCI adapters on your host and PCI device scanning is done in parallel.
E.g. errors: systemd[1]: Expecting device dev-disk-by\x2duuid-0c2b348d\x2de013\x2d482b\x2da91c\x2d029640ec427a.device - /dev/disk/by-uuid/0c2b348d-e013-482b-a91c-029640ec42 7a... [DEPEND] Dependency failed for var-lib.mount - /var/lib. [...] [ TIME ] Timed out waiting for device dev-d…499e46-b40d-4067-afd4-5f6ad09fcff2. [DEPEND] Dependency failed for boot.mount - /boot. That corresponds to fstab's: - UUID=8b499e46-b40d-4067-afd4-5f6ad09fcff2 /boot xfs defaults 0 0 - UUID=0c2b348d-e013-482b-a91c-029640ec427a /var/lib/ xfs defaults 0 0 It looks like disk controller initialization happens in *parallel* on these newer kernels as dmesg shows init printk's overlapping: [ 5.683393] scsi 5:0:0:0: Direct-Access ATA SAMSUNG MZ7KM120 003Q PQ: 0 ANSI: 5 [ 5.683641] scsi 7:0:0:0: Direct-Access ATA SAMSUNG MZ7KM120 003Q PQ: 0 ANSI: 5 [ 5.683797] scsi 8:0:0:0: Direct-Access ATA Samsung SSD 840 BB0Q PQ: 0 ANSI: 5 [...] [ 7.057376] sd 5:0:0:0: [sda] 234441648 512-byte logical blocks: (120 GB/112 GiB) [ 7.062279] sd 7:0:0:0: [sdb] 234441648 512-byte logical blocks: (120 GB/112 GiB) [ 7.070628] sd 5:0:0:0: [sda] Write Protect is off [ 7.070701] sd 8:0:0:0: [sdc] 488397168 512-byte logical blocks: (250 GB/233 GiB) Perhaps this could be a hint to what changed?
See above. The disk /dev/sdX names not being reliable is rather normal. Are you sure you have the correct UUIDs of your FSes on the disks ? You can check them with "blkid /dev/sdX[n]"
Any hints what commit I should try to test revert? Or good starting point for bisecting?
You said that 6.10 works, so maybe start from there ? -- Damien Le Moal Western Digital Research