Rclone Plex Server

I am on ubuntu. I got my encrypted drive on Amazon but how do mount drive on my ubuntu ?Newbie here should i use https://github.com/libfuse/libfuse? Is there a good tutorial?

Something like this:

rclone mount --max-read-ahead 400M --checkers 40 --allow-other --quiet --stats 0 secretacd: /home/username/mntacd &

so i dont need fuse to mount a rclone drive?

sudo apt-get update
sudo apt-get install fuse

I got everything workng last night!

I ran this command rclone mount --umask 0 --allow-other --max-read-ahead 200M secret: media & .
Went to plex and added library using media folder. But this morning. Mount drive is gone i have this ?

ubuntu@xxx.xxx.xxx:~$ ll
ls: cannot access ‘media’: Transport endpoint is not connected
total 52
drwxr-xr-x 5 ubuntu ubuntu 4096 Jan 24 14:04 ./
drwxr-xr-x 3 root root 4096 Jan 21 18:04 …/
-rw------- 1 ubuntu ubuntu 6631 Jan 25 07:52 .bash_history
-rw-r–r-- 1 ubuntu ubuntu 220 Aug 31 2015 .bash_logout
-rw-r–r-- 1 ubuntu ubuntu 3771 Aug 31 2015 .bashrc
drwx------ 2 ubuntu ubuntu 4096 Jan 21 18:23 .cache/
d??? ? ? ? ? ? media/
-rw-r–r-- 1 ubuntu ubuntu 655 Jun 24 2016 .profile
-rw------- 1 ubuntu ubuntu 1639 Jan 25 06:25 .rclone.conf
-rw------- 1 root root 1024 Jan 22 15:52 .rnd
drwx------ 2 ubuntu ubuntu 4096 Jan

Any idea what happened?

the mount must have dropped.
Run fusermount -uz </path/to/mount/>

But why does it drop? how do i stop it from dropping?

Could be many reasons. For that a log is needed.
Setup a systemd start script for rclone mount to run at reboot. And the setup a shell script to check the mount. If fail it should run the mount .service

St0rm thank you so much for helping out. I get this error

usermount: failed to unmount /home/ubuntu/media: Invalid argument when i run this command sudo fusermount -uz /home/ubuntu/media/

Where are rclone logs?

Where you set them runing rClone with the –log /to/the/logs.logs parameter.
I guess you might read a bit… http://rclone.org/

Type findmnt | grep rclone to check if your drive is mounted.

My mount never dropped in last couple of months with exception when ISP had some problems so then I made simple cron check that in case drive is not mounted it will stop plex server and try to remount the drive,

You can check your mount point in script with

if mountpoint -q – “/path/acd”; then
printf ‘%s\n’ “is a mount point”
exit
else
printf ‘%s\n’ “is NOT a mount point”
rclone mount …
fi

Personally i prefer to check if I can access a file on mount point since when I had those ISP problems my mount point was there but files were not accessible ( eg it can take a while for linux to drop the mount due lack of internet connection.

To check a file first make one ( or check existing one that you wont delete from mount )
Just replace the top if mount with
if [[ -f "/path/.acd/acd-check" ]]; then

so it happened again rclone mount got disconnected.

-rw-r–r-- 1 ubuntu ubuntu 3771 Aug 31 2015 .bashrc
drwx------ 2 ubuntu ubuntu 4096 Jan 21 18:23 .cache/
d??? ? ? ? ? ? media/

findmnt | grep rclone
└─/home/ubuntu/media secret: fuse.rclone rw,nosuid,nodev,relatime,user_id=1000,group_id=1000,allow_other

It’s because you’re disconnecting from your session most likely.

Do not run a script or the rclone command using the & to send it to the background. This is the unstable way of doing it.

There’s an easy way to test this, try this:

screen -dmS rclone rclone mount …

Put your options after mount and execute. It should stay running indefinitely.

I believe @Ajki has a script he posted to also run a cron job script every minute to check if it’s still
Mounted and if not, remount. I use one too but not at home at the moment to be able to pull it out.

1 Like

You can download check script here: https://github.com/ajkis/scripts/blob/master/rclone/rclone-mount.cron

1 Like