nsid 的全局重复 ID

nsid 的全局重复 ID

我使用的是 Arch Linux,并且使用两个相同的固态硬盘(ADATA Swordfish 1 TB M.2 NVMe SSD)。自五月或六月以来,更新后我无法启动进入系统(由于我的设置,我需要两个 SSD 来启动)。 Journalctl 列出了一个错误:

nvme nvme0:nsid 1 的全局重复 ID

lsblk仅列出一个 SSD。有没有办法可以将我的两个 SSD 与最新版本的 Arch Linux 一起使用?

编辑1:
当我使用 arch iso“archlinux-2022.05.01-x86_64”作为实时 USB 时,我没有收到错误消息“nvme nvme0:nsid 1 的全局重复 ID”,一切都按预期工作。
当我使用“archlinux-2022.06.01-x86_64”时,我收到错误消息。

编辑2:
使用“archlinux-2022.06.01-x86_64”iso 的日志:

分开-l

Model: ELECOM MF-PKU3 (scsi)
Disk /dev/sda: 31.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  20.3GB  20.3GB  primary  fat32        boot, lba
 2      20.3GB  31.0GB  10.7GB  primary  ext3


Model: ADATA SWORDFISH (nvme)
Disk /dev/nvme1n1: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  538MB   537MB   ext4         boot
 2      538MB   1000GB  1000GB               root  

lsblk-a

NAME        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
loop0         7:0    0 688.2M  1 loop  
sda           8:0    1  28.9G  0 disk  
|-sda1        8:1    1  18.9G  0 part  
`-sda2        8:2    1    10G  0 part  /usb_data
nvme1n1     259:0    0 931.5G  0 disk  
|-nvme1n1p1 259:1    0   512M  0 part  
`-nvme1n1p2 259:2    0   931G  0 part  
  `-myData  254:0    0   931G  0 crypt /

ls -l /dev/disk/by-id/

total 0
lrwxrwxrwx 1 root root 10 Jul 30 13:24 dm-name-myData -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jul 30 13:24 dm-uuid-CRYPT-LUKS2-6dc7a196d80a42c392ca7cb680087d9b-myData -> ../../dm-0
lrwxrwxrwx 1 root root 13 Jul 30 13:27 nvme-ADATA_SWORDFISH_2K38291A16EC -> ../../nvme1n1
lrwxrwxrwx 1 root root 15 Jul 30 13:27 nvme-ADATA_SWORDFISH_2K38291A16EC-part1 -> ../../nvme1n1p1
lrwxrwxrwx 1 root root 15 Jul 30 13:27 nvme-ADATA_SWORDFISH_2K38291A16EC-part2 -> ../../nvme1n1p2
lrwxrwxrwx 1 root root 13 Jul 30 13:27 nvme-eui.00000000010000004ce00018dd8c9084 -> ../../nvme1n1
lrwxrwxrwx 1 root root 15 Jul 30 13:27 nvme-eui.00000000010000004ce00018dd8c9084-part1 -> ../../nvme1n1p1
lrwxrwxrwx 1 root root 15 Jul 30 13:27 nvme-eui.00000000010000004ce00018dd8c9084-part2 -> ../../nvme1n1p2
lrwxrwxrwx 1 root root  9 Jul 30 13:27 usb-ELECOM_MF-PKU3_070825BA33A08E37-0:0 -> ../../sda
lrwxrwxrwx 1 root root 10 Jul 30 13:27 usb-ELECOM_MF-PKU3_070825BA33A08E37-0:0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jul 30 13:27 usb-ELECOM_MF-PKU3_070825BA33A08E37-0:0-part2 -> ../../sda2

编辑3:
使用“archlinux-2022.05.01-x86_64”iso 的日志:

分开-l

Model: ELECOM MF-PKU3 (scsi)
Disk /dev/sda: 31.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  20.3GB  20.3GB  primary  fat32        boot, lba
 2      20.3GB  31.0GB  10.7GB  primary  ext3


Model: ADATA SWORDFISH (nvme)
Disk /dev/nvme0n1: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                          Flags
 1      1049kB  106MB   105MB   fat32        EFI system partition          boot, esp
 2      106MB   123MB   16.8MB               Microsoft reserved partition  msftres
 3      123MB   1000GB  1000GB               Basic data partition          msftdata
 4      1000GB  1000GB  540MB   ntfs                                       hidden, diag


Model: ADATA SWORDFISH (nvme)
Disk /dev/nvme1n1: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  538MB   537MB   ext4         boot
 2      538MB   1000GB  1000GB               root

lsblk-a

NAME        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
loop0         7:0    0 669.2M  1 loop  
sda           8:0    1  28.9G  0 disk  
|-sda1        8:1    1  18.9G  0 part  
`-sda2        8:2    1    10G  0 part  /usb_data
nvme1n1     259:0    0 931.5G  0 disk  
|-nvme1n1p1 259:8    0   512M  0 part  
`-nvme1n1p2 259:9    0   931G  0 part  
  `-myData  254:0    0   931G  0 crypt /
