Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excessive use of free storage on a volume #234

Open
SyntaxJuggler opened this issue Oct 13, 2024 · 5 comments
Open

Excessive use of free storage on a volume #234

SyntaxJuggler opened this issue Oct 13, 2024 · 5 comments

Comments

@SyntaxJuggler
Copy link

I'm using Kubernetes to host a minecraft server. I install the server assembly using generic pack and I have a problem that every reboot it is downloaded again, saved in that and exits so I spend 1 gig of space per restart, how can I fix this?

@itzg
Copy link
Owner

itzg commented Oct 13, 2024

To clarify are you concerned about the downloaded files it keeps in /data/packs or the download bandwidth from re-downloading?

@SyntaxJuggler
Copy link
Author

I’m generally concerned about the disk space usage on the volume. When I accessed the pod and checked the total size of everything in the root directory, I got a value of 4.6G, while in the control panel the volume actually shows 7.71 Gi. I don’t quite understand where this difference comes from. I also noticed that this memory increase only happens during the server restart, possibly because the program installs a package but doesn't clean up the data.

@itzg
Copy link
Owner

itzg commented Oct 13, 2024

I don't understand the difference either. The only part I can possibly address is the /data directory within the container. Please exec du -h -d 1 /data within the container and investigate the directory sizes reported with that.

@SyntaxJuggler
Copy link
Author

SyntaxJuggler commented Oct 13, 2024

minecraft@technomagic-minecraft-c48449468-745r8:/$ du -h -d 1 /data
4.0K    /data/.tmp
20M     /data/config
144K    /data/.cache
92K     /data/resourcepacks
4.0K    /data/patchouli_books
720M    /data/packs
160M    /data/libraries
16K     /data/lost+found
120K    /data/defaultconfigs
567M    /data/world
6.3M    /data/logs
2.3G    /data/simplebackups
771M    /data/mods
308K    /data/kubejs
7.6M    /data/mod_data
24K     /data/local
4.6G    /data
minecraft@technomagic-minecraft-c48449468-745r8:/$

image

Perhaps in that sense, not only the data folder but also others because subPath is not specified in the helm chart

persistence:
  labels: {}
  annotations: {}
  ## specify an alternative volume to be mounted to /data instead of datadir.
  # altDataVolumeName: ""
  ## minecraft data Persistent Volume Storage Class
  ## If defined, storageClassName: <storageClass>
  ## If set to "-", storageClassName: "", which disables dynamic provisioning
  ## If undefined (the default) or set to null, no storageClassName spec is
  ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
  ##   GKE, AWS & OpenStack)
  ##
  storageClass: "longhorn"
  dataDir:
    # Set this to false if you don't care to persist state between restarts.
    enabled: true
    Size: 12Gi
    accessModes:
      - ReadWriteMany
    # existingClaim: nil
    ## specify a subpath in the volume where the data is. Useful when sharing volumes with other apps.
    # subPath: /path/to/dataDir

@itzg
Copy link
Owner

itzg commented Oct 13, 2024

Sorry, I have no further ideas. Since you're not using subPath then the root of that volume is attached at the container's /data. Perhaps you need to investigate the persistence provider for the storage class "longhorn" -- it's quite likely that is due to snapshots and other features they mention: https://longhorn.io/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants