Rclone mount script shows blank directory

I already shared a solution above but you never shared what the error was.

[felix@gemini ~]$ rclone ls "Test Me"
[felix@gemini ~]$ rclone ls 'Test Me'
[felix@gemini ~]$ rclone ls Test\ Me/

Any of those work.

Just a bunch of this. If you want, I can attach the whole log.

rclone.log
2019/08/29 21:42:44 DEBUG : rclone: Version "v1.48.0" starting with parameters ["/usr/bin/rclone" "mount" "--config=/home/pi/.config/rclone/rclone.conf" "--allow-other" "--log-level" "DEBUG" "--log-file" "/opt/rclone.log" "media:TV\\ Shows/ /media/tv_shows"]
Usage:
  rclone mount remote:path /path/to/mountpoint [flags]

Flags:
      --allow-non-empty                        Allow mounting over a non-empty directory.
      --allow-other                            Allow access to other users.
      --allow-root                             Allow access to root user.
      --attr-timeout duration                  Time for which file/directory attributes are cached. (default 1s)
      --daemon                                 Run mount as a daemon (background mode).
      --daemon-timeout duration                Time limit for rclone to respond to kernel (not supported by all OSes).
      --debug-fuse                             Debug the FUSE internals - needs -v.
      --default-permissions                    Makes kernel enforce access control based on the file mode.
      --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. (default 1000)
  -h, --help                                   help for mount
      --max-read-ahead SizeSuffix              The number of bytes that can be prefetched for sequential reads. (default 128k)
      --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.
  -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. Only on supported remotes. Set to 0 to disable. (default 1m0s)
      --read-only                              Mount read-only.
      --uid uint32                             Override the uid field set by the filesystem. (default 1000)
      --umask int                              Override the permission bits set by the filesystem.
      --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-read-chunk-size SizeSuffix         Read the source objects in chunks. (default 128M)
      --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)
      --volname string                         Set the volume name (not supported by all OSes).
      --write-back-cache                       Makes kernel buffer writes before sending them to rclone. Without this, writethrough caching is used.

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 1 non flag arguments: ["media:TV\\ Shows/ /media/tv_shows"]

Can you share:

cat <yourservice.file>

systemctl status <yourservice.file>

Of course.

cat gdrive-team_movies.service
pi@pi:~ $ cat /etc/systemd/system/gdrive-team_tv-shows.service
[Unit]
Description=gdrive-team_media_tv-shows_mount
Wants=network-online.target 
After=network-online.target

[Service]
Type=notify
ExecStart=/usr/bin/rclone mount \
	--config=/home/pi/.config/rclone/rclone.conf \
	--allow-other \
	--log-level DEBUG \
	--log-file /opt/rclone.log \
	media:"TV\ Shows/ /media/tv_shows"
Restart=always
RestartSec=10
ExecStop=/bin/fusermount -u /media/tv_shows
User=pi
Group=pi

[Install]
WantedBy=multi-user.target
systemctl status gdrive-team_tv-shows
● gdrive-team_tv-shows.service - gdrive-team_media_tv-shows_mount
   Loaded: loaded (/etc/systemd/system/gdrive-team_tv-shows.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Thu 2019-08-29 21:54:32 IST; 2s ago
  Process: 1684 ExecStart=/usr/bin/rclone mount --config=/home/pi/.config/rclone/rclone.conf --allow-other --log-level DEBUG --log-file /opt/rclone.log media:TV\ Shows/ /media/tv_shows (code=exited, status=1/FAILURE)
 Main PID: 1684 (code=exited, status=1/FAILURE)

Once you make changes to your service files, you have to reload those changes.

systemctl daemon-reload

is the command as your service file doesn't match the command.

Yeah, I did that every time. No idea what's happening.

Even tried

sudo

systemctl stop gdrive-team_tv-shows
systemctl disable gdrive-team_tv-shows
systemctl daemon-reload
systemctl reset-failed

Restarted, then enabled the service and started it, same error :frowning:

Change to:

media:"TV Shows/media/tv_shows"

I'm assuming this works:

rclone ls media:"TV Shows/media/tv_shows"

Yeah, was about to post...

media:"TV Shows/" /media/tv_shows instead of

media:"TV Shows/ /media/tv_shows".

What does this show?

rclone lsd media:"TV Shows"

I was able to get it working.

The actual directories.

pi@pi:~ $ rclone lsd media:"TV Shows"
          -1 2019-07-30 21:41:01        -1 #PLEX
          -1 2019-08-05 16:56:44        -1 Archive
          -1 2019-08-05 16:56:58        -1 To Be Added

Oh, that's unfortunate. I see now that you were mounting:

media:"TV Shows/"
to
/media/tv_shows

So that's definitely my mistake as I told you the wrong thing!

1 Like

No worries. You've helped me a lot and I sincerely appreciate your time and patience.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.