nvme0n1     259:3    0 931.5G  0 disk  
|-nvme0n1p1 259:4    0   100M  0 part  
|-nvme0n1p2 259:5    0    16M  0 part  
|-nvme0n1p3 259:6    0 930.9G  0 part  
`-nvme0n1p4 259:7    0   515M  0 part  

ls -l /dev/disk/by-id/

total 0
lrwxrwxrwx 1 root root 10 Jul 30 15:03 dm-name-myData -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jul 30 15:03 dm-uuid-CRYPT-LUKS2-6dc7a196d80a42c392ca7cb680087d9b-myData -> ../../dm-0
lrwxrwxrwx 1 root root 13 Jul 30 15:04 nvme-ADATA_SWORDFISH_2K38291A16EC -> ../../nvme1n1
lrwxrwxrwx 1 root root 15 Jul 30 15:04 nvme-ADATA_SWORDFISH_2K38291A16EC-part1 -> ../../nvme1n1p1
lrwxrwxrwx 1 root root 15 Jul 30 15:04 nvme-ADATA_SWORDFISH_2K38291A16EC-part2 -> ../../nvme1n1p2
lrwxrwxrwx 1 root root 13 Jul 30 15:04 nvme-ADATA_SWORDFISH_2K382LAAQAWP -> ../../nvme0n1
lrwxrwxrwx 1 root root 15 Jul 30 15:04 nvme-ADATA_SWORDFISH_2K382LAAQAWP-part1 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 Jul 30 15:04 nvme-ADATA_SWORDFISH_2K382LAAQAWP-part2 -> ../../nvme0n1p2
lrwxrwxrwx 1 root root 15 Jul 30 15:04 nvme-ADATA_SWORDFISH_2K382LAAQAWP-part3 -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 15 Jul 30 15:04 nvme-ADATA_SWORDFISH_2K382LAAQAWP-part4 -> ../../nvme0n1p4
lrwxrwxrwx 1 root root 13 Jul 30 15:04 nvme-eui.00000000010000004ce00018dd8c9084 -> ../../nvme1n1
lrwxrwxrwx 1 root root 15 Jul 30 15:04 nvme-eui.00000000010000004ce00018dd8c9084-part1 -> ../../nvme1n1p1
lrwxrwxrwx 1 root root 15 Jul 30 15:04 nvme-eui.00000000010000004ce00018dd8c9084-part2 -> ../../nvme1n1p2
lrwxrwxrwx 1 root root 15 Jul 30 15:04 nvme-eui.00000000010000004ce00018dd8c9084-part3 -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 15 Jul 30 15:04 nvme-eui.00000000010000004ce00018dd8c9084-part4 -> ../../nvme0n1p4
lrwxrwxrwx 1 root root  9 Jul 30 15:04 usb-ELECOM_MF-PKU3_070825BA33A08E37-0:0 -> ../../sda
lrwxrwxrwx 1 root root 10 Jul 30 15:04 usb-ELECOM_MF-PKU3_070825BA33A08E37-0:0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jul 30 15:04 usb-ELECOM_MF-PKU3_070825BA33A08E37-0:0-part2 -> ../../sda2

编辑4:

lspci-nn-d::0108

04:00.0 Non-Volatile memory controller [0108]: Realtek Semiconductor Co., Ltd. Device [10ec:5763] (rev 01)
05:00.0 Non-Volatile memory controller [0108]: Realtek Semiconductor Co., Ltd. Device [10ec:5763] (rev 01)

答案1

lrwxrwxrwx 1 root root 13 Jul 30 15:04 nvme-eui.00000000010000004ce00018dd8c9084 -> ../../nvme1n1
lrwxrwxrwx 1 root root 15 Jul 30 15:04 nvme-eui.00000000010000004ce00018dd8c9084-part1 -> ../../nvme1n1p1
lrwxrwxrwx 1 root root 15 Jul 30 15:04 nvme-eui.00000000010000004ce00018dd8c9084-part2 -> ../../nvme1n1p2
lrwxrwxrwx 1 root root 15 Jul 30 15:04 nvme-eui.00000000010000004ce00018dd8c9084-part3 -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 15 Jul 30 15:04 nvme-eui.00000000010000004ce00018dd8c9084-part4 -> ../../nvme0n1p4

这似乎表明您的两个 NVMe 驱动器在其第一个(也可能是唯一的)命名空间上具有相同的 EUI 值。/dev/disk/by-id/nvme-eui.*的链接已nvme0n1被 的相应链接覆盖,因此仅保留分区和nvme1n1的链接,因为没有这些分区。nvme0n1p3nvme0n1p4nvme1n1

显然,至少其他一些 ADATA NVMe 型号也存在同样的问题。

nvme-pci:为 ADATA XPG SX6000LNP(又名 SPECTRIX S40G)添加 NVME_QUIRK_BOGUS_NID

ADATA XPG SPECTRIX S40G 硬盘报告伪造的 eui64 值,这些值在一个系统中的各个硬盘上似乎都相同。修改它们,这样它们就不会被标记为“非全局唯一”重复项。

如果您可以构建自己的自定义内核,则可以轻松添加类似于上面链接的补丁的怪异条目:您只需使用lspci -nn来找出 ADATA Swordfish NVMe 的 PCI 供应商:产品 ID,然后添加像这样进入怪癖列表<kernel source>/drivers/nvme/host/pci.c

{ PCI_DEVICE(0x<vendor ID>, 0x<product ID>),   /* ADATA Swordfish 1 TB */
    .driver_data = NVME_QUIRK_BOGUS_NID, },

检查重复 ID 已于 2022 年 2 月 28 日添加到上游内核,修改为2022-03-29 允许非唯一的私有命名空间并拥有2022年4月15日添加NVME_QUIRK_BOGUS_NID怪异机制

相关内容