Will renaming one of a VM's disks break anything on Proxmox? (e.g. backups/replication/etc.)

loneboat

Well-Known Member
Jan 17, 2019
39
3
48
35
I have created a zfspool storage on one of my nodes:

Code:
# From /etc/pve/storage.cfg:

zfspool: zfs-data-vols-thick
    pool tank/proxmox/data-vols-thick
    content images
    mountpoint /tank/proxmox/data-vols-thick
    sparse 0

Within this storage, I have created a second disk on vm 114 (scsi1 in the config below):

Code:
# From /etc/pve/qemu-server/114.conf:

scsi0: zfs-vm-disks:vm-114-disk-0,size=256G
scsi1: zfs-data-vols-thick:vm-114-disk-0,size=64G

I intend to create several additional disks on this VM, so I would like to name it something more informative than "vm-114-disk-0". Would it break anything if I renamed the disk, in both zfs (on the host) and in the VM's config file?


Code:
$ zfs rename tank/proxmox/data-vols-thick/vm-114-disk-0 tank/proxmox/data-vols-thick/vm-114-disk-0-foo-bar-baz


Code:
# From /etc/pve/qemu-server/114.conf:

scsi0: zfs-vm-disks:vm-114-disk-0,size=256G
scsi1: zfs-data-vols-thick:vm-114-disk-0-foo-bar-baz,size=64G

This seems to work, and I see the 64GiB block device in the VM:

Code:
root@host:/home/tim# fdisk -l

...

Disk /dev/sdb: 64 GiB, 68719476736 bytes, 134217728 sectors
Disk model: QEMU HARDDISK   
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

My worry though is that this might break some automated process on Proxmox part, such as backups or replication. Anything that might rely on the disk's name following Proxmox' naming conventions.
 
it should not, but you should also be aware that PVE will in many cases not keep that custom name, so it might be better to put such a label somewhere else (e.g., serial or wwn are commonly used for that).
 
PVE will in many cases not keep that custom name

By "not keep", you mean that PVE might revert the name back to the original?

Thanks for the guidance on serial/wwn - I'll look into using those as an alternative.
 
yes, if PVE needs to copy the disk it will usually use the next "free" slot as target, using the regular naming scheme.