Hey folks, I'm having a bit of a mystery with my GitLab and MinIO setup on Longhorn. I have a Persistent Volume Claim (PVC) that has a capacity of 30GB, but Longhorn is saying about 23GB is being used. However, when I check the MinIO UI, it only shows roughly 200MB of data stored. I'm wondering why there's such a big gap between the reported PVC usage and what I see in MinIO. Could this be due to things like metadata, snapshots, or leftover files? Has anyone dealt with this issue before or have any tips on how to troubleshoot it? Thanks in advance!
1 Answer
The reason you're seeing that discrepancy is that Longhorn reports the actual disk usage on the host level, while MinIO tracks the filesystem usage. Whenever your application writes data, it might not increase the actual data stored, leading Longhorn to report full block usage over time, especially with periodic snapshots. If you check PVC usage metrics through Prometheus, you'll see how much space is truly used in the filesystem within the PVC. Plus, you might want to look into enabling filesystem trimming in Longhorn to have it recognize unused space better.
Exactly! Scheduling a nightly trim job is a great way to handle this. It's usually just a checkbox in the settings.