I have a volume in Longhorn on Harvester which is ...
# harvester
p
I have a volume in Longhorn on Harvester which is getting a bit big. I would like to trim the filesystem on it, is that feasibly? I'm getting an error when I try with the LH UI
This is the error
Copy code
unable to trim filesystem for volume pvc-c1fe219d-088e-4bd3-a75d-23dfcdf74bfc: failed to get share manager for trimming volume pvc-c1fe219d-088e-4bd3-a75d-23dfcdf74bfc: <http://sharemanager.longhorn.io|sharemanager.longhorn.io> "pvc-c1fe219d-088e-4bd3-a75d-23dfcdf74bfc" not found
It's the same for all my VM volumes - be it windows or linux
Because I assume this means my PVC is going to be too big and I will get a disk full error on my Windows host?
e
Hi Alex, you may have better luck finding an answer in the #CC2UQM49Y channel. That being said Harvester usually creates volumes in Block mode, not Filesystem mode. This means that the filesystem on the volume, and subsequently also the trimming operations, are wholly within the responsibility of the guest VM's operating system. Check your guest VM's operating system configuration to see if it already has a mechanism for trimming the filesystem enabled. Note that not all filesystems support trimming and your guest OS may have multiple different ways to configure it. On Linux based guest VMs if a volume is mounted with the option
discard
, then trim commands are automatically issued to the block device - if the filesystem supports it. But there are alternative methods as well. Sometimes the OS runs
fstrim
or
blkdiscard
on a cron-timer, ext3/ext4 filesystems may have trimming enabled with tunable parameters via
tune2fs
and encrypted filesystems with LUKS need to be explicitly set up to support trimming at creation time.
👍 1
p
Ohhhhhhh right! I never realised it was block rather than filesystem. Thank you!