Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Plugin] rclone

Featured Replies

5 hours ago, DZMM said:

I get this error while trying to upgrade whilst on 6.7.2

 


plugin: updating: rclone.plg
plugin: run failed: /bin/bash retval: 1

 

 

5 hours ago, Waseh said:

Considering how early that happens it seems to be something with the check for fusermount.

 

Admittedly I don't run the plugin.  But, your code is this

if ! [ -f /usr/bin/fusermount ]; then
  ln -s /usr/bin/fusermount3 /usr/bin/fusermount
fi;

But a prior user posted the output of

which fusermount

 

On 10/12/2019 at 12:12 AM, Viperkc said:

which: no fusermount in (.:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin)

 

That is for sure the problem.

 

When i ran it in 6.7 i got this:

 

/bin/fusermount

So your symlink is failing and the plugin install is failing.  (Because it checks for fusermount in /usr/bin instead of /bin)

 

So I would do something like

if ! [ -f /bin/fusermount ]; then
  if [ -f /usr/bin/fusermount3 ]; then
    ln -s /usr/bin/fusermount3 /bin/fusermount
  fi;
fi;

Which *hopefully* would be future-proof

Edited by Squid

  • Replies 1.1k
  • Views 338.4k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • I also didn't realize rclone was included in Unraid! I appreciate your work on the plugin @Waseh I got it working without the plugin by doing the following. From the Unraid command prompt I ran rclo

  • Hey guys Sorry for the lack of updates in a (long) while ? Real life has been taking up a lot of time and my own install of rclone has been sufficient for my needs. However both the stable branch

  • SpaceInvaderOne
    SpaceInvaderOne

    Hi guys Heres a tutorial on how to setup the excellent Rclone plugin on unRAID. You will see how to install it then connect to 3 different cloud storage providers. Amazon, dropbox and google driv

Posted Images

  • Author

Well i wish i saw your edit before getting to the above conclusion myself.

Atleast we came to the same result ;) 

Thanks

Edited by Waseh

Hi, 

 

The 6.8.0-rc1 update as I have read changes from fusermount2 to 3 but I cannot find a way around the nonempty option?  if you look below fusermount tells me to use the option but then when I try to it tells me it is invalid?  I have had this working for quite some time before the update, any help would be apprecited! 🙂

 

root@UNRAIDSERVER:~# rclone mount  --max-read-ahead 1024k --allow-other dediseedbox: /mnt/disks/dediseedbox &
[1] 59677
root@UNRAIDSERVER:~# 2019/10/15 00:04:09 Fatal error: Directory is not empty: /mnt/disks/dediseedbox If you want to mount it anyway use: --allow-non-empty option
root@UNRAIDSERVER:~# rclone mount  --max-read-ahead 1024k --allow-other --allow-non-empty dediseedbox: /mnt/disks/dediseedbox &
[2] 61241
[1]   Exit 1                  rclone mount --max-read-ahead 1024k --allow-other dediseedbox: /mnt/disks/dediseedbox
root@UNRAIDSERVER:~# 2019/10/15 00:04:26 mount helper error: fusermount: unknown option 'nonempty'
2019/10/15 00:04:26 Fatal error: failed to mount FUSE fs: fusermount: exit status 1

 

  • Author

I must admit that I don't use the mount feature anymore but a quick search results in the following TLDR:

You can just remove the nonempty mount option, it is the default behaviour now.

 

So this seems to be a problem with the way rclone handles non empty folders when combined with fusermount3

 

Here is the relevant issue on GitHub

 

For more information check the changelog for libfuse specifically the entry regarding libfuse 3.0.0

Edited by Waseh

16 hours ago, Waseh said:

I must admit that I don't use the mount feature anymore but a quick search results in the following TLDR:

You can just remove the nonempty mount option, it is the default behaviour now.

 

So this seems to be a problem with the way rclone handles non empty folders when combined with fusermount3

 

Here is the relevant issue on GitHub

 

For more information check the changelog for libfuse specifically the entry regarding libfuse 3.0.0

Many thanks for the reply, I did read that before I posted on here and again since your reply but I am still clueless lol!

 

Basically I am reading that I cannot use this mount option anymore? is there any way I can mount my seedbox using rclone mount or do I need to find another way?

 

Just updated plugin and unraid and all working ok with my mounts - thanks

