mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 00:13:49 +01:00
"fuse.subtype" type is preferred over "subtype#" prefix
parent
78ef5c5c5e
commit
ee47469b2d
@ -36,6 +36,7 @@ To enable mounting a volume using rclone via an entry in fstab the following hel
|
|||||||
# exec rclone
|
# exec rclone
|
||||||
trans="$trans $remote $mountpoint"
|
trans="$trans $remote $mountpoint"
|
||||||
# NOTE: do not try "mount --daemon" here, it does not play well with systemd automount, use '&'!
|
# NOTE: do not try "mount --daemon" here, it does not play well with systemd automount, use '&'!
|
||||||
|
# NOTE: mount is suid and ignores pre-set PATHs -> specify explicitely
|
||||||
PATH=$PATH rclone mount $trans </dev/null >/dev/null 2>/dev/null &
|
PATH=$PATH rclone mount $trans </dev/null >/dev/null 2>/dev/null &
|
||||||
|
|
||||||
# WARNING: this will loop forever if remote is actually empty!
|
# WARNING: this will loop forever if remote is actually empty!
|
||||||
@ -43,23 +44,21 @@ To enable mounting a volume using rclone via an entry in fstab the following hel
|
|||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
## fstab
|
||||||
|
|
||||||
Then in `/etc/fstab` you can add something like:
|
In `/etc/fstab` you can add something like:
|
||||||
|
|
||||||
rclonefs#remote:/path/to/remote/folder /mnt/rclone fuse config=/home/user/.rclone.conf,allow-other,default-permissions,read-only,max-read-ahead=16M 0 0
|
remote:/path/to/remote/folder /mnt/rclone fuse.rclonefs config=/home/user/.rclone.conf,allow-other,default-permissions,read-only,max-read-ahead=16M 0 0
|
||||||
|
|
||||||
Obviously, replace `/home/user/.rclone.conf` with the path to your config and replace `remote:/path/to/remote/folder` with the name of your remote the path you want to mount.
|
Obviously, replace `/home/user/.rclone.conf` with the path to your config and replace `remote:/path/to/remote/folder` with the name of your remote the path you want to mount.
|
||||||
|
|
||||||
#### Important:
|
|
||||||
- rclonefs wrapper has to be in the PATH=/usr/local/bin:/usr/bin. mount is suid and doesn't ignores pre-set PATHs. Similarly, rclone invocation fails to find fusermount if not invoked with PATH=$PATH explicitly set.
|
|
||||||
|
|
||||||
## autofs
|
## autofs
|
||||||
|
|
||||||
You can use the above mount wrapper with autofs, but note you **must** supply the `--allow-non-empty` option otherwise autofs will lock up entering the mount (see [#3246](https://github.com/ncw/rclone/issues/3246)).
|
You can use the above mount wrapper with autofs, but note you **must** supply the `--allow-non-empty` option otherwise autofs will lock up entering the mount (see [#3246](https://github.com/ncw/rclone/issues/3246)).
|
||||||
|
|
||||||
An example config entry for autofs might look like this:
|
An example config entry for autofs might look like this:
|
||||||
|
|
||||||
remote -fstype=fuse,config=/home/$USER/.config/rclone/rclone.conf,allow-other,allow-non-empty :rclonefs#remote:
|
remote -fstype=fuse.rclonefs,config=/home/$USER/.config/rclone/rclone.conf,allow-other,allow-non-empty :remote:
|
||||||
|
|
||||||
## systemd
|
## systemd
|
||||||
|
|
||||||
@ -72,9 +71,9 @@ Alternatively if you're a `systemd` convert and want more control over when rclo
|
|||||||
After=network-online.target
|
After=network-online.target
|
||||||
|
|
||||||
[Mount]
|
[Mount]
|
||||||
What=rclonefs#remote:/path/to/remote/folder
|
What=remote:/path/to/remote/folder
|
||||||
Where=/mnt/rclone
|
Where=/mnt/rclone
|
||||||
Type=fuse
|
Type=fuse.rclonefs
|
||||||
Options=auto,config=/home/user/.rclone.conf,allow-other,default-permissions,read-only,max-read-ahead=16M
|
Options=auto,config=/home/user/.rclone.conf,allow-other,default-permissions,read-only,max-read-ahead=16M
|
||||||
TimeoutSec=30
|
TimeoutSec=30
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user