Changing disk ID

psalet

Active Member
Jul 17, 2020
15
2
43
67
HI All,

I just added a iscsi filer storage to a existing VM. After it created the volume it named it the same as the disk that is local to the PV server.
As both disks have the same name I am unable to move the existing disk to the iscsi filer.

1611700348440.png

I know this has happened to someone before so if you would pass on the info how to correct it would be great.
Thanks
 
Hi,
what kind of storages are datastore02 and mpath4_15TB and how are you trying to move the disk? What is the exact error you get? If you want to rename a volume, you need to do it manually (the exact command depends on the storage type) and then edit the VM configuration file and replace the name.
 
Hi Fabian,

Datastore02 is local disk and map4_TB is iscsi storage on a pure filer. I am not getting an error now. My plans are to move the the datastore:vm-602-disk-0 to the pure filer and there is currently a disk named vm-602-disk-0. I just want to prevent future headaches.
I would be renaming the storage area on the pure filer to the next id vm-602-disk-3.

The file I believe I need to change.
/etc/pve/qemu-server/602.conf
and then rename the data on the filer to match.

Thanks
--paul
 
If I understood you correctly, then you don't have to do any renaming manually.
Say you want to move disk ide1 from storage local to storage cifs. Both disks have the name vm-100-disk-0.
Then you just have to use the Move disk button
disks.png

and it will create a full clone of the disk from local to cifs that has the file name automatically adapted (ide1 is now vm-100-disk-1 instead of disk-0).
disks2.png
 
Hi Dominic,

I think I am just going to change the order of what to do.
1. remove that extra partition,
2. move the root drive of the vm on the local datastore: vm-602-disk-0 over to the filer.
3. recreate the extra storage on the filer
4. copy the data over from local datastore:vm-602-disk-1 to the filer
5. remove the old datastore disk.

I know you said to move the data disk, but I think this would solve my issue and I won't have to deal with growing my xfs partition.

Thanks for all the help
--paul
 
  • Like
Reactions: Dominic