What I experience is that i can only mount to drive J: on my win 10.
This works
rclone mount JottaPictures: J:
This fails
rclone mount JottaPictures: F:
Error message:
2021/01/20 08:37:24 NOTICE: jottacloud root '': --vfs-cache-mode writes or full is recommended for this remote as it can't stream
Cannot create WinFsp-FUSE file system: mount point in use.
2021/01/20 08:37:24 ERROR : jottacloud root '': Mount failed
2021/01/20 08:37:24 Fatal error: failed to mount FUSE fs: mount stopped before calling Init: mount failed
I need to use 4 local drives + 4 mountpoints, but my computer refuses to mount to other drive then J:
That error message really sounds like F: is already taken.. Do you get same error when trying with other drive letters? Perhaps then try with network mounting, e.g.
rclone mount JottaPictures: F: --fuse-flag --VolumePrefix=\jotta\pictures
(PS: In next version there will be easier syntax for this, and also option to automatically pick free drive letter).
Perhaps setting up a Windows service would be better, then. You could use NSSM for this (something of a de facto standard tool for making windows services of applications not supporting it natively). On service stop it will:
First nssm will attempt to generate a Control-C event and send it to the application's console. Batch scripts or console applications may intercept the event and shut themselves down gracefully.
Secondly nssm will enumerate all windows created by the application and send them a WM_CLOSE message. Applications may follow the convention of responding to the message by initiating a graceful exit.
Thirdly nssm will enumerate all threads created by the application and send them a WM_QUIT message, which will be received if the application has a thread message queue.
As a last resort nssm can call TerminateProcess() to request that the operating system forcibly terminate the application. The TerminateProcess() call cannot be trapped or ignored, so in most circumstances the application will be killed. However, it is unlikely that it will be able to perform any cleanup operations before it exits.
This sounds like should be a good fit.
The WinFsp library that rclone mount relies on for mounting on Windows also has its own windows service functionality called WinFsp.Launcher, which you could try. I don't know if it is possible, haven't tried it myself, have seen it mentioned in the forum but haven't catched if anyone is successfully using it or not.
A "native" rclone approach would be to use the built in remote control feature:
If rclone is run with the --rc flag then it starts an http server which can be used to remote control rclone using its API.
Then you could use the following API commands:
core/quit: Terminates the app.
mount/mount: Create a new mount point
mount/unmount: Unmount selected active mount
mount/unmountall: Show current mount points
That is true. But does the mounts disappear properly when you stop it? I thought stopping the task would just kill the process, leaving the same situation as in @Modesty's last post.
to start the rclone mount schtasks /run /tn "rclone\mountx"
to kill the rclone mount schtasks /end /tn "rclone\mountx"
edit:
let's say i have a file named mountx.cmd, with a rclone mount command.
no matter how i run it, via command line, via schtasks, i always get this in the debug log.
but the mount point always disappers as expected.
The service rclone has been stopped.
DEBUG : S3 root: Destroy:
DEBUG : S3 root: >Destroy:
DEBUG : Calling host.Unmount
DEBUG : host.Unmount failed
DEBUG : rclone: Version "v1.53.3" finishing with parameters ["c:\\data\\rclone\\scripts\\rclone.exe" "mount" "wasabi01:" "b:\\mount\\rclonemount\\wasabi01" "--read-only" "--log-file=C:\\data\\rclone\\scripts\\rr\\other\\mount\\log.mount.wasabi01.txt" "--log-level=DEBUG"]
I see.
Tried it myself, and even just killing the rclone process does not leave the unavailable mounts - in the default "disk mode" mounting. But with network drive mounting, killing the process leaves the mounts as disconnected network drives, similar to @Modesty's latest post. The drive letters are free to re-use, though, so I can run the same rclone mount command again and the drives get "reconnected".
Killing the process obviously does not result in the "Calling host.Unmount" entry in the log. When using "End task" from task scheduler this message is in the log, so I guess that indicates "End task" is not just a process kill.
Edit: On the Settings tab of task properties, there is a checkbox If the running task does not end when requested, force it to stop, which is default checked. This also indicates it will (try to) gracefully stop the application. So in this perspective, scheduled task seems just as good as (and easier to use than) nssm for auto-starting rclone.
The "host.Unmount failed" message is strange, I get it even at normal Ctrl-C exit. I wonder if the message is just wrong..
tl;dr - just use schtasks to start and end a rclone mount.
never used that network drive mounting, as never found a need for it.
but now, as a test, i add --fuse-flag --VolumePrefix=\jotta\pictures to my mount command.
run it via schtasks, as system user.
net use shows the drive letter X:
then i end that task, run net use again, and the drive letter is not there and there is no ghost drive letters.
tho i never use windows explorer, this time, i looked at its behavior.
as expected, the drive letters appears and disappears as expected.
using double commander, the drive letter appears and disappears as expected.
Thanks again for helping me, mount jottacloud is not so straight forward as I hoped.
Per today I struggle to get rClone work in a stable maner. So your good answers from yesterday I must wait to use. Issue number one is to at least manage to mount my jotta drives in a stable maner lasting more than half a day
Small tip:
To release the occupied "not mounted drives" i used regedit. I deleted values under key like Mountpoins2
Anoder Q: arising is the jotta key: Do I need to update it every 24 h?
From conf file the expiry date is 24h after i copied key from jottacloud
Another Q, or a request.
Do any of you have a batch/cmd/script file to share?
I struggle to start it as a service with nssm.exe. Service goes to Pause
If i start it from a cmd file i get 4 open cmd windows that each hold a mounted share up and running. A bit annoying.
The command I use per today is:
rclone mount JottaModesty: H: --fuse-flag --VolumePrefix=\jotta\Modesty
For me it is also ok to use default mount, it seems to work after a reeboot. So when i get this rclone mount working I expect this command also to work
Use Rclone Browser. It is GUI utility. You can navigate your all rclone remotes with it. It will be much easier for you to see how all your remotes are set-up. That knowledge will help you with mounts.
Make a copy of the folder (from https://www.jottacloud.com interface) if you want to remove all previous versions saved for files in that folder. The new folder you have copied won't contain previous file versions which consume Jottacloud space additionally. Use Rclone Browser's "Get Size" command to check if everything was copied before removing the old folder (with files which have previous versions). The total objects and total size should match in both folders. Of course you can also use rclone size command for that.
You can estimate the potential space savings by running "rclone about jotta:" (total file usage with previous file versions) and "rclone size jotta:" (real file usage).
Found this really detailed and well written guide for setting up scheduled task and nssm for a similar utility (command line arguments, exit codes etc are of course different, so can't follow it literally):
--fuse-flag --VolumePrefix=\jotta\Modesty
i use rclone mount on multiple servers and computers on a daily basis, for uploading files and for streaming. i never used that flag.