mirror of
https://github.com/rclone/rclone.git
synced 2025-02-17 11:01:10 +01:00
Updated rclone mount helper script (markdown)
parent
0d2333c67a
commit
51f5f00f97
@ -1,4 +1,45 @@
|
||||
# rclonefs helper script
|
||||
# rclone as mount helper (from v1.57 on)
|
||||
|
||||
Please symlink rclone binary (usually `/usr/bin/rclone`) to `/sbin/mount.rclone` (and optionally `/usr/bin/rclonefs`).
|
||||
After that you can run rclone mount in a classic way:
|
||||
```
|
||||
mount sftp1:subdir /mnt/data -t rclone -o vfs_cache_mode=writes,sftp_key_file=/path/to/pem
|
||||
```
|
||||
|
||||
or create systemd mount units (provide explicit `config=...,cache-dir=...` as mounts run without `HOME` !)
|
||||
```
|
||||
# /etc/systemd/system/mnt-data.mount
|
||||
[Unit]
|
||||
After=network-online.target
|
||||
[Mount]
|
||||
Type=rclone
|
||||
What=sftp1:subdir
|
||||
Where=/mnt/data
|
||||
Options=rw,allow_other,args2env,vfs-cache-mode=writes,config=/etc/rclone.conf,cache-dir=/var/rclone
|
||||
```
|
||||
|
||||
optionally augmented by systemd automount unit
|
||||
```
|
||||
# /etc/systemd/system/mnt-data.automount
|
||||
[Unit]
|
||||
After=network-online.target
|
||||
Before=remote-fs.target
|
||||
[Automount]
|
||||
Where=/mnt/data
|
||||
TimeoutIdleSec=600
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
or add in `/etc/fstab` a line like
|
||||
```
|
||||
sftp1:subdir /mnt/data rclone rw,noauto,nofail,_netdev,x-systemd.automount,args2env,vfs_cache_mode=writes,config=/etc/rclone.conf,cache_dir=/var/cache/rclone 0 0
|
||||
```
|
||||
- or use classic `Automountd`
|
||||
|
||||
For details refer to https://github.com/rclone/rclone/pull/5594
|
||||
|
||||
# rclonefs helper script (old releases before v1.57)
|
||||
|
||||
To enable mounting a rclone volume using system mount tools, the following helper script must be named `rclonefs` and placed in `$PATH` (e.g. in `/usr/local/bin`):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user