最近,我注意到我的 NVME 驱动器中有额外的符号链接/dev/disk/by-id
,并且重复项具有相同的名称并_1
附加了名称。
# ls -lF /dev/disk/by-id/nvme-Samsung_SSD_970_EVO_500GB_S466XXXXXXXXXXW{,_1}
lrwxrwxrwx 1 root root 13 Jul 29 19:22 /dev/disk/by-id/nvme-Samsung_SSD_970_EVO_500GB_S466XXXXXXXXXXW -> ../../nvme0n1
lrwxrwxrwx 1 root root 13 Jul 29 19:22 /dev/disk/by-id/nvme-Samsung_SSD_970_EVO_500GB_S466XXXXXXXXXXW_1 -> ../../nvme0n1
(序列号无特殊原因大部分被编辑为 XXXXXXXX)
它还会复制 NVME 驱动器上所有分区的条目:
$ ls -lF /dev/disk/by-id/nvme-Samsung_SSD_970_EVO_500GB_S466XXXXXXXXXXW_1*-part*'
lrwxrwxrwx 1 root root 15 Jul 29 19:22 /dev/disk/by-id/nvme-Samsung_SSD_970_EVO_500GB_S466XXXXXXXXXXW_1-part1 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 Jul 29 19:22 /dev/disk/by-id/nvme-Samsung_SSD_970_EVO_500GB_S466XXXXXXXXXXW_1-part2 -> ../../nvme0n1p2
lrwxrwxrwx 1 root root 15 Jul 29 19:22 /dev/disk/by-id/nvme-Samsung_SSD_970_EVO_500GB_S466XXXXXXXXXXW_1-part3 -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 15 Jul 29 19:22 /dev/disk/by-id/nvme-Samsung_SSD_970_EVO_500GB_S466XXXXXXXXXXW_1-part4 -> ../../nvme0n1p4
lrwxrwxrwx 1 root root 15 Jul 29 19:22 /dev/disk/by-id/nvme-Samsung_SSD_970_EVO_500GB_S466XXXXXXXXXXW_1-part5 -> ../../nvme0n1p5
lrwxrwxrwx 1 root root 15 Jul 29 19:22 /dev/disk/by-id/nvme-Samsung_SSD_970_EVO_500GB_S466XXXXXXXXXXW_1-part6 -> ../../nvme0n1p6
lrwxrwxrwx 1 root root 15 Jul 29 19:22 /dev/disk/by-id/nvme-Samsung_SSD_970_EVO_500GB_S466XXXXXXXXXXW_1-part7 -> ../../nvme0n1p7
这只发生在我的 NVME 驱动器上,而不发生在我的 SATA 或 USB 闪存驱动器上。
我看不出有任何明显的东西/usr/lib/udev/rules.d/60-persistent-storage.rules
可以做到这一点。
有谁知道为什么udev
这样做?更重要的是,如何阻止它?