On 10/16/2019 at 1:17 AM, mbc0 said:

Many thanks for the reply, I did read that before I posted on here and again since your reply but I am still clueless lol!

 

Basically I am reading that I cannot use this mount option anymore? is there any way I can mount my seedbox using rclone mount or do I need to find another way?

 

Anyone got any ideas? over on the Github they told me to make sure I am mounting empty directories, but I have always used rclone mount to mount my media folders on my VPS

So this is the command I am using to download files from my Gdrive to my server again since im ditching Rclone/Gdrive.   Is there something I can add to this command that would limit the speed it is downloading. Like to add a download speed limit. When I am downloading free since I have a 1gb connection its killing my plex traffic. 

 

" rclone copy Gdrive_StreamEN:Secure /mnt/user/Media/_Temp/rclonemove/ --ignore-existing -v "

24 minutes ago, tmoran000 said:

So this is the command I am using to download files from my Gdrive to my server again since im ditching Rclone/Gdrive.   Is there something I can add to this command that would limit the speed it is downloading. Like to add a download speed limit. When I am downloading free since I have a 1gb connection its killing my plex traffic. 

 

" rclone copy Gdrive_StreamEN:Secure /mnt/user/Media/_Temp/rclonemove/ --ignore-existing -v "

According to the rclone documentation HERE this is the flag you are looking for:
 

--bwlimit BwTimetable                  Bandwidth limit in kBytes/s, or use suffix b|k|M|G or a full timetable.

 

thanks, Ill try to get this written in. 

I previously had rclone set up successfully to my Google Drive account and was able to backup over 5TB of data. At some point it stopped working and now I'm getting this error when trying to mount rclone:

 

"Fatal error: Directory is not empty: /mnt/disks/secure If you want to mount it anyway use: --allow-non-empty option: readdirent: input/output error"

 

Any ideas on how I can fix this? I set everything up initially following SpaceInvader One's guide. 

 

Mount Script:

#!/bin/bash 
#---------------------------------------------------------------------------- 
#first section makes the folders for the mount in the /mnt/disks folder so docker containers can have access 
#there are 4 entries below as in the video i had 4 remotes amazon,dropbox, google and secure #you only need as many as what you need to mount for dockers or a network share

mkdir -p /mnt/disks/google 
mkdir -p /mnt/disks/secure 

#This section mounts the various cloud storage into the folders that were created above. 

rclone mount --max-read-ahead 1024k --allow-other google: /mnt/disks/google & 
rclone mount --max-read-ahead 1024k --allow-other secure: /mnt/disks/secure &

 

Config:

[google]
type = drive
scope = drive
token = {"access_token":"REMOVED","expiry":"2018-11-19T20:48:47.611614829-08:00"}

[secure]
type = crypt
remote = google:secure
filename_encryption = standard
directory_name_encryption = true
password = REMOVED
password2 = REMOVED

 

Rclone Custom Script:

#!/bin/bash
#----------------------------------------------------------------------------
# Here you can add your own custom script eg.                                |
# rclone copy /local/path remote:path # copies /local/path to the remote     |
# rclone sync /local/path remote:path # syncs /local/path to the remote      |
#----------------------------------------------------------------------------
rclone sync -v /mnt/user/media secure:media

 

Unmount Script:

#!/bin/bash 
#---------------------------------------------------------------------------- 
fusermount -u /mnt/disks/google
fusermount -u /mnt/disks/secure 

 

Currently running Unraid Version 6.7.2. Thanks in advance for any help! 

 

 

 

10 hours ago, hauber794 said:

I previously had rclone set up successfully to my Google Drive account and was able to backup over 5TB of data. At some point it stopped working and now I'm getting this error when trying to mount rclone:

 

"Fatal error: Directory is not empty: /mnt/disks/secure If you want to mount it anyway use: --allow-non-empty option: readdirent: input/output error"

 

Any ideas on how I can fix this? I set everything up initially following SpaceInvader One's guide. 

 

Mount Script:

#!/bin/bash 
#---------------------------------------------------------------------------- 
#first section makes the folders for the mount in the /mnt/disks folder so docker containers can have access 
#there are 4 entries below as in the video i had 4 remotes amazon,dropbox, google and secure #you only need as many as what you need to mount for dockers or a network share

