Fstrim on LXC while running or stopped?

gfngfn256

Distinguished Member
Mar 29, 2023
2,585
819
153
Can the command
Code:
#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? (Running or stopped).

The container has the following Disk space:

Code:
rootfs: Storage:104/vm-104-disk-1.raw,size=32G
This is a Directory type Storage on a 2tb SSD ext4 partition
 
Last edited:
Can the command pct fstrim <vmid> be run while the container is either running or stopped?
This command can be run at any time, whether the container is running or not.

As for efficiency, It also should not matter (much). Or at least not that one has to think about it.

Hope this helps!