Hi everyone,
I've got a head scratcher of an issue I've encountered with a Debian VM on a Proxmox server. I have a secondary ZFS pool setup on the Proxmox host using a 1TB SSD. 95% of this is being used to hold a VM disk for extra storage for that Debian VM. I've set the zvol for this VM disk to use ZFS's zstd compression and the VM is running an ext4 filesystem on it. The data the VM is writing is highly compressible which has resulted in a nearly 4x compression ratio.
But the problem is that the VM is not aware of this. So the VM is currently reporting that it has used 174GB/836GB. Whereas ZFS in Proxmox says it has only used 44.2GB. This poses a pretty serious issue as I'm imagining that the VM is eventually going to reach 100% usage and then complain and stop being able to write to the disk. When in reality it's only used 1/4 of the drive.
I've attached screenshots of what the VM reports when running df -h, as well all the ZFS properties of the zvol, and the disk settings in Proxmox. It has discard enabled in the Proxmox disk settings and I've confirmed the VM is running fstrim. How can I make sure the VM is able to use up the whole disk quota assigned to it? Is there a way I can make the VM see the real disk usage and take the ZFS compression into account? Or do I need to somehow trick the VM into thinking the disk is larger than it is?
I've got a head scratcher of an issue I've encountered with a Debian VM on a Proxmox server. I have a secondary ZFS pool setup on the Proxmox host using a 1TB SSD. 95% of this is being used to hold a VM disk for extra storage for that Debian VM. I've set the zvol for this VM disk to use ZFS's zstd compression and the VM is running an ext4 filesystem on it. The data the VM is writing is highly compressible which has resulted in a nearly 4x compression ratio.
But the problem is that the VM is not aware of this. So the VM is currently reporting that it has used 174GB/836GB. Whereas ZFS in Proxmox says it has only used 44.2GB. This poses a pretty serious issue as I'm imagining that the VM is eventually going to reach 100% usage and then complain and stop being able to write to the disk. When in reality it's only used 1/4 of the drive.
I've attached screenshots of what the VM reports when running df -h, as well all the ZFS properties of the zvol, and the disk settings in Proxmox. It has discard enabled in the Proxmox disk settings and I've confirmed the VM is running fstrim. How can I make sure the VM is able to use up the whole disk quota assigned to it? Is there a way I can make the VM see the real disk usage and take the ZFS compression into account? Or do I need to somehow trick the VM into thinking the disk is larger than it is?