mkdir -p /mnt/disks/google 
mkdir -p /mnt/disks/secure 

#This section mounts the various cloud storage into the folders that were created above. 

rclone mount --max-read-ahead 1024k --allow-other google: /mnt/disks/google & 
rclone mount --max-read-ahead 1024k --allow-other secure: /mnt/disks/secure &

 

Config:

[google]
type = drive
scope = drive
token = {"access_token":"REMOVED","expiry":"2018-11-19T20:48:47.611614829-08:00"}

[secure]
type = crypt
remote = google:secure
filename_encryption = standard
directory_name_encryption = true
password = REMOVED
password2 = REMOVED

 

Rclone Custom Script:

#!/bin/bash
#----------------------------------------------------------------------------
# Here you can add your own custom script eg.                                |
# rclone copy /local/path remote:path # copies /local/path to the remote     |
# rclone sync /local/path remote:path # syncs /local/path to the remote      |
#----------------------------------------------------------------------------
rclone sync -v /mnt/user/media secure:media

 

Unmount Script:

#!/bin/bash 
#---------------------------------------------------------------------------- 
fusermount -u /mnt/disks/google
fusermount -u /mnt/disks/secure 

 

Currently running Unraid Version 6.7.2. Thanks in advance for any help! 

 

 

 

The error says the directory is not empty.......Did you verify that? Run these commands to make sure your rclone mount is indeed unmounted
 

fusermount -u /mnt/disks/google
fusermount -u /mnt/disks/secure
umount -l  /mnt/disks/google
umount -l  /mnt/disks/secure

Then check and see that /mnt/disks/google and /mnt/disks is EMPTY. Then just go ahead and delete /mnt/disks/google and /mnt/disks/secure just to be sure. Then try your mount script again and report any error message.

12 hours ago, Stupifier said:

The error says the directory is not empty.......Did you verify that? Run these commands to make sure your rclone mount is indeed unmounted
 


fusermount -u /mnt/disks/google
fusermount -u /mnt/disks/secure
umount -l  /mnt/disks/google
umount -l  /mnt/disks/secure

Then check and see that /mnt/disks/google and /mnt/disks is EMPTY. Then just go ahead and delete /mnt/disks/google and /mnt/disks/secure just to be sure. Then try your mount script again and report any error message.

That fixed my mounting issue (thank you!) but now I'm getting to following when trying to run the custom script: 

 

2019/10/18 22:01:02 ERROR : : error reading destination directory: couldn't list directory: Get https://www.googleapis.com/drive/v3/files?alt=json&fields=files(id%2Cname%2Csize%2Cmd5Checksum%2Ctrashed%2CmodifiedTime%2CcreatedTime%2CmimeType%2Cparents%2CwebViewLink)%2CnextPageToken&includeItemsFromAllDrives=true&pageSize=1000&prettyPrint=false&q=trashed%3Dfalse+and+('root'+in+parents)+and+(name%3D'secure')+and+mimeType%3D'application%2Fvnd.google-apps.folder'&supportsAllDrives=true: oauth2: cannot fetch token: 400 Bad Request
Response: {
"error": "invalid_grant",
"error_description": "Bad Request"
}
2019/10/18 22:01:02 INFO : Encrypted drive 'secure:media': Waiting for checks to finish
2019/10/18 22:01:02 INFO : Encrypted drive 'secure:media': Waiting for transfers to finish
2019/10/18 22:01:02 ERROR : Encrypted drive 'secure:media': not deleting files as there were IO errors
2019/10/18 22:01:02 ERROR : Encrypted drive 'secure:media': not deleting directories as there were IO errors
2019/10/18 22:01:02 ERROR : Attempt 1/3 failed with 2 errors and: couldn't list directory: Get https://www.googleapis.com/drive/v3/files?alt=json&fields=files(id%2Cname%2Csize%2Cmd5Checksum%2Ctrashed%2CmodifiedTime%2CcreatedTime%2CmimeType%2Cparents%2CwebViewLink)%2CnextPageToken&includeItemsFromAllDrives=true&pageSize=1000&prettyPrint=false&q=trashed%3Dfalse+and+('root'+in+parents)+and+(name%3D'secure')+and+mimeType%3D'application%2Fvnd.google-apps.folder'&supportsAllDrives=true: oauth2: cannot fetch token: 400 Bad Request
Response: {
"error": "invalid_grant",
"error_description": "Bad Request"
}

 

