I can't delete disks after removing a VM.

Edy Willian

Member
May 26, 2022
3
0
6
I have the following scenario:
I have a two-node cluster and mounted a GlusterFS on a VMS folder, which is where I store the VMs and their disks. I have two VMs, VM100 and VM101. This morning, VM100 crashed. I tried several fixes, but to no avail. Finally, I created a PBS and restored a backup of VM100. However, I wasn't careful and didn't delete the disks from VM100, so the Proxmox disk became full. I deleted VM100 and can't delete the disks. How do I delete the disks I don't need? See the screenshots for a better understanding:


1752356960722.png

1752357051120.png



More information below:

pve1:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 16G 0 16G 0% /dev
tmpfs 3.2G 1.2M 3.2G 1% /run
rpool/ROOT/pve-1 13G 8.4G 4.3G 67% /
tmpfs 16G 66M 16G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
rpool 891G 887G 4.3G 100% /rpool
rpool/ROOT 4.3G 128K 4.3G 1% /rpool/ROOT
rpool/data 4.3G 128K 4.3G 1% /rpool/data
pve1:VMS 891G 891G 0 100% /vms
/dev/fuse 128M 24K 128M 1% /etc/pve
tmpfs 3.2G 0 3.2G 0% /executar/usuário/0

pve1:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 1007K 0 part
├─sda2 8:2 0 512M 0 part
└─sda3 8:3 0 931G 0 part
sdb 8:16 0 931.5G 0 disk
├─sdb1 8:17 0 1007K 0 part
├─sdb2 8:18 0 512M 0 part
└─sdb3 8:19 0 931G 0 part
sr0 11:0 1 1024M 0 rom

pve1:~# cat /etc/pve/storage.cfg
dir: local
path /var/lib/vz
content iso,backup,images,vztmpl
shared 0

dir: VMS
path /vms
content images
prune-backups keep-all=1
compartilhado 1
 
Thanks for replying!
To delete the excess disks, I had to go into the rpool/vms/images/100 folder. In this folder, I left only the vm-100-disk-1.qcow2 disk, but this partition still appears full! Using the "qcow2" system, I created this disk with a size of 500GB, but when used, it only has 2GB (as shown in the screenshot below), and the partition still says it's full.
Remember, I have another VM101 with a 280GB disk (which also has little space when used).
My question is, should this VMS partition appear full?

1752420380343.png

1752420435872.png



1752420444361.png


Another question: why can't I delete the disk using the GUI?

1752420777626.png
 
Another question: why can't I delete the disk using the GUI?
You are using a cow fs and so you need free space on the fs to delete which isn't enough free for yet.
cat /sys/module/zfs/parameters/spa_slop_shift # maybe is 5 or 3
echo 2 > /sys/module/zfs/parameters/spa_slop_shift
Remove unneeded qcow2 file in /vms pool AND then set back the zfs parameter to orig value !!
 
Last edited:
  • Like
Reactions: UdoB