On a machine where the WWN is duplicate, there will only exists links for one of the disks:
```
$ ls -l /dev/disk/by-id/* | grep 502b2a201d1c1b1a
lrwxrwxrwx 1 root root 9 Jan 20 12:49 /dev/disk/by-id/scsi-3502b2a201d1c1b1a -> ../../sdb
lrwxrwxrwx 1 root root 10 Jan 20 12:49 /dev/disk/by-id/scsi-3502b2a201d1c1b1a-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Jan 20 12:49 /dev/disk/by-id/scsi-3502b2a201d1c1b1a-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 9 Jan 20 12:49 /dev/disk/by-id/wwn-0x502b2a201d1c1b1a -> ../../sdb
lrwxrwxrwx 1 root root 10 Jan 20 12:49 /dev/disk/by-id/wwn-0x502b2a201d1c1b1a-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Jan 20 12:49 /dev/disk/by-id/wwn-0x502b2a201d1c1b1a-part2 -> ../../sdb2
```
So this can not be used to detect the duplication.
And some additional information, curtin seems to look up stuff in /dev/disk/by-id/ in its lookup_disk(serial) function: https:/ /github. com/canonical/ curtin/ blob/b08eecd68c f5f1bccf4255b3d 00a77af51c159f7 /curtin/ block/_ _init__ .py#L921- L924
On a machine where the WWN is duplicate, there will only exists links for one of the disks: by-id/scsi- 3502b2a201d1c1b 1a -> ../../sdb by-id/scsi- 3502b2a201d1c1b 1a-part1 -> ../../sdb1 by-id/scsi- 3502b2a201d1c1b 1a-part2 -> ../../sdb2 by-id/wwn- 0x502b2a201d1c1 b1a -> ../../sdb by-id/wwn- 0x502b2a201d1c1 b1a-part1 -> ../../sdb1 by-id/wwn- 0x502b2a201d1c1 b1a-part2 -> ../../sdb2
```
$ ls -l /dev/disk/by-id/* | grep 502b2a201d1c1b1a
lrwxrwxrwx 1 root root 9 Jan 20 12:49 /dev/disk/
lrwxrwxrwx 1 root root 10 Jan 20 12:49 /dev/disk/
lrwxrwxrwx 1 root root 10 Jan 20 12:49 /dev/disk/
lrwxrwxrwx 1 root root 9 Jan 20 12:49 /dev/disk/
lrwxrwxrwx 1 root root 10 Jan 20 12:49 /dev/disk/
lrwxrwxrwx 1 root root 10 Jan 20 12:49 /dev/disk/
```
So this can not be used to detect the duplication.