Bug 216096 - Randomly unable to boot the system, can't find partition because of "globally duplicate IDs for nsid 1"
Summary: Randomly unable to boot the system, can't find partition because of "globally...
Status: RESOLVED CODE_FIX
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: NVMe (show other bugs)
Hardware: All Linux
: P1 blocking
Assignee: IO/NVME Virtual Default Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-08 23:53 UTC by me
Modified: 2022-06-18 14:44 UTC (History)
3 users (show)

See Also:
Kernel Version: 5.19
Subsystem:
Regression: No
Bisected commit-id:


Attachments
nvme fix (651 bytes, patch)
2022-06-08 23:53 UTC, me
Details | Diff

Description me 2022-06-08 23:53:26 UTC
Created attachment 301130 [details]
nvme fix

I have to NVMe (PCIe) SSDs that are the same model and firmware in a dual boot.

I saw the breaking changes in Linux 5.18. If the first checked drive is the linux one the system boot but I don't see the other drive. Otherwise I can't boot at all and I have to reboot until I got the first situation.

Informations here:

# lsblk

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    1     0B  0 disk 
sdb           8:16   1     0B  0 disk 
nvme0n1     259:0    0 476.9G  0 disk 
|-nvme0n1p1 259:1    0   500M  0 part /boot
`-nvme0n1p2 259:2    0 476.5G  0 part /var/lib/docker/btrfs
                                      /

# dmesg | grep -i nvme

[    4.104157] nvme 0000:02:00.0: platform quirk: setting simple suspend
[    4.104206] nvme nvme0: pci function 0000:02:00.0
[    4.104561] nvme 0000:03:00.0: platform quirk: setting simple suspend
[    4.104602] nvme nvme1: pci function 0000:03:00.0
[    4.116423] nvme nvme0: missing or invalid SUBNQN field.
[    4.116423] nvme nvme1: missing or invalid SUBNQN field.
[    4.126137] nvme nvme0: allocated 64 MiB host memory buffer.
[    4.126142] nvme nvme1: allocated 64 MiB host memory buffer.
[    4.139874] nvme nvme0: 8/0/0 default/read/poll queues
[    4.140015] nvme nvme1: 8/0/0 default/read/poll queues
[    4.143458] nvme nvme1: globally duplicate IDs for nsid 1
[    4.144888]  nvme0n1: p1 p2
[    4.272761] BTRFS: device label root devid 1 transid 2086 /dev/nvme0n1p2 scanned by systemd-udevd (249)
[    4.371900] BTRFS info (device nvme0n1p2): flagging fs with big metadata feature
[    4.371908] BTRFS info (device nvme0n1p2): using free space tree
[    4.371912] BTRFS info (device nvme0n1p2): has skinny extents
[    4.382591] BTRFS info (device nvme0n1p2): enabling ssd optimizations
[    4.593650] BTRFS info (device nvme0n1p2: state M): using free space tree

I tried to patch the kernel and recompile it with the allegated patch and it works.

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
nvme1n1     259:0    0 476.9G  0 disk 
|-nvme1n1p1 259:2    0   100M  0 part 
|-nvme1n1p2 259:3    0    16M  0 part 
|-nvme1n1p3 259:4    0 476.3G  0 part 
`-nvme1n1p4 259:5    0   575M  0 part 
nvme0n1     259:1    0 476.9G  0 disk 
|-nvme0n1p1 259:6    0   500M  0 part /boot
`-nvme0n1p2 259:7    0 476.5G  0 part /var/lib/docker/btrfs
                                      /

Thanks in advance
Comment 1 Keith Busch 2022-06-09 14:05:29 UTC
Do you want to send this patch to the mailing list for inclusion? We can get it staged for the next release candidate, and it will port to stable from there.
Comment 2 me 2022-06-14 16:54:52 UTC
Sorry but I am busy in this period.
I have to follow this steps, right?
https://www.kernel.org/doc/html/v4.17/process/submitting-patches.html
Comment 3 Keith Busch 2022-06-14 17:00:45 UTC
Don't worry about it, there was a flurry of vendor issues just like this one, so I sent them all for the next 5.19-rc in a single go.
Comment 4 me 2022-06-14 17:08:35 UTC
So I don't have to do that, thank you.
Comment 5 Keith Busch 2022-06-14 17:26:31 UTC
If you are able to close the bug, that would be appreciated. I don't seem to have permissions to do that here. The fix is staged in this tree, if you're interested

http://git.infradead.org/nvme.git/commitdiff/c98a879312caf775c9768faed25ce1c013b4df04?hp=2cf7a77ed5f8903606f4f7833d02d67b08650442
Comment 6 me 2022-06-14 23:34:36 UTC
Of course, thank you.

Note You need to log in before you can comment on or make changes to this bug.