local Storage full - can I remove a vz image?

Lameth

New Member
Dec 4, 2024
5
0
1
Hi everyone,

I'm a complete newbie to proxmox. I started installing a little cluster on a small N100 mini-PC few weeks ago and I'm tinkering with it.
I noticed today that my local storage is completely full and I read here it was something to avoid completely.

After investigation it is located in the /var/lib/vz/images folder and it is a VM I created, allocating 100GB to it during creation.
I also see that 2 snapshots I did are located there (see screenshots).

What is the best strategy to reclaim my space? Just deleting the initial vm-201-disk.qcow2? But would it impact the Snapshots if I want to rollback (basically does the vm-201-disk.qcow2 is needed for snapshots and backup) ?

Also maybe I did something wrong during creation of the VM by allocating 100GB? I made a mistake at first, putting the VM on local and later on I did move it to local-lvm like it is supposed to be, could it be that the VM was copied onto local-lvm and not moved?
Therefore is there a way to repair my former mistake, like cloning the VM in order to not loose my entire setup and at the same time allocate less space?

Thanks for the help.
 

Attachments

  • Screenshot from 2024-12-04 09-03-40.png
    Screenshot from 2024-12-04 09-03-40.png
    41.5 KB · Views: 6
  • Screenshot from 2024-12-04 09-45-17.png
    Screenshot from 2024-12-04 09-45-17.png
    10 KB · Views: 6
Hi,
please post the output of cat /etc/pve/qemu-server/201.conf. The disk might still be referenced by a snapshot or the current configuration, so please do not remove it yet!
 
If you have enough free storage somewhere else (and setup as storage), you can move an "oversized" disk to another storage via the Hardware option by selecting the disk and then choose DiskAction and Move Storage.
 
Hi,
please post the output of cat /etc/pve/qemu-server/201.conf. The disk might still be referenced by a snapshot or the current configuration, so please do not remove it yet!
Here it is.
Part 1:
Screenshot from 2024-12-04 12-49-19.png

Part 2:
Screenshot from 2024-12-04 12-49-42.png
 
If you have enough free storage somewhere else (and setup as storage), you can move an "oversized" disk to another storage via the Hardware option by selecting the disk and then choose DiskAction and Move Storage.
Good to know, so in theory I could assign local to another disk? I did move the VM to local-lvm when I noticed i installed it on local and not local-lvm.
 
Both snapshots reference the old volume. So if you delete it, you cannot rollback to these snapshots. There is currently no mechanism to move volumes referenced in a snapshot to another storage (EDIT: at least no safe way. You could move the volumes and update the references manually as a last resort, but do so at your own risk!). If you do not need the snapshots anymore, the old volume should be removed automatically too when you delete the snapshots.
 
Last edited:
I see.

If I do a snapshot now, it will be referenced to the new volume?

If it is the case I guess I could do a snapshot now (let's call it #3), then rollback to each old snapshot to redo them on the new volume and then rollback to snapshot #3 to get back to my current state.

Afterward, I'll have to remove all the old snapshots to remove the 100GB old disk and reclaim my space.

Would that work?
 
If I do a snapshot now, it will be referenced to the new volume?
Yes
If it is the case I guess I could do a snapshot now (let's call it #3), then rollback to each old snapshot to redo them on the new volume and then rollback to snapshot #3 to get back to my current state.
After the rollback, the old volume will be the primary volume again and the new volume be present as unused. So you cannot redo the snapshot on the new volume unfortunately. You could still move the volume to a different storage after rollback to one of the snapshots, but then you'll end up with another copy of it, because it is still referenced by the other snapshot.
 
Yes

After the rollback, the old volume will be the primary volume again and the new volume be present as unused. So you cannot redo the snapshot on the new volume unfortunately. You could still move the volume to a different storage after rollback to one of the snapshots, but then you'll end up with another copy of it, because it is still referenced by the other snapshot.
Well, I thought I outsmarted the system, but of course I did not.
:p

I'll remove the old snapshots, as I need to get back this space. If I do a new snapshot now, we agree that it will reference the new volume, isn't it? At least I can do that. I won't have my fresh snapshot right after install, that's all.