Multiple drives mounted with a single service?

I've got Rclone working well with google drive, windows 7 and nssm to install the service.
Now I want to mount a second drive.
My question is - Can I add the new drive I setup with Rclone to the existing service or do I need to create a new service in nssm for each drive that I set up?
If so, How do I do this/where do i find the file i'd need to add the new mount config to? or is there a section in nssm install i'm not seeing where you can add to an existing service?

I've searched the forums already - the closest thing i found was for linux setups and it said something about making two scripts and then combining them. There was another post that seemed simliar but the answer was to go to the home page for a selected provider - which is helpful for setup but not this specific question about adding services.

Thank you!

create a batch file and run that batch file using nssm

start rclone mount remote1: h:
start rclone mount remote2: i:
start rclone mount remote:3 j:
1 Like

I’m not sure how to do that.
So when I mounted my first drive i opened nssm install via cmd prompt. I then chose rclone.exe as path and rclone as startup directory
Then I add my attributes and add rclone mount as the service name.

So where in that does this batch file fall in? Or how would I do this if it does not?

instead of choosing rclone.exe, choose the batch file and path file path.

Thank you for the tip. I’ll give this a try.
Do I make the batch file just as you write it but with my drive names and then link them via two separate attributes?(separated by a return in the attributes box?)

This is also a possibility assuming the flags you've enabled on the first mount are applicable to the others. You can mount more via rc if you've enabled rc.

root@xx:/data/bin# mkdir /data/tmp; rclone rc mount/mount fs=zonegd: mountPoint=/data/tmp --user=xx --pass=yy --url= -vv
2020/06/10 11:04:56 DEBUG : rclone: Version "v1.52.0-030-gd7290045-beta" starting with parameters ["rclone" "rc" "mount/mount" "fs=zonegd:" "mountPoint=/data/tmp" "--user=xx" "--pass=yy" "--url=" "-vv"]
2020/06/10 11:04:57 DEBUG : 4 go routines active
root@xx:/data/bin# ls -al /data/tmp
total 0
drwxrwxr-x 1 xx root 0 Apr 14 2017 cloudp
drwxrwxr-x 1 xx root 0 Mar 1 14:48 cloudp-bkup

They also then share the same memory caching if applicable (if its the same sources. If not it wont but will still be in the same process).

i do not use nssm, i use task scheduler.

if you post the text and/or screenshots, i can tell you what to do

here's the guide i followed to set up my original drive - stuff like "username" and the actual drive letter or name were changed:

Type the following under Applications:

    Path: C:\rclone\rclone.exe

    Startup Directory: C:\rclone

    Arguments: mount --allow-other --dir-cache-time 72h --drive-chunk-size 64M --log-level INFO --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit off gdrive: X: --config "C:\Users\username\.config\rclone\rclone.conf" --vfs-cache-mode writes

    Service Name: RcloneMount

Under Exit type: 10000 ms, Select the Restart application setting

You should now see a folder that says gdrive (X:) under your Windows Explorer. If not, type nssm start RcloneMount

nssm gui:

you need to create the batch file.
path would be the path of the batch file.
startup dir would be the dir of the batch file.
no arguments.

So would the arguments go into the batch file then? or am I createing the batch file with just the lines as you wrote them before...replacing the remote1 with my created drive name and drive letters with what letters i'd like to use?
start rclone mount : x:
start rclone mount y:

save the file as rclone mount.bat
use this .bat file for the path and the folder it resides in for the dir

without the arguments how would it know to use those settings?

yes, create the batch file as i indicated above.
change the remotes and drive letters

what arguments?

for the first drive i used these arguments

append the arguments to the end of each command

start rclone remote1: x: --allow-other --dir-cache-time 72h --drive-chunk-size 64M --log-level INFO --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit off gdrive: X: --config "C:\Users\username.config\rclone\rclone.conf" --vfs-cache-mode writes

start rclone remote2: y: --allow-other --dir-cache-time 72h --drive-chunk-size 64M --log-level INFO --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit off gdrive: X: --config "C:\Users\username.config\rclone\rclone.conf" --vfs-cache-mode writes

gave it a try. unfortunately this did not work.
I first removed the service I created for the first drive, restarted, then created the new service with this bat file.
I copied and pasted your text into the bat file changed remote1 and remote 2 to the rclone drive's name and the x and y to the letters I wanted. and changed the same in the arguments that followed.

restarted computer - no mounts :confused:

first, get the batch file working via the command line.

then deal with nssm and rebooting.

and post your batch file.

if these is too complex for you, then make a nssm service for each mount.
but you should need to reboot just to test a nssm service.

I'd like to figure this out if possible so i'll keep trying.
something new i noticed:
When I check my serices in msconfig it says that the RcloneMount service is "paused". If i try to resume it i get an error saying windows could not resume the RcloneMount service.... this service did not return an error..."

this is what's in my 'mounts.bat' file:
start rclone plexdrive p: --allow-other --dir-cache-time 72h --drive-chunk-size 64M --log-level INFO --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit off gdrive: p: --config "C:\Users\sli4.config\rclone\rclone.conf" --vfs-cache-mode writes

start rclone ColdStorage: s: --allow-other --dir-cache-time 72h --drive-chunk-size 64M --log-level INFO --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit off ColdStorage: s: --config "C:\Users\sli4.config\rclone\rclone.conf" --vfs-cache-mode writes

forget about the service and msconfig.
you need to get the batch file working first.

that is not correct.
one remote per mount, not two.
you have both in the same command
plexdrive p:
gdrive: p:

choose one

ah,that makes sense.
new file contents:

start rclone gdrive p: --allow-other --dir-cache-time 72h --drive-chunk-size 64M --log-level INFO --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit off gdrive: p: --config "C:\Users\sli4.config\rclone\rclone.conf" --vfs-cache-mode writes

start rclone ColdStorage: s: --allow-other --dir-cache-time 72h --drive-chunk-size 64M --log-level INFO --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit off ColdStorage: s: --config "C:\Users\sli4.config\rclone\rclone.conf" --vfs-cache-mode writes

now you have the same remote and same drive letter, twice in the same command.
only one remote, only one drive per command.

you've lost me now.
I dont really know why I have the things I have here. I mentioned before my arguments were copied off of a tutorial but these commands were copied from your post - I just edited the names of remote1 and remote 2 and the drive letters as we discussed in the following replies in this thread.

so I'm confused - should I take out the "gdrive: p:" and "ColdStorage: s:" from the beginning? ...because they're referenced later in the command? I had thought one was the reference to the item in the config file and one was what I wanted it to be mounted as.