It fails all 3/3 attempts. 

7 hours ago, hauber794 said:

That fixed my mounting issue (thank you!) but now I'm getting to following when trying to run the custom script: 

 

2019/10/18 22:01:02 ERROR : : error reading destination directory: couldn't list directory: Get https://www.googleapis.com/drive/v3/files?alt=json&fields=files(id%2Cname%2Csize%2Cmd5Checksum%2Ctrashed%2CmodifiedTime%2CcreatedTime%2CmimeType%2Cparents%2CwebViewLink)%2CnextPageToken&includeItemsFromAllDrives=true&pageSize=1000&prettyPrint=false&q=trashed%3Dfalse+and+('root'+in+parents)+and+(name%3D'secure')+and+mimeType%3D'application%2Fvnd.google-apps.folder'&supportsAllDrives=true: oauth2: cannot fetch token: 400 Bad Request
Response: {
"error": "invalid_grant",
"error_description": "Bad Request"
}
2019/10/18 22:01:02 INFO : Encrypted drive 'secure:media': Waiting for checks to finish
2019/10/18 22:01:02 INFO : Encrypted drive 'secure:media': Waiting for transfers to finish
2019/10/18 22:01:02 ERROR : Encrypted drive 'secure:media': not deleting files as there were IO errors
2019/10/18 22:01:02 ERROR : Encrypted drive 'secure:media': not deleting directories as there were IO errors
2019/10/18 22:01:02 ERROR : Attempt 1/3 failed with 2 errors and: couldn't list directory: Get https://www.googleapis.com/drive/v3/files?alt=json&fields=files(id%2Cname%2Csize%2Cmd5Checksum%2Ctrashed%2CmodifiedTime%2CcreatedTime%2CmimeType%2Cparents%2CwebViewLink)%2CnextPageToken&includeItemsFromAllDrives=true&pageSize=1000&prettyPrint=false&q=trashed%3Dfalse+and+('root'+in+parents)+and+(name%3D'secure')+and+mimeType%3D'application%2Fvnd.google-apps.folder'&supportsAllDrives=true: oauth2: cannot fetch token: 400 Bad Request
Response: {
"error": "invalid_grant",
"error_description": "Bad Request"
}

 

It fails all 3/3 attempts. 

Type rclone config and reauthorize your rclone remote

Hi, 

 

Is there still no way of using rclone mount to directories that have data in them? (nonempty)

 

Thank you

19 minutes ago, Stupifier said:

https://forum.rclone.org/t/whats-the-behavior-of-allow-non-empty/1924

 

Read that. There is an option for what you want... It you can use unionfs

Hi, that is what I used to do but nonempty no longer works on this latest version

 

rclone mount  --max-read-ahead 1024k --allow-other --allow-non-empty dediseedbox: /mnt/disks/dediseedbox &

 

2019/10/15 00:04:26 mount helper error: fusermount: unknown option 'nonempty'

29 minutes ago, mbc0 said:

Hi, that is what I used to do but nonempty no longer works on this latest version

 

rclone mount  --max-read-ahead 1024k --allow-other --allow-non-empty dediseedbox: /mnt/disks/dediseedbox &

 

2019/10/15 00:04:26 mount helper error: fusermount: unknown option 'nonempty'

That looks like an issue with fusermount....not rclone.

 

Why do you want to mount an rclone remote to anon-empty directory?

 

Why not mount your rclone remote to an empty directory.... Then use unionfs to merge your non-empty directory with the contents of your rclone mount directory?

I have been using rclone mount for a long time to mount my media libraries on my VPS and make them accessible on my unraid server, I followed a video guide from spaceinvaderone a long time ago and all worked perfectly until I upgraded to the new RC unRAID which has the new fudermount V3.  I cannot find another way to acheive mounting a remote share on unraid so really stuffed at the moment.

26 minutes ago, mbc0 said:

I have been using rclone mount for a long time to mount my media libraries on my VPS and make them accessible on my unraid server, I followed a video guide from spaceinvaderone a long time ago and all worked perfectly until I upgraded to the new RC unRAID which has the new fudermount V3.  I cannot find another way to acheive mounting a remote share on unraid so really stuffed at the moment.

