core icon indicating copy to clipboard operation
core copied to clipboard

[FEATURE] OverlayFS

Open qafy opened this issue 5 months ago • 6 comments

Is your feature request related to a problem? Please describe. We are currently using a very old and custom version of CORE (v4.8) for our university lab courses. The main change is an OverlayFS feature. We use OverlayFS to give each node its own overlay path and then its own filesystem. This is used in some of the exercises so that we can send files from one node to another. Now we are integrating OverlayFS into a newer release of CORE. We would like to know if there is any interest in this feature becoming a part of the main CORE project.

Describe the solution you'd like Add the ability to configure an OverlayFS path to a created node so that during runtime different nodes can have different filesystem contents.

Describe alternatives you've considered Maintain a separate version of CORE with OverlayFS.

Additional context The development of the newer version was started some time ago with CORE release 9.0.3 and has not been updated since. If there is interest in this feature we can work on integrating our changes on the latest commit and submit a merge request.

qafy avatar Aug 07 '25 16:08 qafy

Could you not just use the Docker/Podman nodes that have been added at this point?

Are you talking about sending files over the network? You should be able to do that without OverlayFS, but maybe I am not understanding your specific needs.

bharnden avatar Aug 08 '25 02:08 bharnden

You are right, Docker would also work. It's just that OverlayFS is much simpler to set up because we do not need to build and store Docker images. The idea is to only hide the fact that we have the same filesystem. This way, when sending files over the network from one home directory to another, we get different file contents in the home directories on each node. We use this in some of the exercises of our lab system where students need to send files from one node to another.

qafy avatar Aug 11 '25 10:08 qafy

You can still send files over a network without overlayfs, but maybe you want the saved location to be exactly the same path for comparison? What exactly is the use case there?

If you want to describe your overlayfs setup, I can definitely consider its usage for the future, but please be detailed, thanks.

bharnden avatar Aug 12 '25 15:08 bharnden

Thanks for being so patient, yes, that exactly is the use case. We want the saved location to be the same path, but have different file contents.

Our current setup is mostly implemented in the vnoded binary. We have an additional option to specify an OverlayFS path. If it is specified, vnoded will create a folder in the specified path and create folders to store a mount point, an upper layer directory, and a working directory for OverlayFS. It then mounts the OverlayFS with the root directory as the lower layer. It also mounts the control channel path into the upper layer directory. In the end, it chroots into the upper layer.

Aside from the vnoded binary, we change very little. The only change we made in the Python code base is that we call vnoded with the additional argument to save the OverlayFS changes to a folder in /tmp/pycore...

qafy avatar Aug 16 '25 11:08 qafy

Sorry for the delay. I think long term there is some thought that potentially vnoded/vcmd may go away and will require some experimentation down that path to solidify. So if it's feasible to enable the overlayfs without embedding it into vnoded directly, that would be the desired path.

I also did realize and think to say that if you just needed one common path across nodes, you can use the directory mounting feature of services to enable that same case for paths that are viewed the same within a node, but actually separate and would not require overlayfs.

bharnden avatar Sep 15 '25 16:09 bharnden

No worries, I will look into it if we can integrate overlayfs without embedding it into vnoded directly. I am not sure if I understand correctly, but we would like to have multiple paths, not just one, unless we can specify the root path as the one common path. Could you please direct me to where I should look in the code to use this feature?

qafy avatar Sep 18 '25 15:09 qafy