Unable to execute the fstrim for virtual machine

parker0909

Well-Known Member
Aug 5, 2019
82
0
46
36
Hi All,

I would like to execute the fstrim to the cloudlinux 7 vm, but i got below error message. I have confirmed the Qemu-guest-agent already installed properly. May i know any suggestion for this issue? Thank you.


qm agent 100 ping
qm agent 100 fstrim
VM 100 qmp command 'guest-fstrim' failed - got timeout
 
Hi Thomas,

Thank you, i have tried to execute the command. May i confirm we can just execute in the VM as root directly?
/var/tmp: 3.7 GiB (3907903488 bytes) trimmed
/boot: 796.1 MiB (834793472 bytes) trimmed
/: 601.3 GiB (645592993792 bytes) trimmed

real 5m32.876s
user 0m0.012s
sys 1m45.821s

Parker
 
Thank you, i have tried to execute the command. May i confirm we can just execute in the VM as root directly?
yes, that's what I meant, perfect.

/var/tmp: 3.7 GiB (3907903488 bytes) trimmed
/boot: 796.1 MiB (834793472 bytes) trimmed
/: 601.3 GiB (645592993792 bytes) trimmed

real 5m32.876s
user 0m0.012s
sys 1m45.821s
It seems we do not have a special, higher timeout for the fstrim guest command like we have for others that can block for a longer time. So, we should add a higher on per default (~ 5 minutes or so) and additionally allow to override the timeout in general for those guest commands, so that uses with even slower guest can work around the default timeouts.

Can you please open a enhancement request over at https://bugzilla.proxmox.com/ to keep track of this?
 
Thank you. I just got the question a question after fstrim, I checked that the vm should be using around 1TB, but i found that the local-lvm(LVM-Thin) storage using around 1.46 TiB . I not sure why the proxmox storage(local-lvm) usage should not reduce. May i know some further step after fstrim?

Thank you.
Parker


VM Size.png

Proxmox Storage.png
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!