You sure you are on the latest rclone-beta plugin? The dev fixed all the issues with fusermount3 I thought. Bunch of talk about it a few days ago.

 

Easiest solution would be to not run RC builds of Unraid haha.....I don't see much need to run an Unraid server on the bleeding edge of development unless you are a pro yourself.

 

Also, use this to force unmounts

umount -l  /path/to/remote/mount

 

I noticed a lot of scripts call fusermount -u command.....it's better to use the unmount command

 

Edited by Stupifier

Hi, 

 

Thanks so much for your time, 

 

I updated to RC as I was suffering like a lot of people with speed issues that have now been resolved in this RC version, normally I like to stay on stable.

 

the version of the plugin is the latest (2019.10.14 Fusermount compatibility fix take two) but still not working for me sadly

 


root@UNRAIDSERVER:/mnt/disks# umount -l /mnt/disks/dediseedbox/                                                      umount: /mnt/disks/dediseedbox/: not mounted.
root@UNRAIDSERVER:/mnt/disks# rclone mount  --max-read-ahead 1024k --allow-other --allow-non-empty dediseedbox: /mnt/disks/dediseedbox &
[1] 129862
root@UNRAIDSERVER:/mnt/disks# 2019/10/20 18:49:52 mount helper error: fusermount: unknown option 'nonempty'
2019/10/20 18:49:52 Fatal error: failed to mount FUSE fs: fusermount: exit status 1
 

 

 

44 minutes ago, mbc0 said:

Hi, 

 

Thanks so much for your time, 

 

I updated to RC as I was suffering like a lot of people with speed issues that have now been resolved in this RC version, normally I like to stay on stable.

 

the version of the plugin is the latest (2019.10.14 Fusermount compatibility fix take two) but still not working for me sadly

 


root@UNRAIDSERVER:/mnt/disks# umount -l /mnt/disks/dediseedbox/                                                      umount: /mnt/disks/dediseedbox/: not mounted.
root@UNRAIDSERVER:/mnt/disks# rclone mount  --max-read-ahead 1024k --allow-other --allow-non-empty dediseedbox: /mnt/disks/dediseedbox &
[1] 129862
root@UNRAIDSERVER:/mnt/disks# 2019/10/20 18:49:52 mount helper error: fusermount: unknown option 'nonempty'
2019/10/20 18:49:52 Fatal error: failed to mount FUSE fs: fusermount: exit status 1
 

 

 

Ahh sorry, looks like you've tried everything I can think of....but I'm just another noob. Maybe pros can help you. Good luck

ah, gutted! saw an update for rclone but still cannot mount nonempty directories 😪

I have been given a patch for this problem on Github, does anyone know how to implement it?

 

The patch to fix this is quite simple

diff --git a/cmd/cmount/mount.go b/cmd/cmount/mount.go index b11ad16f4..05836fbdb 100644 --- a/cmd/cmount/mount.go +++ b/cmd/cmount/mount.go @@ -74,9 +74,6 @@ func mountOptions(device string, mountpoint string) (options []string) { options = append(options, "-o", "volname="+mountlib.VolumeName) } } - if mountlib.AllowNonEmpty { - options = append(options, "-o", "nonempty") - } if mountlib.AllowOther { options = append(options, "-o", "allow_other") } diff --git a/cmd/mount/mount.go b/cmd/mount/mount.go index 117eb76da..9e0982803 100644 --- a/cmd/mount/mount.go +++ b/cmd/mount/mount.go @@ -46,9 +46,6 @@ func mountOptions(device string) (options []fuse.MountOption) { if mountlib.NoAppleXattr { options = append(options, fuse.NoAppleXattr()) } - if mountlib.AllowNonEmpty { - options = append(options, fuse.AllowNonEmptyMount()) - } if mountlib.AllowOther { options = append(options, fuse.AllowOther()) }

However this is backwards incompatible with fuse 2.

I haven't figured out a way of working out which fuse version we are talking to to make it adapt.

I guess I could add a --fuse-version flag which would be untidy.

I think I found a bug with the rclone-beta plugin. It is now looking for the config in the rclone plugin folder instead rclone-beta like it previously did. Sounds to me like a copy-paste bug.

Switched to rclone plugin and everything works, but then I don't do exotic stuff, just plain old empty mounts so I reckon I have never had the need for the latest beta build anyway.

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.