[PVE-User] Unused Disk Remove vs Detach SOLVED

JR Richardson jmr.richardson at gmail.com
Sat Jan 23 17:07:26 CET 2021

* JR Richardson <jmr.richardson at gmail.com> [210115 17:57]:
> I'm running PVE 6.2.11, I have VMs with Disks on NFS shared storage. I
> moved disks to other storage nodes but did not choose to delete the
> old disk, so the old disk is still assigned to the VM in hardware as
> 'Unused Disk 0'. When I select the disk, the 'Detach' button changes
> to 'Remove'. I remember in older versions of PVE, you could just
> 'Detach' disks instead of removing them. Is this due to the old
> storage node is still on-line? If I shutdown the old storage node,
> would I get the option to Detach Unused Disks?

I can only speculate, but essentially, completely detached disks are
invisible to PVE. I believe, on subsequent actions - like disk
moves, VM migrations, ... - the disk "numbers" can be reused. If
there's such an old disk around, the operation might either fail or
the disk might be silently overwritten.

>From this PoV, I would strongly recommend against fully detaching
disks from VMs.

> Can I get around this via command line utility to detach the old disk?

You can edit the VM definition file and remove the unusedN: line.


Hi Chris, I removed the unused disk from the VM.conf file and that
immediately removed it from the GUI. I shut down the storage node and kept
all my disks intact without errors.



JR Richardson
Engineering for the Masses
Chasing the Azeotrope
JRx DistillCo
1'st Place Brisket
1'st Place Chili

More information about the pve-user mailing list