fstrim

  1. M

    [TUTORIAL] How to Make Fstrim Run More Often in LXC Containers and Linux VMs + the Host (for GRUB and Systemd Proxmox VE Installations)

    This is a tutorial on how to make fstrim run more often or on days that you wish. This could be handy if you have stuff continuously writing to the drives which then later gets deleted, which would cause it to create a large amount of unused data. For example, I have a Minecraft server running...
  2. T

    Freeing Up Unused Space In A Linux VM That Doesn't Support TRIM

    Hi all, I'm usng LVM-Thin storage for my VMs, one of which is a very old legacy Linux VM. So old that the kernel doesn't support TRIM. The file system is EXT2. Is it possible to somehow run fstrim from the PVE host on the lvm-thin volume and have the space reclaimed in the lvm-thin pool? The VM...
  3. R

    Option bdev_enable_discard & bdev_async_discard in Ceph

    Hi guys, I'm still confused about the bdev_enable_discard & bdev_enable_discard options in Ceph, if this option is activated will it trim (clean unused blocks) automatically? I have activated it, but I don't notice any changes. and it looks like it's still the same as usual, you have to use...
  4. H

    Storage Management and LVM-Thin Configuration

    Hello everyone, I’m reaching out to you all as I’ve encountered a bit of a puzzle with my mini PC setup. I’m fairly new to this, so any guidance would be greatly appreciated! Here’s my current setup: I have a mini PC equipped with a 1TB NVMe SSD and a 1TB SATA HDD. I’m running Proxmox on the...
  5. H

    Storage Management and LVM-Thin Configuration

    Hello everyone, I’m reaching out to you all as I’ve encountered a bit of a puzzle with my mini PC setup. I’m fairly new to this, so any guidance would be greatly appreciated! Here’s my current setup: I have a mini PC equipped with a 1TB NVMe SSD and a 1TB SATA HDD. I’m running Proxmox on the...
  6. G

    [SOLVED] fstrim not working for lvm-thin volume mounted in lxc

    According to the Turnkey File Server I have running on one of my LXCs (ID=101), I am using 1.2T of the total 2.9T capacity of the lvm-thin volume I have mounted. The GUI, however, shows that I'm using 2.7TB of that volume. After reading numerous other threads, I ran: # pct fstrim 101...
  7. G

    Fstrim on LXC while running or stopped?

    Can the command#pct fstrim <vmid> be run while the container is either running or stopped? I have a debian LXC that runs qbittorrent & wireguard (amongst some other services) and was wondering how best to run the pct fstrim command. Also, when will it be the most effective in trimming...
  8. Proxygen

    Is a Discard/Trim Issued When Removing an LV from a ThinPool?

    On PVE 8.1, I have a thin pool on NVME with a few containers. I deleted one of the containers (via GUI) and now I am not sure if the space used by the LV was discarded/trimmed. I can't issue an `fstrim`, unless it is against a directory, nor I can issue a `pct fstrim` against the CT because...
  9. S

    [SOLVED] local-lvm getting full.

    Hi, my local-lvm is almost full and I don't know what to do to fix this. I still don't fully understand what local-lvm is or how it works, compared to "local" (which is cleared with no issues). I tried fstrim on all my VMs and Containers. That only freed about 10 GB out of what's being used -...
  10. I

    passing trim from virtual computer to host block device

    Hi! I think everything runs smooth but i would like to get confirmation if it is really ok. Setup has flash devices (actually nvme samsung and kioxia) and they are directly running on pcie (i.e. without some kind of raid controller etc although raid controller setup + nvme seems to be rare case...
  11. X

    lvm-thin storage trim cleanup with LXC not working

    I use Ubuntu LXC CT on SSD lvm-thin storage and lvm-thin storage just keeps growing (about 90% full) but in LXC only 10% are used. Looks like its same problem like in this case https://forum.proxmox.com/threads/lxc-lvm-thin-discard-fstrim.34393/ But that script is not working Any help how to...
  12. L

    fstrim performance on CEPH RBD with Proxmox

    Hey, we observe major performance issues while running fstrim on VMs backed by a SSD pool (3 replica, 50OSDs) with Ceph (16.2.7) on proxmox. We have a workload that leads to some bigger data fluctuation on our VMs (CentOS 7) . Therefore we have enabled the discard mode for the disks and run...
  13. H

    Trim errors/not working on debian 11 guest / LVM-Thin storage

    Hello, i have problems with trim on debian 11 guest VM , i used windows server as guest on different VM and its was working for it i used virtio-scsi and ssd emulation on/off, discard on underlying storage is NVME drive pveversion pve-manager/7.2-4/ca9d43cc (running kernel: 5.15.35-1-pve) cat...
  14. S

    pct fstrim <CT_ID> ignore /mnt ?

    any way to get the pct fstrim command to ignore the /mnt directory or mountpoints in the LXC? i get an error on all LXC with ZFS mountpoints: fstrim: /var/lib/lxc/121/rootfs/mnt/Media: the discard operation is not supported command 'fstrim -v /var/lib/lxc/121/rootfs/mnt/Media' failed: exit code 1
  15. K

    VE Guest VM Unable to Discard

    Hi everyone, I have a guest VM which seems to be unable to utilize the discard option to free up block space. The guest VM is a Ubuntu 18.04 LTS OS with an ext4 root FS. Underlying storage is Ceph on Bluestore OSDs. VM storage controller is VirtIO-SCSI, with just a standard 1TB disk attached to...
  16. T

    Schedule trim (fstrim) job on Hosts/VMs

    Do I need to schedule fstrim for SSD disks (or even HDD?..) on Proxmox 6.2 ? And if I do, how exactly do I schedule such a job? I've searched online but didn't find anything except for scheduling backups... Thank you,
  17. A

    is it possible to auto trim for lxc disks?

    I have a cluster that has relatively heavy IO and consequently free space on the ceph storage is constantly constrained. I'm finding myself performing fstrim on a more and more frequent interval. Is there a way to auto trim a disk for an lxc container?
  18. I

    fstrim doesn't work in containers (any OS) - workarounds?

    Hi again I've been trying all day to get fstrim working inside unprivileged LXC containers with no luck. Initially I thought it was just a Debian/Ubuntu issue, but I've tried multiple OS templates and it always results in: FITRIM ioctl failed: Operation not permitted. FYI it works fine in...
  19. I

    Is fstrim needed on LVM-thick containers?

    Hi all, I've just discovered that debian/ubuntu has a bug with running fstrim inside containers. However, I am not using LVM-thin, just regular LVM. Therefore my raw disk image size won't change when files are deleted or added. For this reason, I'm thinking maybe there's no need to run fstrim...
  20. jmcorrea

    [SOLVED] FSTrim and Discard needed on ZFS?

    Hello! We have a couple of servers configured to use local ZFS pools for storage. These pools have Thin Provisioning enabled. I used to think that Thin Provisioning + ZFS was enough to have the VMs use on physical storage the same space that they are using into themselves, but it seems I was...

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!