[pve-devel] [RFC_V2 manager] Storage: remove guest images in storage contendview

Dietmar Maurer dietmar at proxmox.com
Mon Nov 12 11:15:33 CET 2018


> If an image on storage has not referenced to any guest or
> replication config, we can safely delete it on the GUI.
> Also, if a config exists on another node, we can delete it too.

Only if the image is on local storage ...

> But if an image has a <vmid> encoded in the image name and a guest
> exists in the cluster with this VMID then it must a lost image of the VM.

OK

> In this case, a rescan will add it back to the config.

I would not rescan here - it is too complex (needs to be done inside a worker task).

Also, I would remove the replication config code - simple remove the image
if the user request it.

> This follows the logic of 'qm rescan',
> what assume if an image exists on a node,
> Images that are marked as unused in the config are referred.
> 
> This call can't be in the store because of cycles dependencies.
> The extra Subclass is necessary for the "fragmentDelimiter"
> which is used for forwarding the correct volume name for dir storages.

Without the replication/rescan logic, it should be possible to implement inside
pve-storage - please can you try?




More information about the pve-devel mailing list