panel icon indicating copy to clipboard operation
panel copied to clipboard

Overlay mode for mounts

Open Riven-Spell opened this issue 2 years ago • 5 comments

Is there an existing feature request for this?

  • [X] I have searched the existing issues before opening this feature request.

Describe the feature you would like to see.

Currently, mounts can only entirely override the contents of a folder. This is suboptimal for some use-cases, e.g. Xonotic servers, where core game files are stored in the same place as the other map files. Xonotic cannot pick up on subdirectories, custom directories, or symlinks. A mount would be optimal for this, because I'd like to share the files with an HTTP server that can allow clients to download the files as well.

Describe the solution you'd like.

Instead, I'd like to be able to flip a switch to mount it as an overlayed filesystem, revealing the files with different names in the lower directory in addition to all files in the mounted directory.

Additional context to this request.

Currently, the best workarounds are to

  • Copy the data from the mount into the game folder at startup, remove it when the server stops (Keeps things up to date, but requires more disk space)
  • Include said game files inside the host mount folder (works, but doesn't allow for running multiple versions of the game or whatnot; not detrimental to my own use case)
  • Manually keep the data in sync between both the HTTP server and game server (probably the worst solution of the few)

Riven-Spell avatar Nov 05 '23 23:11 Riven-Spell

We are using bind mounts to make the files easily accessible outside the container. I don't believe bind mounts allow for overlay.

parkervcp avatar Nov 05 '23 23:11 parkervcp

(Game) servers already expose their own SFTP servers, and that works pretty decently. Considering SFTP is how I got these files to my wings node in the first place, it might be a viable route to expose custom volumes in a similar way(?)

Riven-Spell avatar Nov 05 '23 23:11 Riven-Spell

The sftp is handled completely by wings and not the game servers. That is why each is separate. Mounts do not show up in the binds either.

parkervcp avatar Nov 05 '23 23:11 parkervcp

Turns out you can bind-mount an overlayFS.

This comes with the caveat that, of course, whatever you're mounting in must be RO, and will be below the "actual" filesystem of the CT. It's the reverse of what I stated, but it does get the job done (getting the maps in place without hiding the core game files).

Riven-Spell avatar Nov 06 '23 00:11 Riven-Spell

^ This would however, leave overlayed files visible in pterodactyl and SFTP by extension

Riven-Spell avatar Nov 06 '23 00:11 Riven-Spell