[SOLVED] Activate fstrim inside a VM without discard checked : Will it break something ?

cryonie

Member
May 8, 2020
40
6
13
43
Hello,

The question is really what the title says :)
If I activate trim function inside my VM (debian) without discard checked on the VM disk, will it break something in my VM or on my host ?
Or will it just do nothing (not the TRIM at least and not break something) ?

Thank you :)
Cryonie
 
No, it won't break anything.
It just won't do anything.
 
  • Like
Reactions: cryonie
Humm it was clear, but i re-read and i'm confused..
With the discard option : on , this means we don't have to run fstrim inside the vm ?
 
Humm it was clear, but i re-read and i'm confused..
With the discard option : on , this means we don't have to run fstrim inside the vm ?
You have to do both in order for discard to work. And you additionally need to use a protocol like "virtio SCSI" that supports TRIM and and not "IDE" or "virtio block".
 
You have to do both in order for discard to work. And you additionally need to use a protocol like "virtio SCSI" that supports TRIM and and not "IDE" or "virtio block".
.. and the backend storage needs to support it. Just because you checked everything and ran fstrim does not mean that it is actually discarded properly.

This can easily be checked by running your fstrim stuff and backup your machine, then fill the empty space with zeros (e.g. dd if=/dev/zero ...) and backup again.
 
Just to confirm what operation you do exactly ? On Proxmox itself, the fstrim timer is enable and did run every week.
Like over a new xubuntu vm install, it also have the fstrim timer 1 per week enable.
But with running: lsblk -D = that show all 0 , witch is supposed to be different number for a support ..

Also I haven't seen much different with the vm option 'ssd enable'
 

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!