Jump to content
DZMM

Guide: How To Use Rclone To Mount Cloud Drives And Play Files

1054 posts in this topic Last Reply

Recommended Posts

4 minutes ago, Kaizac said:

Ok, so where do we stand now? Opening files through windows explorer all works? They all play? And only Plex now gives problems with sometimes playing and sometimes not?

To sum up:

On Unraid: 

Plex: All local files plays, some remote plays, other don't (seems to be always the same)

Windows explorer on the unraid rclone mount share: some remote files plays other dont. (seems to be always the same)

 

On Windows:

If I mount the same rclone share directly on windows (with rclone windows, without passing thru unraid) All files plays fine plex/explorer

Share this post


Link to post
1 minute ago, yendi said:

To sum up:

On Unraid: 

Plex: All local files plays, some remote plays, other don't (seems to be always the same)

Windows explorer on the unraid rclone mount share: some remote files plays other dont. (seems to be always the same)

 

On Windows:

If I mount the same rclone share directly on windows (with rclone windows, without passing thru unraid) All files plays fine plex/explorer

Ok let's run through the basics first to be 100% sure.

 

Did you get the latest Rclone version on your Unraid box?

Create your Rclone mount freshly. So just delete it from the config and create it new. You don't have the recreate the crypt, just the mount. Then reboot without your dockers autostarting. Test it through windows explorer on the mount_rclone folder (so not the union folder).

Share this post


Link to post
1 minute ago, Kaizac said:

Ok let's run through the basics first to be 100% sure.

 

Did you get the latest Rclone version on your Unraid box?

Create your Rclone mount freshly. So just delete it from the config and create it new. You don't have the recreate the crypt, just the mount. Then reboot without your dockers autostarting. Test it through windows explorer on the mount_rclone folder (so not the union folder).

Do I need a new API and stuff ? If I change API and key, will I loose my data?

Share this post


Link to post
Just now, yendi said:

Do I need a new API and stuff ? If I change API and key, will I loose my data?

No you don't need a new API, neither would it lose your data. Just create the new rclone mount. A little tip to be sure. When filling in your client ID and password, delete the laster number or letter of the string and type it in manually. Just to make sure there are no copy and pasting errors.

Share this post


Link to post
2 minutes ago, Kaizac said:

No you don't need a new API, neither would it lose your data. Just create the new rclone mount. A little tip to be sure. When filling in your client ID and password, delete the laster number or letter of the string and type it in manually. Just to make sure there are no copy and pasting errors.

I just tried, I even used an other rclone version (stable one this time, not the beta) and same issue. The mount is here but some media can be read other dont.

Share this post


Link to post
Just now, yendi said:

I just tried, I even used an other rclone version (stable one this time, not the beta) and same issue. The mount is here but some media can be read other dont.

What is the specific error you get when it won't play through windows explorer?

Share this post


Link to post

No error, either explorer hangs until I manually kill it, or VLC never starts (I double click but nothing happens, and VLC is running under task manager but the windows never shows up)

Share this post


Link to post
Just now, yendi said:

No error, either explorer hangs until I manually kill it, or VLC never starts (I double click but nothing happens, and VLC is running under task manager but the windows never shows up)

Are you able to copy the files through windows explorer? Try it for both the files that do play and won't play.

Share this post


Link to post
1 hour ago, yendi said:

Yes I can do that and it plays fine locally... crazy

What kind of CPU does your Unraid box have?

Share this post


Link to post
Just now, yendi said:

i7 7700 / 20gb ram / 1tb SSD cache and few HDD

Hmmm such a strange problem. Seems like a R/W issue per individual file which seems unlikely. Can you copy one of the movies you can't play to your array and make a new library for that specific movie on your array. See if it plays then? If that does work then you might try something like setting new perms on your mount_rclone share. But I doubt it will work as expected.

Share this post


Link to post
3 hours ago, yendi said:

To sum up:

On Unraid: 

Plex: All local files plays, some remote plays, other don't (seems to be always the same)

Windows explorer on the unraid rclone mount share: some remote files plays other dont. (seems to be always the same)

 

On Windows:

If I mount the same rclone share directly on windows (with rclone windows, without passing thru unraid) All files plays fine plex/explorer

sounds like a plex problem as you've got enough RAM and CPU power (and bandwidth if I remember correctly - what's your line speed?).  When testing I would stop all other dockers that are accessing the mount to double-check they aren't doing something daft.

 

Can you post a screenshot of your plex scheduled tasks page. 

 

And to eliminate rclone, can you post your mount script please.

Share this post


Link to post

Hey,

 

I have a 1000/300 fiber. I have stopped every other docker than plex but I have to disagree, it's not related to plex:

I cannot access in a reliable way media thru rclone unraid on windows, BUT i can access those files from rclone on Windows. For me it's a Rclone or Unraid problem. What do you guys think ?

 

Rclone mount:

