[Plugin] rclone


Waseh

Recommended Posts

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
Link to comment

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

 

Link to comment

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
Link to comment
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?

 

Link to comment
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

Link to comment

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 "

Link to comment
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.

 

Link to comment

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! 

 

 

 

Link to comment
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.

  • Thanks 1
Link to comment
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. 

Link to comment
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

Link to comment
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'

Link to comment
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?

Link to comment

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.

Link to comment
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
Link to comment

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
 

 

 

Link to comment
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

Link to comment

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.

Link to comment

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.

Link to comment

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.