Hello,
I have problems with various VMS that seems do not release unused space.
Here is the VM Config:
Here is the fstab:
Here is the LVM config:
Here is the Filesystem free disk space:
I've also issued fstrim manually after poweroff/poweron the VM:
But when I investigate du on ceph, it syas that the VM disk is the full 32GB hdd size:
What am I missing ?
I have problems with various VMS that seems do not release unused space.
Here is the VM Config:
agent: 1,fstrim_cloned_disks=1
boot: order=ide2;scsi0
cores: 2
ide2: none,media=cdrom
memory: 4096
meta: creation-qemu=7.2.0,ctime=1711617679
name: CRODC05
net0: virtio=22:9F:25:F3:22:96,bridge=vmbr0
numa: 0
onboot: 1
ostype: l26
scsi0: CRO-CEPH-SSD:vm-105-disk-0,aio=threads,cache=writeback,discard=on,iothread=1,size=32G,ssd=1
scsihw: virtio-scsi-pci
smbios1: uuid=fe50e879-9b53-4bb0-aa61-78c583d98000
sockets: 1
vmgenid: 1f92ae2c-0125-4cf8-a3c4-5f72e423a433
boot: order=ide2;scsi0
cores: 2
ide2: none,media=cdrom
memory: 4096
meta: creation-qemu=7.2.0,ctime=1711617679
name: CRODC05
net0: virtio=22:9F:25:F3:22:96,bridge=vmbr0
numa: 0
onboot: 1
ostype: l26
scsi0: CRO-CEPH-SSD:vm-105-disk-0,aio=threads,cache=writeback,discard=on,iothread=1,size=32G,ssd=1
scsihw: virtio-scsi-pci
smbios1: uuid=fe50e879-9b53-4bb0-aa61-78c583d98000
sockets: 1
vmgenid: 1f92ae2c-0125-4cf8-a3c4-5f72e423a433
# cat /etc/fstab | grep ext4
/dev/mapper/sys-root / ext4 discard,errors=remount-ro 0 1
UUID=5a77d9ea-9fc8-4ee2-9391-3429084d0f3d /boot ext4 discard,defaults 0 2
/dev/mapper/sys-root / ext4 discard,errors=remount-ro 0 1
UUID=5a77d9ea-9fc8-4ee2-9391-3429084d0f3d /boot ext4 discard,defaults 0 2
Here is the LVM config:
# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 sys lvm2 a-- <31.07g <16.17g
# vgs
VG #PV #LV #SN Attr VSize VFree
sys 1 1 0 wz--n- <31.07g <16.17g
# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root sys -wi-ao---- <14.90g
# cat /etc/lvm/lvm.conf | grep issue_discards
# Configuration option devices/issue_discards.
issue_discards = 1
PV VG Fmt Attr PSize PFree
/dev/sda2 sys lvm2 a-- <31.07g <16.17g
# vgs
VG #PV #LV #SN Attr VSize VFree
sys 1 1 0 wz--n- <31.07g <16.17g
# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root sys -wi-ao---- <14.90g
# cat /etc/lvm/lvm.conf | grep issue_discards
# Configuration option devices/issue_discards.
issue_discards = 1
Here is the Filesystem free disk space:
# df -h -t ext4
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/sys-root 15G 3.2G 11G 23% /
/dev/sda1 920M 108M 749M 13% /boot
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/sys-root 15G 3.2G 11G 23% /
/dev/sda1 920M 108M 749M 13% /boot
I've also issued fstrim manually after poweroff/poweron the VM:
# fstrim -av
/boot: 812.6 MiB (852033536 bytes) trimmed on /dev/sda1
/: 11.4 GiB (12247777280 bytes) trimmed on /dev/mapper/sys-root
# fstrim -av
/boot: 0 B (0 bytes) trimmed on /dev/sda1
/: 0 B (0 bytes) trimmed on /dev/mapper/sys-root
/boot: 812.6 MiB (852033536 bytes) trimmed on /dev/sda1
/: 11.4 GiB (12247777280 bytes) trimmed on /dev/mapper/sys-root
# fstrim -av
/boot: 0 B (0 bytes) trimmed on /dev/sda1
/: 0 B (0 bytes) trimmed on /dev/mapper/sys-root
But when I investigate du on ceph, it syas that the VM disk is the full 32GB hdd size:
# rbd du -p rbd_ssd vm-105-disk-0
NAME PROVISIONED USED
vm-105-disk-0 32 GiB 32 GiB
NAME PROVISIONED USED
vm-105-disk-0 32 GiB 32 GiB
What am I missing ?