#!/bin/bash
#######  Check if script is already running  ##########
if [[ -f "/mnt/user/appdata/other/rclone/rclone_mount_running" ]]; then
echo "$(date "+%d.%m.%Y %T") INFO: Exiting script already running."
exit
else
touch /mnt/user/appdata/other/rclone/rclone_mount_running
fi
#######  End Check if script already running  ##########
#######  Start rclone gdrive mount  ##########
# check if gdrive mount already created
if [[ -f "/mnt/user/mount_rclone/google_vfs/mountcheck" ]]; then
echo "$(date "+%d.%m.%Y %T") INFO: Check rclone vfs already mounted."
else
echo "$(date "+%d.%m.%Y %T") INFO: mounting rclone vfs."
# create directories for rclone mount and unionfs mount
mkdir -p /mnt/user/appdata/other/rclone
mkdir -p /mnt/user/mount_rclone/google_vfs
mkdir -p /mnt/user/mount_unionfs/google_vfs
mkdir -p /mnt/user/rclone_upload/google_vfs
rclone mount --allow-other --buffer-size 128M --dir-cache-time 72h --drive-chunk-size 512M --fast-list --log-level INFO --log-file /tmp/user.scripts/tmpScripts/rclone_mount/mount.log --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit off gdrive_media_vfs: /mnt/user/mount_rclone/google_vfs &
# check if mount successful
# slight pause to give mount time to finalise
sleep 5
if [[ -f "/mnt/user/mount_rclone/google_vfs/mountcheck" ]]; then
echo "$(date "+%d.%m.%Y %T") INFO: Check rclone gdrive vfs mount success."
else
echo "$(date "+%d.%m.%Y %T") CRITICAL: rclone gdrive vfs mount failed - please check for problems."
rm /mnt/user/appdata/other/rclone/rclone_mount_running
exit
fi
fi
#######  End rclone gdrive mount  ##########
#######  Start unionfs mount   ##########
if [[ -f "/mnt/user/mount_unionfs/google_vfs/mountcheck" ]]; then
echo "$(date "+%d.%m.%Y %T") INFO: Check successful, unionfs already mounted."
else
unionfs -o cow,allow_other,direct_io,auto_cache,sync_read /mnt/user/rclone_upload/google_vfs=RW:/mnt/user/mount_rclone/google_vfs=RO /mnt/user/mount_unionfs/google_vfs
if [[ -f "/mnt/user/mount_unionfs/google_vfs/mountcheck" ]]; then
echo "$(date "+%d.%m.%Y %T") INFO: Check successful, unionfs mounted."
else
echo "$(date "+%d.%m.%Y %T") CRITICAL: unionfs Remount failed."
rm /mnt/user/appdata/other/rclone/rclone_mount_running
exit
fi
fi
#######  End Mount unionfs   ##########
############### starting dockers that need unionfs mount ######################
# only start dockers once
if [[ -f "/mnt/user/appdata/other/rclone/dockers_started" ]]; then
echo "$(date "+%d.%m.%Y %T") INFO: dockers already started"
else
touch /mnt/user/appdata/other/rclone/dockers_started
echo "$(date "+%d.%m.%Y %T") INFO: Starting dockers."
docker start plex
docker start tautulli
docker start radarr
docker start sonarr
docker start ombi
docker start bazarr
docker start radarr-uhd-binhex
fi
############### end dockers that need unionfs mount ######################
exit

 

Edited by yendi

Share this post


Link to post

Everything looks ok with the mount file.  

 

- you've added a log file to the mount - is that giving any clues as to what's going wrong?

- have you uninstalled the rclone plugin and reinstalled to get the latest version?

 

Other than that, I think you've exhausted this thread and I'd see if ncw or someone else

over on the rclone board can help 

Share this post


Link to post

Last post - @yendi can you play ok from other servers using rclone?

Share this post


Link to post

Hey, So yes I was suffering from this issue, and I downgraded to 6.6.7. Yes I can play from other server using unraid. 

Anyway I give up, I am formatting and starting from scratch as I write this. Thanks for all the time you took to answer, I will give you an update.

Share this post


Link to post

Have you tried turning unraid off and on again, a full reboot?

Share this post


Link to post

Just to be sure. I have no idea anymore.

 

But sometimes you write things i dont really understand how you mean it.

 

Like u play from rclone on windows?

 

Are you using it like we think? Or in a special way?

Share this post


Link to post

Sorry man, i'm French so my english is not perfect :D

 

My original usage was everything on Unraid as everyone here, I made several test when the issue started to troubleshoot...

I think that my issues started when I shrinked my array (using unbalance) as I had 44Tb before switching to rclone + gdrive and I didn't need all those drives anymore. Maybe the gathering process done by Unbalance created side effects on my unraid installation.

 

So to explain the best possible way, I tried few things:

1/ rclone mounted on unraid:

        a/ Plex on Unraid: some media do not play

        b/ Plex on a windows PC targeting the "/rclone_mount" or "/union" share (on unraid): some media do not play

        c/ "/rclone_mount" (on unraid) accessed via a windows PC: some media do not play (Explorer/VLC freeze)

        d/ copy of any file works and is playable in local...

 

2/ rclone mounted on windows

        a/ Plex on windows: no issue

        b/ Playing any file directly from the mount: no issue

 

I have formated my HDD and restored the USB stick as a new 6.6.7 and recreating my server as we speak.

I have changed my cache drive as xfs (was btrfs) and hopefully it will work... I just have Rclone + scripts and plex installed. I let it create all libraries right now and will test it tonight. FINGER CROSSED !

 

Edited by yendi

Share this post


Link to post

LoL. I just got an idea what could create trouble.

 

Do you have maybe double files?

 

Like

mnt/disk1/movies/movie1/movie.mkv

mnt/disk4/movies/movie1/movie.mkv

 

?


Because i had the same issue with unbalance (but my error in the end - e.g. if you stop a transfer and restart it this might happen)

 

Unraid should always display ONLY the file which is the lowest disk number so in this e.g. it would be disk1 - and maybe that file is corrupt?

Edited by nuhll

Share this post


Link to post
Just now, nuhll said:

LoL. I just got an idea what would create trouble.

 

Do you have maybe double files?

 

Like

mnt/disk1/movies/movie1/movie.mkv

mnt/disk4/movies/movie1/movie.mkv

 

?

I don't think it was the case as everything in local was working

Share this post


Link to post
1 minute ago, yendi said:

I don't think it was the case as everything in local was working

To be sure:

 

You go to windows explorer > your unraid box > mount_clone (not unionfs folder) and go to Movies > your movie folder > movie.mkv and you play it. And then it causes problems?

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.