Mount error in log

What is the problem you are having with rclone?

I've been using rclone with gdrive in a 'typical' sonarr/radarr/plex setup. I've set up a new PC for plex and am setting up the connection to gdrive on this new system. I have created a remote to gdrive, and set up the mount, I can see and access the files on the remote, yet the logs are filled with this error.

Command mount needs 2 arguments minimum: you provided 0 non flag arguments: []
I have also apparently hit my quota as evidenced by this error (and that playback on plex stopped when this error popped up)

022/03/09 09:46:28 ERROR : TV/Adult/BoJack Horseman (2014) [imdb-tt3398228]/Season 01/BoJack Horseman (2014) - S01E05 - Live Fast Diane Nguyen [NF WEBDL-1080p][AC3 5.1][x264]-NTb.mkv: vfs cache: failed to to download: vfs reader: failed to write to cache file: open file failed: googleapi: Error 403: The download quota for this file has been exceeded., downloadQuotaExceeded

I don't think the two are related, but I'm noting for completeness. The log below is a snippet that keeps repeating

The goal is to understand and fix the first error.

Run the command 'rclone version' and share the full output of the command.

rclone v1.57.0

  • os/version: ubuntu 20.04 (64 bit)
  • os/kernel: 5.13.0-35-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.17.2
  • go/linking: static
  • go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

sudo rclone mount gdrive: /media/gdrive --allow-other --allow-non-empty --dir-cache-time 5000h --cache-dir /media/rclone/cache --log-file /media/rclone/rclone.log --log-level INFO --drive-pacer-min-sleep 10ms --drive-pacer-burst 200 --vfs-cache-mode full --vfs-cache-max-size 100G --vfs-cache-poll-interval 5m --vfs-read-ahead 2G --buffer-size 16M --umask 000 --daemon

The rclone config contents with secrets removed.

[gdrive]
type = drive
client_id = xxx.apps.googleusercontent.com
client_secret = XXX
scope = drive
token = xxx
team_drive =

A log from the command with the -vv flag

Usage:
  rclone mount remote:path /path/to/mountpoint [flags]

Flags:
      --allow-non-empty                        Allow mounting over a non-empty directory (not supported on Windows)
      --allow-other                            Allow access to other users (not supported on Windows)
      --allow-root                             Allow access to root user (not supported on Windows)
      --async-read                             Use asynchronous reads (not supported on Windows) (default true)
      --attr-timeout duration                  Time for which file/directory attributes are cached (default 1s)
      --daemon                                 Run mount in background and exit parent process (as background output is suppressed, use --log-file with --log-format=pid,... to monitor) (not supported on Windows)
      --daemon-timeout duration                Time limit for rclone to respond to kernel (not supported on Windows)
      --daemon-wait duration                   Time to wait for ready mount from daemon (maximum time on Linux, constant sleep time on OSX/BSD) (not supported on Windows) (default 1m0s)
      --debug-fuse                             Debug the FUSE internals - needs -v
      --default-permissions                    Makes kernel enforce access control based on the file mode (not supported on Windows)
      --dir-cache-time duration                Time to cache directory entries for (default 5m0s)
      --dir-perms FileMode                     Directory permissions (default 0777)
      --file-perms FileMode                    File permissions (default 0666)
      --fuse-flag stringArray                  Flags or arguments to be passed direct to libfuse/WinFsp (repeat if required)
      --gid uint32                             Override the gid field set by the filesystem (not supported on Windows)
  -h, --help                                   help for mount
      --max-read-ahead SizeSuffix              The number of bytes that can be prefetched for sequential reads (not supported on Windows) (default 128Ki)
      --network-mode                           Mount as remote network drive, instead of fixed disk drive (supported on Windows only)
      --no-checksum                            Don't compare checksums on up/download
      --no-modtime                             Don't read/write the modification time (can speed things up)
      --no-seek                                Don't allow seeking in files
      --noappledouble                          Ignore Apple Double (._) and .DS_Store files (supported on OSX only) (default true)
      --noapplexattr                           Ignore all "com.apple.*" extended attributes (supported on OSX only)
  -o, --option stringArray                     Option for libfuse/WinFsp (repeat if required)
      --poll-interval duration                 Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s)
      --read-only                              Mount read-only
      --uid uint32                             Override the uid field set by the filesystem (not supported on Windows)
      --umask int                              Override the permission bits set by the filesystem (not supported on Windows) (default 18)
      --vfs-cache-max-age duration             Max age of objects in the cache (default 1h0m0s)
      --vfs-cache-max-size SizeSuffix          Max total size of objects in the cache (default off)
      --vfs-cache-mode CacheMode               Cache mode off|minimal|writes|full (default off)
      --vfs-cache-poll-interval duration       Interval to poll the cache for stale objects (default 1m0s)
      --vfs-case-insensitive                   If a file name not found, find a case insensitive match
      --vfs-read-ahead SizeSuffix              Extra read ahead over --buffer-size when using cache-mode full (default 0)
      --vfs-read-chunk-size SizeSuffix         Read the source objects in chunks (default 128Mi)
      --vfs-read-chunk-size-limit SizeSuffix   If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
      --vfs-read-wait duration                 Time to wait for in-sequence read before seeking (default 20ms)
      --vfs-used-is-size rclone size           Use the rclone size algorithm for Used size
      --vfs-write-back duration                Time to writeback files after last use when using cache (default 5s)
      --vfs-write-wait duration                Time to wait for in-sequence write before giving error (default 1s)
      --volname string                         Set the volume name (supported on Windows and OSX only)
      --write-back-cache                       Makes kernel buffer writes before sending them to rclone (without this, writethrough caching is used) (not supported on Windows)

Use "rclone [command] --help" for more information about a command.
Use "rclone help flags" for to see the global flags.
Use "rclone help backends" for a list of supported services.
Command mount needs 2 arguments minimum: you provided 0 non flag arguments: []
2022/03/09 09:46:07 INFO  : TV/Adult/BoJack Horseman (2014) [imdb-tt3398228]/Season 01/BoJack Horseman (2014) - S01E02 - BoJack Hates The Troops [NF WEBDL-1080p][AC3 5.1][x264]-NTb.mkv: vfs cache: downloader: error count now 1: vfs reader: failed to write to cache file: open file failed: googleapi: Error 403: The download quota for this file has been exceeded., downloadQuotaExceeded

hello,

need to post the full output from the command line, post the exact command and the exact output from rclone.
just not a snippet.
and need to post the full debug log output.
so change --log-level INFO to --log-level DEBUG and post the log file.

that is a message from google, nothing rclone can do about that.
have to wait up to 24 hours for google to reset that counter so you can download that specfic file again.

Here's a DEBUG log. Thanks for looking.

hard to work with that debug log.

  1. delete the log
  2. run the rclone command one time,
  3. post the full debug log.

and are you running this commands from the terminal command line or via script?

new log

I'm entering this via command line. ubuntu desktop 20.04 (headless)

nothing rclone can do about that.
you have triggered a quota/limit set by google for that specific file.
you will just have to wait until google resets the quota.

and if you post again.

  1. delete the current debug log. please do not keep re-posting old debug logs.
  2. run whatever rclone command that recreates your issue.
  3. post the exact command that created the error.
  4. post the entire debug log.

I understand the 403 is not rclone error.

This is a new log. Here's the process I used

  1. reboot

  2. rm rclone.log

  3. mount with sudo rclone mount gdrive: /media/gdrive --allow-other --allow-non-empty --dir-cache-time 5000h --cache-dir /media/rclone/cache --log-file /media/rclone/rclone.log --log-level DEBUG --drive-pacer-min-sleep 10ms --drive-pacer-burst 200 --vfs-cache-mode full --vfs-cache-max-size 100G --vfs-cache-poll-interval 5m --vfs-read-ahead 2G --buffer-size 16M --umask 000 --daemon

  4. let it run for a few moments

  5. reboot

  6. Copied log contents

  1. not sure you need to reboot twice, but if you want that, ok.
  2. to make testing easier, do not use --daemon
  3. are you going to post the full debug log that has whatever error you need help with?

I guess I want clear in the first post. The error is

Command mount needs 2 arguments minimum: you provided 0 non flag arguments: [], which is in all the logs I have provided. From the last log
rclone log · GitHub

This can be seen on lines 51, 102, 204, 255, etc.

that error means you are running rclone mount, not the actual real valid command.

for example, as a test, run a real command, on the command line.

rclone mount gdrive: /media/gdrive -vv

Thanks, interesting there's an invalid token

2022/03/09 14:04:56 DEBUG : rclone: Version "v1.57.0" starting with parameters ["rclone" "mount" "gdrive:" "/media/gdrive" "-vv"]
2022/03/09 14:04:56 DEBUG : Creating backend with remote "gdrive:"
2022/03/09 14:04:56 DEBUG : Using config file from "/home/bulfinch/.config/rclone/rclone.conf"
2022/03/09 14:04:56 DEBUG : gdrive: Loaded invalid token from config file - ignoring
2022/03/09 14:04:56 DEBUG : Saving config "token" in section "gdrive" of the config file
2022/03/09 14:04:56 DEBUG : gdrive: Saved new token in config file
2022/03/09 14:04:57 DEBUG : Google drive root '': 'root_folder_id = 0ANdt8sL49DaVUk9PVA' - save this in the config to speed up startup
2022/03/09 14:04:57 Fatal error: Directory already mounted, use --allow-non-empty to mount anyway: /media/gdrive

Directory already mounted
that means you have another rclone command running.
that is due to using --daemon

invalid token
that is normal behavior, tokens expire, rclone request a new token and saves it to the rclone config file.

fixed the token, rebooted and

