/dev/disk/by-id missing

I’m currently moving my ubuntu server (And all it’s virtual machines and containers) over to proxmox

Currently I am passing the disk I used for booting from, just to get things working until I migrate everything away from it.

However; Suddenly the following folder seems to be missing /dev/disk/by-id/ can anyone help? My ZFS pool is able to find most of the drives I passed but a couple are missing, and I set them up pointing to by-id

Hi

Those links are created by the rules in /usr/lib/udev/rules.d/ by udev.service.

root@zephir:~# grep -l "disk/by-id" /usr/lib/udev/rules.d/*
/usr/lib/udev/rules.d/56-dm-mpath.rules
/usr/lib/udev/rules.d/56-dm-parts.rules
/usr/lib/udev/rules.d/58-scsi-sg3_symlink.rules
/usr/lib/udev/rules.d/60-persistent-storage-dm.rules
/usr/lib/udev/rules.d/60-persistent-storage.rules
/usr/lib/udev/rules.d/63-md-raid-arrays.rules
/usr/lib/udev/rules.d/69-lvm.rules
root@zephir:~# 

I would check if udev.service is running and/or if there have been recent changes to the rules files.

udev status does give this line multiple times:

Using default interface naming scheme 'v249'

Not sure it is relevant

I get the same files as you with the command listed. I didn’t change any, but maybe booting from a VM instead of physically changed them?

Ah I get it, so you pass through the physical disk to the VM and now the links don’t get created.

I don’t use promox, nor ubuntu, nor passing through physical disks directly, so I can’t compare 1 to 1,
but under the debian VM running via qemu/libvirt on debian host, with RBD image as disk I see that the links in /dev/disk/by-id/ are getting created, but the disk is named vda instead of sda.

Do you see the disk under /sys/class/block ?

Maybe you have to create a custom udev rules file to create the link

you can list some info with udevadm info /sys/class/block/
and then test it with udevadm test

for example I have made some custom unrelated udev.rules

root@zephir:~# cat /etc/udev/rules.d/99-ceph-disk-scheduler.rules 
ACTION=="add|change", SUBSYSTEM=="block", ENV{SCSI_MODEL}=="INTEL_SSDPF21Q40", ATTR{queue/scheduler}="none"
ACTION=="add|change", SUBSYSTEM=="block", ENV{SCSI_MODEL}=="INTEL_SSDPF21Q80", ATTR{queue/scheduler}="none"
ACTION=="add|change", SUBSYSTEM=="block", ENV{SCSI_MODEL}=="ST18000NM000J-2T", ATTR{queue/scheduler}="mq-deadline", ATTR{queue/nr_requests}="256", ATTR{queue/read_ahead_kb}="128", RUN+="/sbin/lvm vgchange --refresh"
ACTION=="add|change", SUBSYSTEM=="block", ENV{SCSI_MODEL}=="WDC_WUH721818AL", ATTR{queue/scheduler}="mq-deadline", ATTR{queue/nr_requests}="256", ATTR{queue/read_ahead_kb}="128", RUN+="/sbin/lvm vgchange --refresh"
ACTION=="add|change", SUBSYSTEM=="block", ENV{SCSI_MODEL}=="ST18000NM004J", ATTR{queue/scheduler}="mq-deadline", ATTR{queue/nr_requests}="256", ATTR{queue/read_ahead_kb}="128", RUN+="/sbin/lvm vgchange --refresh"
root@zephir:~# 

So in your case it probably would be something like
SYMLINK+=“disk/by-id/”