GoAdmio

storage

Mount a saved rclone remote onto the server's filesystem, with a local VFS cache

On this page: Overview · Quick start · Syntax · Options · Output · Examples · Troubleshooting · Details · See also


Overview

/go/storage mounts an rclone remote at /<name> as a FUSE filesystem, with caching enabled so repeated reads don't keep hitting the remote. It's meant to be run at boot (from a systemd service or @reboot cron entry set up separately — this command only performs the mount itself, once, when it's run).

[!WARNING] As written, the check for whether the remote exists in rclone.conf almost never succeeds — see Known issues. In practice this command is likely to print "not found" and exit even when the remote is configured correctly.

The call is appended to /var/log/go/storage.log.


Quick start

# Set up an rclone remote named "storage" first, then:
/go/storage

Syntax

/go/storage

The command takes no arguments. The remote's name comes from /var/go/etc/storage, or defaults to storage if that file doesn't exist.


Options

None. Everything is read from the server:

Input Where it comes from
Remote and mount point name /var/go/etc/storage (letters, digits, and hyphens only; anything else is stripped), or storage if that file is missing
rclone remote configuration /root/.config/rclone/rclone.conf, checked for a matching [<name>] section

Output

Outcome Output
Mounted successfully None
Remote not found (or the check failed to run — see below) Rclone [<name>] not found in file: followed by the config file's path. Exit status 1.

Examples

# Default remote name ("storage")
/go/storage
# Check it actually mounted
mountpoint /storage
df -h /storage
# Use a different remote/mount name
echo -n "backups" | sudo tee /var/go/etc/storage
/go/storage

Troubleshooting

Symptom Likely cause Fix
Rclone [<name>] not found in file: even though the remote is clearly in rclone.conf A bug in the existence check — it almost never matches. See Known issues. Confirm the remote's actual name with rclone listremotes, then mount it directly: rclone mount <name>:<name> /<name> --daemon ... with the same flags shown in Details.
Same error, and you aren't running as root rclone.conf is normally only readable by root, and the existence check doesn't use sudo to read it. Run the command as root.
rclone: command not found rclone isn't installed. Install rclone.
The mount point has the old local files instead of the remote's contents --allow-non-empty lets rclone mount over a directory that already has files in it; they're hidden underneath while mounted, not deleted. Unmount, move any real local files elsewhere, and mount again.
High memory use after mounting /tmp is often a RAM-backed tmpfs on Linux, and the VFS cache (--cache-dir /tmp/rclone) can grow up to 10 GB. Point the cache at a disk-backed directory instead of /tmp, especially on a server with limited RAM.
The cache seems to reset unexpectedly Many systems periodically clean old files out of /tmp, which would also clear the rclone cache living there. Use a dedicated cache directory outside /tmp.
Running the command again while already mounted There's no check for an existing mount first. Check with mountpoint /<name> before mounting again; unmount first if you need to remount.

Details

What it does

  1. Reads the remote/mount name from /var/go/etc/storage, sanitized to letters, digits, and hyphens, or uses storage if the file doesn't exist.
  2. Checks whether a section for that name exists in /root/.config/rclone/rclone.conf.
  3. If found, creates /<name> and runs:
    rclone mount <name>:<name> /<name> --daemon --allow-other --allow-non-empty \
      --vfs-cache-mode full --cache-dir /tmp/rclone \
      --vfs-cache-max-size 10G --vfs-cache-max-age 72h \
      --transfers 32 --checkers 32 --buffer-size 128M
    
  4. If not found, prints the error message above and exits.

Known issues


See also

Command Description
bucket Create a new S3 bucket name and access key
s3 Mount an S3 bucket on a GoAdmio server
minio Install MinIO on a GoAdmio server
backup Back up one or all accounts to local disk or remote storage, manually or on a schedule
compress Install FUSE and compressed filesystem tools