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
Mount to new drive's subdirectory #5015
Comments
Its a good idea. There workaround I've seen used is to create an actual disk partition, a small "dummy" drive just to be used for mounting directories into. The WinFsp library rclone on Windows is based on uses Windows mechanisms DefineDosDevice for drive mounting and NTFS reparse points (of type directory junction) for mounting on a directory path, and don't know about any alternatives to "chase" in Windows API via WinFsp etc.. But could perhaps be possible to achieve this in rclone's own fs implementation on top, something like creating a "real" WinFsp drive mount as starting point, and then expose rclone remotes as subdirectories in that. |
You could use rclone to create the dummy disk first with |
What a (crazy) idea! :) Should it work, in existing rclone version? When I did a quick test just now it fails with: "Cannot set WinFsp-FUSE file system mount point." Did this:
|
Ah... Yes. Rclone doesn't support submounts or maybe libfuse doesn't - I'm not quite sure - so that doesn't work. Well I know it doesn't work on linux and it probably won't work on Windows for the same reason. I think there may be something rclone could do to make this work, but I'm not sure what exactly! |
How about creating a small RAM disk first (syntax untested!)
Then mounting on |
Yeah, that works! One can use memfs, which is included as precompiled exe with WinFsp when you install it with the optional feature "Developer": This is a working example, with rclone v1.54.0, mounting C:\Files and C:\Temp (dummy "remotes" for the test) into ram disk X:
When the issue in v1.54 preventing mount directly on root is released:
(I think it should also be possible to use "net use \memfs64\share X:" instead of executing the memfs exe, but it did not work when I did a quick test) |
What is your current rclone version (output from
rclone version
)?1.55
What problem are you are trying to solve?
Run
rclone mount
to a non-existent drive's subdirectoryHow do you think rclone should be changed to solve that?
At this point in time, if I attempt to mount to a new drive, such as:
rclone mount my-bucket-a: Z:
it works as expected. On windows, it creates a new drive letterZ:
and mounts to it. But, I have so many drives I need to mount it would be nice to be able to runrclone mount my-bucket-a: Z:\my-bucket-a
,rclone mount my-bucket-b: Z:\my-bucket-b
, etc and all of the mounts being available in a single drive letter.If I attempt to mount to a non-existing drive's subdirectory I get the following error message:
2021/02/10 15:13:19 Fatal error: failed to mount FUSE fs: parent of mountpoint directory does not exist: Z:\
The text was updated successfully, but these errors were encountered: