How to change the directory file system without losing files?

36 views Asked by At

Tell me, please, with the mounts I write my fs on fuse I have some directory whose filesystem calls I want to change (basedir) I create mnt_point, make a basedir mount in mnt_point and now if I make ls mnt_point, then the file system calls are replaced with mine (since my file is in mnt_point) and I see files from basedir But the problem with this is that if initially a program was running in basedir that accesses files in the same directory, then read and other calls will not pass through my file system, as I would like them to. You cannot mount directly in basedir, because then my fuse fs won't be able to internally access the original basedir.

Maybe there is some kind of double-sided mount, is there any way to solve the problem?

the program simply accesses files not through mnt_point, but through basedir And I would like to somehow make it so that I intercept calls from basedir and that they pass through mnt_point

and I really wish I could just replace the fs for the directory, roughly speaking, but so that the files of basedir remain visible to my fuse.

or is it possible to somehow get access to the initial data before the mount in basedir

0

There are 0 answers