bulfinch@PlexServer:/media/rclone$ rclone mount gdrive: /media/gdrive -vv
2022/03/09 14:18:02 DEBUG : rclone: Version "v1.57.0" starting with parameters ["rclone" "mount" "gdrive:" "/media/gdrive" "-vv"]
2022/03/09 14:18:02 DEBUG : Creating backend with remote "gdrive:"
2022/03/09 14:18:02 DEBUG : Using config file from "/home/bulfinch/.config/rclone/rclone.conf"
2022/03/09 14:18:03 DEBUG : Google drive root '': 'root_folder_id = 0ANdt8sL49DaVUk9PVA' - save this in the config to speed up startup
2022/03/09 14:18:03 DEBUG : Google drive root '': Mounting on "/media/gdrive"
2022/03/09 14:18:03 mount helper error: fusermount: user has no write access to mountpoint /media/gdrive
2022/03/09 14:18:03 Fatal error: failed to mount FUSE fs: fusermount: exit status 1

so I deleted the mount, created a new one with the same name with the same result

bulfinch@PlexServer:/media/rclone$ rclone mount gdrive: /media/gdrive -vv
2022/03/09 14:18:02 DEBUG : rclone: Version "v1.57.0" starting with parameters ["rclone" "mount" "gdrive:" "/media/gdrive" "-vv"]
2022/03/09 14:18:02 DEBUG : Creating backend with remote "gdrive:"
2022/03/09 14:18:02 DEBUG : Using config file from "/home/bulfinch/.config/rclone/rclone.conf"
2022/03/09 14:18:03 DEBUG : Google drive root '': 'root_folder_id = 0ANdt8sL49DaVUk9PVA' - save this in the config to speed up startup
2022/03/09 14:18:03 DEBUG : Google drive root '': Mounting on "/media/gdrive"
2022/03/09 14:18:03 mount helper error: fusermount: user has no write access to mountpoint /media/gdrive
2022/03/09 14:18:03 Fatal error: failed to mount FUSE fs: fusermount: exit status 1

at this point, you understand the need to to run a real command, not rclone mount,

so i would run your old command.
tho for testing, do not use --daemon

and fwiw, no need to keep rebooting.

Thanks for your patience

I don't precisely see the difference, what do you mean by "real valid command". your example looks like mine (minus the flags). What is the preferred way to mount with all the flags?

well, you kept getting
Command mount needs 2 arguments minimum: you provided 0 non flag arguments: []
from running a non-valid command, lacking flags and arguments such as rclone mount

at this point, just keep running commands with a remote, a mountpoint, and flags with values.
such as my example or your full command from up above.

Forgive me, I'm new to linux/ubuntu. I did some poking around and found a service file which was running on startup etc/systemd/system/rclone.service. I think this is where the command mount needs 2 arguments message was being generated from. Once I disabled the service from starting, the message no longer appears in the logs. I tried to fuss with the file to make it work correctly (it would be nice to have the mount command run automatically) but I keep getting errors when I start the service. Is there anything glaring in this file?


# /etc/systemd/system/rclone.service
[Unit]
Description=Google Drive (rclone)
Requires=systemd-networkd.service
AssertPathIsDirectory=/media/gdrive
After=network-online.target

[Service]
Type=notify
ExecStart=/usr/bin/rclone mount \
        --config=/home/bulfinch/.config/rclone/rclone.conf \
	--allow-other \
	--dir-cache-time 5000h \
	--log-file /media/rclone/rclone.log \
	--log-level INFO \
	--poll-interval 10s \
	--umask 002 \
	--drive-pacer-min-sleep 10ms \
	--drive-pacer-burst 200 \
	--vfs-cache-mode full \
	--vfs-cache-max-size 500G \
	--vfs-cache-max-age 5000h \
	--vfs-cache-poll-interval 10m \
	--vfs-read-ahead 2G \
	--buffer-size 32M \
	--daemon
        --cache-tmp-upload-path=/media/rclone/upload \
        --cache-chunk-path=/media/rclone/chunks \
        --cache-dir=/media/rclone/vfs \
        --cache-db-path=/rclone/rclone/db \
        --allow-non-empty \
ExecStop=/bin/fusermount -u /media/gdrive
Restart=always
RestartSec=10
TimeoutSec=45

[Install]
WantedBy=multi-user.target

sure, i am not linux expert but i have learnt a few things i can share.

  1. --daemon
    problem 1. trailing slash is missing
    problem 2. not needed when using systemd, so remove it

  2. these do nothing, remove them
    --cache-tmp-upload-path
    --cache-chunk-path
    --cache-db-path

  3. --allow-non-empty
    unless you are 1000% sure you understand this flag, remove it.
    and if you did understand it, then you would never have used it in the first place.

  4. as for the rest, mimic this as closely as possible
    https://github.com/animosity22/homescripts/blob/master/systemd/rclone-drive.service

Perfect. Thank you.

i think maybe what you need is make sure your mountpoint is not lock by any other program, and make sure it is empty.

probably you can try

sudo fusermount -zuq /media/gdrive

and try mount again with simplest set

rclone mount gdrive: /media/gdrive -vv