few-lawyer-99266
02/28/2025, 2:19 PMbland-article-62755
02/28/2025, 3:18 PMbland-article-62755
02/28/2025, 3:19 PMbland-article-62755
02/28/2025, 3:19 PMbland-article-62755
02/28/2025, 3:20 PMfew-lawyer-99266
02/28/2025, 3:25 PMbland-article-62755
02/28/2025, 3:31 PMbland-article-62755
02/28/2025, 3:31 PMfew-lawyer-99266
02/28/2025, 3:33 PMfew-lawyer-99266
02/28/2025, 3:34 PMbland-article-62755
02/28/2025, 9:16 PMbland-article-62755
02/28/2025, 9:17 PMbland-article-62755
02/28/2025, 9:19 PMfew-lawyer-99266
03/03/2025, 8:31 AMbland-article-62755
03/03/2025, 3:18 PMbland-article-62755
03/03/2025, 3:19 PMfew-lawyer-99266
03/03/2025, 4:01 PM[nsenter --mount=/host/proc/35862/ns/mnt --net=/host/proc/35862/ns/net fstrim /var/lib/kubelet/plugins/kubernetes.io/csi/driver.longhorn.io/3668e84ba422459eeb2730536e3d1f9f102a617a885922fb055d7539531cb8dc/globalmount], output , stderr nsenter: failed to execute fstrim: No such file or directory : exit status 127
Given that, and the fact that there is no ssh, there's no way to run fstrim on the node (which is bare metal btw, not VM).bland-article-62755
03/03/2025, 4:11 PMbland-article-62755
03/03/2025, 4:11 PMbland-article-62755
03/03/2025, 4:12 PM`siderolabs/util-linux-tools`: this extension enables linux tool to be available to all nodes. For example, thebinary is used for SUSE Storage volume trimming.fstrim
few-lawyer-99266
03/03/2025, 4:12 PMbland-article-62755
03/03/2025, 4:13 PMbland-article-62755
03/03/2025, 4:22 PMfstrim
to release the empty blocks and reclaim that space. For example, I can fill up a block device with /dev/zero
and it'll take up all 2TB. If I make snapshots or backups at that point, it doesn't matter if I delete or clear up space. Longhorn is gonna keep track of those blocks. At that point any changes to the disk is going to result in the Actual Size being bigger than the volume. If I filled it up by writing to a file or something, I have to delete the file, then run fstrim
to tell the kernel to release those unneeded blocks. Like an ssd you they're not real deletes, it's like they're symlinked. The fstrim
is what actually frees up the space on the PV. This isn't just how Longhorn works either. The ceph csi works almost exactly the same way, but they just don't have a fancy way to reclaim the unused space automagically. You can make a new pod, or a job that does this if you really don't want to install the documented extensions for Talos, but it's the only way (that I'm aware of) to actually do what you're asking.bland-article-62755
03/03/2025, 4:23 PMfew-lawyer-99266
03/03/2025, 4:25 PMbland-article-62755
03/03/2025, 6:05 PMrunning it will delete those system hidden snapshotsNope. At least not the k8s objects one. It's only part of the Actual Size problem.
few-lawyer-99266
03/03/2025, 6:06 PMfew-lawyer-99266
03/03/2025, 6:07 PMbland-article-62755
03/03/2025, 6:07 PMfew-lawyer-99266
03/03/2025, 6:08 PMbland-article-62755
03/03/2025, 6:09 PMfew-lawyer-99266
03/03/2025, 6:09 PMfew-lawyer-99266
03/03/2025, 6:10 PMbland-article-62755
03/03/2025, 6:11 PMkubectl get snapshots -A
few-lawyer-99266
03/03/2025, 6:12 PMbland-article-62755
03/03/2025, 6:12 PMfew-lawyer-99266
03/03/2025, 6:13 PMbland-article-62755
03/03/2025, 6:13 PMbillowy-painting-56466
03/03/2025, 11:31 PM[nsenter --mount=/host/proc/35862/ns/mnt --net=/host/proc/35862/ns/net fstrim /var/lib/kubelet/plugins/kubernetes.io/csi/driver.longhorn.io/3668e84ba422459eeb2730536e3d1f9f102a617a885922fb055d7539531cb8dc/globalmount], output , stderr nsenter: failed to execute fstrim: No such file or directory : exit status 127
@few-lawyer-99266, As @bland-article-62755 said, Longhorn supports file system trim on Talos. You will need to installed the siderolabs/util-linux-tools
extension.
• https://longhorn.io/docs/1.8.0/advanced-resources/os-distro-specific/talos-linux-support/#system-extensions
• https://github.com/longhorn/longhorn/blob/master/enhancements/20230814-talos-linux-support.md#fstrim