On Wed, Dec 2, 2020 at 10:27 AM Joy Li <joooy.li(a)gmail.com> wrote:
Hi All,
I'm facing the problem that after adding disks to guest VM, the device target path
changed (My ovirt version is 4.3). For example:
Before adding a disk:
virsh # domblklist <vmname>
Target Source
---------------------------------------------------------
hdc -
vda /dev/mapper/3600a09803830386546244a546d494f53
vdb /dev/mapper/3600a09803830386546244a546d494f54
vdc /dev/mapper/3600a09803830386546244a546d494f55
vdd /dev/mapper/3600a09803830386546244a546d494f56
vde /dev/mapper/3600a09803830386546244a546d494f57
vdf /dev/mapper/3600a09803830386546244a546d494f58
After adding a disk, and then shutdown and start the VM:
virsh # domblklist <vmname>
Target Source
---------------------------------------------------------
hdc -
vda /dev/mapper/3600a09803830386546244a546d494f53
vdb /dev/mapper/3600a09803830386546244a546d494f54
vdc /dev/mapper/3600a09803830386546244a546d494f6c
vdd /dev/mapper/3600a09803830386546244a546d494f55
vde /dev/mapper/3600a09803830386546244a546d494f56
vdf /dev/mapper/3600a09803830386546244a546d494f57
vdg /dev/mapper/3600a09803830386546244a546d494f58
The devices' multipath doesn't map to the same target path as before, so in my VM
the /dev/vdc doesn't point to the old /dev/mapper/3600a09803830386546244a546d494f55
anymore.
Anybody knows how can I make the device path mapping fixed without being changed after
adding or removing disks.
Device nodes are not stable, and oVirt cannot guarantee that you will
get the same
node in the guest in all runs.
You should use /dev/disk/by-id/xxx links to located devices, and blkid to create
fstab mounts that do not depend on node names.
Regardless, oVirt try to keep devices stable as possible. Do you know
how to reproduce
this issue reliably?
Nir