Can rclone help me to connect my pCloud folders to Plex Media server (Synology)

I'm facing something quite strange.

Once mounting command is started I loose permission access to the parent main folder (/volume1/MassMovies/ from Synology user interface)
Going to /volume1/MassMovies/ from my macos, I can still list /volume1/MassMovies/ folders but it doesn't display the PCLOUD folder !

Impossible to add the mounted folder from Plex. Folder is grey and not accessible.

Going into the folder via a second terminal window allow me to see the pCloud files mounted !
So there's maybe a permission issue behind !

Can this help me ?

PLCOUD mounted folder shows drwx------ , my own local folder as drwxrwxrwx+

try adding --allow-other

You rock !!!! it works !!!!!

rclone mount pcloud: /volume1/MassMovies/PCLOUD/ -vv --allow-other

A really big thanks for you kind help and patience !

If I stop (ctrl-c) and re-run the same command I get :

raffi@DiskStation:/$ rclone mount pcloud: /volume1/MassMovies/PCLOUD/ -vv  --allow-other
2022/08/27 20:32:29 DEBUG : rclone: Version "v1.59.1" starting with parameters ["rclone" "mount" "pcloud:" "/volume1/MassMovies/PCLOUD/" "-vv" "--allow-other"]
2022/08/27 20:32:29 DEBUG : Creating backend with remote "pcloud:"
2022/08/27 20:32:29 DEBUG : Using config file from "/var/services/homes/raffi/.config/rclone/rclone.conf"
2022/08/27 20:32:29 Fatal error: directory already mounted, use --allow-non-empty to mount anyway: /volume1/MassMovies/PCLOUD

Is that expected ? Am I supposed to force using --allow-non-empty
Looks like mounted and rclone process is not running from my understanding.

Note that in this state, I'm (again) no more able to access the local parent folder (that contains the mountpoint).

well, is that dir empty or not?
make sure that another instance of rclone mount is not running?

what is the output to ls /volume1/MassMovies/PCLOUD

Folder is not mounted. So I have to assume I was wrong thinking that rclone was still running.

I get :

raffi@DiskStation:/volume1/MassMovies$ ls -l
ls: cannot access 'PCLOUD': Transport endpoint is not connected
total 132
drwxrwxrwx+ 1 raffi users   2414 Aug 12 22:14 HIDDENNAME
drwxrwxrwx+ 1 root  root     144 Aug 27 13:15 @eaDir
drwxrwxrwx+ 1 raffi users    136 Mar  5 22:44 HIDDENNAME
drwxrwxrwx+ 1 raffi users    580 Apr 16 02:02 HIDDENNAME
drwxrwxrwx+ 1 raffi users   2574 Apr 11 16:55 HIDDENNAME
-rwxrwxrwx+ 1 raffi users 131762 Jul 16 15:29 HIDDENNAME.host
d?????????? ? ?     ?          ?            ? PCLOUD
drwxrwxrwx+ 1 raffi users     88 Jul 13 15:59 HIDDENNAME
drwxrwxrwx+ 1 raffi users     30 Feb 19  2022 HIDDENNAME
drwxrwxrwx+ 1 raffi users   2920 Jan 30  2022 HIDDENNAME
drwxrwxrwx+ 1 raffi users    658 Aug 19 13:02 HIDDENNAME
drwxrwxrwx+ 1 raffi users    772 Oct 23  2021 HIDDENNAME

Error still :

raffi@DiskStation:/$ rclone mount pcloud: /volume1/MassMovies/PCLOUD/ -vv  --allow-other
2022/08/27 21:00:28 DEBUG : rclone: Version "v1.59.1" starting with parameters ["rclone" "mount" "pcloud:" "/volume1/MassMovies/PCLOUD/" "-vv" "--allow-other"]
2022/08/27 21:00:28 DEBUG : Creating backend with remote "pcloud:"
2022/08/27 21:00:28 DEBUG : Using config file from "/var/services/homes/raffi/.config/rclone/rclone.conf"
2022/08/27 21:00:28 Fatal error: directory already mounted, use --allow-non-empty to mount anyway: /volume1/MassMovies/PCLOUD

Edit:
raffi@DiskStation:/$ rclone lsd pcloud:
returns that foldes are connected !

