onedr0p / kubanetics

A container with various scripts for Kubernetes
Apache License 2.0
13 stars 1 forks source link

fstrim output coming up blank #4

Closed jahanson closed 7 months ago

jahanson commented 7 months ago

I'm not sure why I seem to be the only one experiencing this issue but here are my notes:

On further investigation I pulled some of this info and was able to manually run the command in your container after nsenter.

The mountinfo file created at /tmp/mountinfo contains this nonsense. Is this the expected kind of input fstrim wants? image

Using fstrim -v a worked but I don't believe it covered all of the mounts. But this isn't an issue with your script. image

onedr0p commented 7 months ago

Yes, fstrim can read /tmp/mountinfo just the way it is

https://man7.org/linux/man-pages/man8/fstrim.8.html

image
jahanson commented 7 months ago

How does yours look? My fstrim output is still coming up empty with that input.

onedr0p commented 7 months ago

I get this output in the job:

❯ k logs -n kube-system fstrim-28480320-77g4v
/var/lib/containerd: 901.1 GiB (967532859392 bytes) trimmed on /dev/sda6
jahanson commented 7 months ago

Sorry, I meant your /tmp/mountinfo .

onedr0p commented 7 months ago

I need to get the pod running to check but last I remember it looked like your output...