[PVE-User] Unused Disk Remove vs Detach

Chris Hofstaedtler | Deduktiva chris.hofstaedtler at deduktiva.com
Fri Jan 15 18:46:18 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.

Best,
Chris

-- 
Chris Hofstaedtler / Deduktiva GmbH (FN 418592 b, HG Wien)
www.deduktiva.com / +43 1 353 1707




More information about the pve-user mailing list