What ca I do ?
Do you think --allow-non-empty can be risky ?
Do I need restart the NAS ?
is there any command to check if rclone is running ? (I found nothing searching ps aux | egrep rclone

make sure nothing is accessing/locking /volume1/MassMovies
then try fusermount -uz /volume1/MassMovies

From my understanding nothing is accessing. Do be sure I have stopped Plex Media Server.
Mount command still in error.

Trying you last command I get :

raffi@DiskStation:/$ fusermount -uz /volume1/MassMovies
fusermount: failed to unmount /volume1/MassMovies: Invalid argument

Edit:
I just realise I should add PCLOUD as this is the pounted point
raffi@DiskStation:/$ fusermount -uz /volume1/MassMovies/PCLOUD

The last command you shared helped me a lot. I think this is now working as expected.

I share some more information to maybe help other newb like me.

  • if I close terminal window running the rclone process : rclone is still running
  • searching from a new terminal window the process ps aux | egrep rclone allow a simple kill to be, manually restarted (killall rclone also works on synology dsm7)

Now to go on my last questions :

  1. Do you confirm --vv is just to show live logs ?
  2. Do you confirm if rclone started without --vv no space will not be used for logs history ?
  3. Can rclone be used without going from terminal (as a task launched via the Synology user interface ?
  4. What's the smartest way to make the process managed from the Synology ? (creating tasks to start/kill each 24hours ?) I found this Rclone mount check script - checks if your mount is connected, if not it will demount and reconnect. ยท GitHub but a bit affraid by trying it :slight_smile: Goal is to get something automatic and no needs to go via the terminal.
  5. I noticed that changing data in remote pCloud storage will be only seen by rclone after a stop/restart : is there a way to get folder refreshed without stop/restart rclone ?
  6. From my Synology mounted folder, I'm not allowed to manage files (creating folders, moving files etc.) is that expected ? Even with --vfs-cache-mode full
  7. Does rclone allow crypting data between local and remote storage ?

nice!

  1. confirmed
  2. well, -vv does not use space, just prints output.
    using --log-file, that will create a log file in local storage and thus take up space.
  3. the synbox gui has a task scheduler.
  4. see item 3.
  5. add --rc to the mount command. once the mount is live, then run rclone rc vfs/refresh recursive=true -vv as often as needed.
  6. should be able to manage files.
  7. yes

1/2/3/4 OK for now. Thanks.

5/
rclone rc vfs/refresh recursive=true -vv , looks like it's a manually refresh, so I have to run de command each time I need to fresh folders contents ? I would be more interested by something automatic refreshing datas. I guess this is not possible ? wondering why I get the following error refusing connection.

it returned first :

raffi@DiskStation:~$ rclone rc vfs/refresh recursive=true -vv
2022/08/28 11:18:29 DEBUG : rclone: Version "v1.59.1" starting with parameters ["rclone" "rc" "vfs/refresh" "recursive=true" "-vv"]
{
	"result": {
		"": "OK"
	}
}
2022/08/28 11:18:29 DEBUG : 4 go routines active

Now I only get :

raffi@DiskStation:~$ rclone rc --cache-db-purge -vv
2022/08/28 12:18:14 DEBUG : rclone: Version "v1.59.1" starting with parameters ["rclone" "rc" "--cache-db-purge" "-vv"]
2022/08/28 12:18:14 DEBUG : 2 go routines active
2022/08/28 12:18:14 Failed to rc: failed to list: connection failed: Post "http://localhost:5572/rc/list": dial tcp [::1]:5572: connect: connection refused

6/
I'm still not able to manage files directly from the mountedpoint and my cache grows each time I'm testing a file transfert.

raffi@DiskStation:~$ rclone mount pcloud:/MassMovies /volume1/MassMovies/PCLOUD/ --allow-other --vfs-cache-mode full -v
2022/08/28 12:17:24 INFO  : pcloud root 'MassMovies': poll-interval is not supported by this remote
2022/08/28 12:17:24 INFO  : vfs cache: cleaned: objects 25 (was 25) in use 0, to upload 0, uploading 0, total size 2.489Gi (was 2.489Gi)
2022/08/28 12:18:24 INFO  : vfs cache: cleaned: objects 25 (was 25) in use 0, to upload 0, uploading 0, total size 2.489Gi (was 2.489Gi)
2022/08/28 12:19:24 INFO  : vfs cache: cleaned: objects 25 (was 25) in use 0, to upload 0, uploading 0, total size 2.489Gi (was 2.489Gi)
2022/08/28 12:20:24 INFO  : vfs cache: cleaned: objects 25 (was 25) in use 0, to upload 0, uploading 0, total size 2.489Gi (was 2.489Gi)

Trying to cleanup the cache bit didn't work

raffi@DiskStation:~$ rclone rc --cache-db-purge -vv
2022/08/28 12:16:49 DEBUG : rclone: Version "v1.59.1" starting with parameters ["rclone" "rc" "--cache-db-purge" "-vv"]
2022/08/28 12:16:49 DEBUG : 2 go routines active
2022/08/28 12:16:49 Failed to rc: failed to list: connection failed: Post "http://localhost:5572/rc/list": dial tcp [::1]:5572: connect: connection refused

I have to continue some tests around managing files. I sometimes feel like I get error and no refresh but files are sync with my sync software (using GoodSync).

For now let's focus on cleaning the cache (as I have no idea of the command or even the local path with the cache to purge)
Edit : I found the .cache folder under my home user. I assume I can delete safely from there is required.

correct.

pcloud would have to support polling.
each time rclone mount is run, from the debug log, rclone will let you know if the remote supports polling.

that flag does nothing, for the deprecated cache remote, do not use.

correct. by default, rclone will purge stale items from the vfs file cache, every --vfs-cache-max-age.

rclone config file

Thanks again ! you help me a lot. I understand little by little.

I have noticed that even if I get errors files are copied and folders created. These errors occurs from MacOS Finder, and also from different Sync softwares.
=> I feel like rclone manage that part of the story itself after a few seconds, or a few minutes later (as files are finally copied).

--

About the --vfs-cache-mode argument.
I'm supposed to write --vfs-cache-mode=full or --vfs-cache-mode full (without "=") ?

Another question :
If I have to close terminal window that runs my rclone command let's say :
rclone mount pcloud:/MassMovies /volume1/MassMovies/PCLOUD/ --allow-other --vfs-cache-mode=full --rc

Have I a way later to run a command that would continue showing live logs ? or I obliged to stop/restart the process.

both are valid, really just a personal choice.

that will kill the mount.

Ok for the command line. Thanks for the clarification :slight_smile:

What about my feeling

I feel like rclone manage that part of the story itself after a few seconds, or a few minutes later (as files are finally copied).

Do you confirm that ? and this is why the cache is here and needed ?
Otherwise I might as well not put anything in the cache


Really? :frowning:
I have a big sync going on, I can't do the test right now :slight_smile:

I'm pretty sure that yesterday I did the test (to close the macaos terminal window) and rclone according to me was still working.
The whole point of having rclone is to be able to rely only on my NAS and pCloud. It's not cool if I have to keep my Mac powered on.

what is the source, what is the dest?

first the local file is copied into the local vfs file cache, and then rclone uploads the file from there to pcloud.

not understanding the issue. if rclone mount is running on the synbox, what does the mac have to do with it?

Source NAS : Target MountedPoint of pCloud on the same NAS


Sorry if not clear with the mac story.
Actually even if rclone is installed and running from the NAS, I have (from my understanding) no other way than running the rclone command line via a terminal window.
As Synology doesn't have terminal in his user interface, I have no choice and need to connect using my mac to open a terminal window and run rclone
Hope it's clearer now.

try --daemon, will run rclone mount as a background task, so closing the terminal window will not kill rclone.

On Linux and macOS, you can run mount in either foreground or background (aka daemon) mode. Mount runs in foreground mode by default. Use the --daemon flag to force background mode.

Thanks for having edited your previous answer :smiley:
You suggestion really make sens ! thanks.

I'm also reading this post of someone you also helped :

I'm trying to get my own .sh file running ! but it doesn't work.

#!/bin/sh
fusermount -uz /volume1/MassMovies/PCLOUD
/bin/rclone mount pcloud:/MassMovies  /volume1/MassMovies/PCLOUD/ --allow-other --vfs-cache-mode=full --rc --daemon --config=/var/services/homes/raffi/.config/rclone/rclone.conf --log-level=DEBUG --log-file=/var/services/homes/raffi/rclone-pcloud.log

(fusermount -uz : just in case if still mounted)

Log says :

2022/08/28 17:57:05 DEBUG : rclone: Version "v1.59.1" starting with parameters ["/bin/rclone" "mount" "pcloud:/MassMovies" "/volume1/MassMovies/PCLOUD/" "--allow-other" "--vfs-cache-mode=full" "--rc" "--daemon" "--config=/var/services/homes/raffi/.config/rclone/rclone.conf" "--log-level=DEBUG" "--log-file=/var/services/homes/raffi/rclone-pcloud.log"]
2022/08/28 17:57:05 NOTICE: Serving remote control on http://localhost:5572/
2022/08/28 17:57:05 DEBUG : Creating backend with remote "pcloud:/MassMovies"
2022/08/28 17:57:05 DEBUG : Using config file from "/var/services/homes/raffi/.config/rclone/rclone.conf"
2022/08/28 17:57:05 DEBUG : fs cache: renaming cache item "pcloud:/MassMovies" to be canonical "pcloud:MassMovies"
2022/08/28 17:57:05 DEBUG : rclone: Version "v1.59.1" starting with parameters ["/usr/bin/rclone" "mount" "pcloud:/MassMovies" "/volume1/MassMovies/PCLOUD/" "--allow-other" "--vfs-cache-mode=full" "--rc" "--daemon" "--config=/var/services/homes/raffi/.config/rclone/rclone.conf" "--log-level=DEBUG" "--log-file=/var/services/homes/raffi/rclone-pcloud.log"]
2022/08/28 17:57:05 Failed to start remote control: start server failed: listen tcp 127.0.0.1:5572: bind: address already in use
2022/08/28 17:58:05 DEBUG : Daemon timed out. Terminating daemon pid 29372
2022/08/28 17:58:05 Fatal error: mount not ready

Trying to identify what's going on

netstat -an | grep 5572
tcp        0      0 127.0.0.1:5572          0.0.0.0:*               LISTEN

This process dies at the same time as the timeout of my command

What am I doing wrong ?