Comment 29 for bug 1735839

Dmitrii Shcherbakov (dmitriis) wrote :

Also the resulting udev rules for #28:

for i in `ls -d /etc/udev/rules.d/*` ; do echo $i ; cat $i ; printf '\n\n' ; done
/etc/udev/rules.d/nvme0n1-renamed.rules
# Written by curtin
SUBSYSTEM=="block", ACTION=="add|change", ENV{DEVTYPE}=="disk", ENV{ID_WWN}=="nvme.8086-6e766d656330-51454d55204e564d65204374726c-00000001", ENV{ID_SERIAL}=="QEMU NVMe Ctrl_nvmec0", ENV{ID_SERIAL_SHORT}=="nvmec0", SYMLINK+="disk/by-dname/nvme0n1-renamed"

SUBSYSTEM=="block", ACTION=="add|change", ENV{DEVTYPE}=="partition", ENV{ID_WWN}=="nvme.8086-6e766d656330-51454d55204e564d65204374726c-00000001", ENV{ID_SERIAL}=="QEMU NVMe Ctrl_nvmec0", ENV{ID_SERIAL_SHORT}=="nvmec0", SYMLINK+="disk/by-dname/nvme0n1-renamed-part%n"

/etc/udev/rules.d/nvme1n1-renamed.rules
# Written by curtin
SUBSYSTEM=="block", ACTION=="add|change", ENV{DEVTYPE}=="disk", ENV{ID_WWN}=="nvme.8086-6e766d656331-51454d55204e564d65204374726c-00000001", ENV{ID_SERIAL}=="QEMU NVMe Ctrl_nvmec1", ENV{ID_SERIAL_SHORT}=="nvmec1", SYMLINK+="disk/by-dname/nvme1n1-renamed"

SUBSYSTEM=="block", ACTION=="add|change", ENV{DEVTYPE}=="partition", ENV{ID_WWN}=="nvme.8086-6e766d656331-51454d55204e564d65204374726c-00000001", ENV{ID_SERIAL}=="QEMU NVMe Ctrl_nvmec1", ENV{ID_SERIAL_SHORT}=="nvmec1", SYMLINK+="disk/by-dname/nvme1n1-renamed-part%n"

/etc/udev/rules.d/sda-part1.rules
# Written by curtin
SUBSYSTEM=="block", ACTION=="add|change", ENV{DEVTYPE}=="partition", ENV{ID_PART_ENTRY_UUID}=="31e824cf-01", SYMLINK+="disk/by-dname/sda-part1"

/etc/udev/rules.d/sda.rules
# Written by curtin
SUBSYSTEM=="block", ACTION=="add|change", ENV{DEVTYPE}=="disk", ENV{ID_PART_TABLE_UUID}=="31e824cf", SYMLINK+="disk/by-dname/sda"

SUBSYSTEM=="block", ACTION=="add|change", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-0", ENV{ID_SERIAL_SHORT}=="drive-scsi0-0-0-0", SYMLINK+="disk/by-dname/sda"

SUBSYSTEM=="block", ACTION=="add|change", ENV{DEVTYPE}=="partition", ENV{ID_SERIAL}=="0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-0", ENV{ID_SERIAL_SHORT}=="drive-scsi0-0-0-0", SYMLINK+="disk/by-dname/sda-part%n"

/etc/udev/rules.d/sdb-renamed.rules
# Written by curtin
SUBSYSTEM=="block", ACTION=="add|change", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="0QEMU_QEMU_HARDDISK_disk0", ENV{ID_SERIAL_SHORT}=="disk0", SYMLINK+="disk/by-dname/sdb-renamed"

SUBSYSTEM=="block", ACTION=="add|change", ENV{DEVTYPE}=="partition", ENV{ID_SERIAL}=="0QEMU_QEMU_HARDDISK_disk0", ENV{ID_SERIAL_SHORT}=="disk0", SYMLINK+="disk/by-dname/sdb-renamed-part%n"

/etc/udev/rules.d/sdc-renamed.rules
# Written by curtin
SUBSYSTEM=="block", ACTION=="add|change", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="0QEMU_QEMU_HARDDISK_disk1", ENV{ID_SERIAL_SHORT}=="disk1", SYMLINK+="disk/by-dname/sdc-renamed"

SUBSYSTEM=="block", ACTION=="add|change", ENV{DEVTYPE}=="partition", ENV{ID_SERIAL}=="0QEMU_QEMU_HARDDISK_disk1", ENV{ID_SERIAL_SHORT}=="disk1", SYMLINK+="disk/by-dname/sdc-renamed-part%n"

/etc/udev/rules.d/sdd-renamed.rules
# Written by curtin
SUBSYSTEM=="block", ACTION=="add|change", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="QEMU_HARDDISK_disk4", ENV{ID_SERIAL_SHORT}=="disk4", SYMLINK+="disk/by-dname/sdd-renamed"

SUBSYSTEM=="block", ACTION=="add|change", ENV{DEVTYPE}=="partition", ENV{ID_SERIAL}=="QEMU_HARDDISK_disk4", ENV{ID_SERIAL_SHORT}=="disk4", SYMLINK+="disk/by-dname/sdd-renamed-part%n"

/etc/udev/rules.d/sde-renamed.rules
# Written by curtin
SUBSYSTEM=="block", ACTION=="add|change", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="QEMU_HARDDISK_disk5", ENV{ID_SERIAL_SHORT}=="disk5", SYMLINK+="disk/by-dname/sde-renamed"

SUBSYSTEM=="block", ACTION=="add|change", ENV{DEVTYPE}=="partition", ENV{ID_SERIAL}=="QEMU_HARDDISK_disk5", ENV{ID_SERIAL_SHORT}=="disk5", SYMLINK+="disk/by-dname/sde-renamed-part%n"

/etc/udev/rules.d/vdb-renamed.rules
# Written by curtin
SUBSYSTEM=="block", ACTION=="add|change", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="disk3", SYMLINK+="disk/by-dname/vdb-renamed"

SUBSYSTEM=="block", ACTION=="add|change", ENV{DEVTYPE}=="partition", ENV{ID_SERIAL}=="disk3", SYMLINK+="disk/by-dname/vdb-renamed-part%n"