MergerFS drive does not recognize files moved to GoogleCloudDrive using rclone move

What is the problem you are having with rclone?

MergerFS does not list the files after they are moved from a local USB drive to the google cloud drive

What is your rclone version (output from rclone version)

[plex@ms1 gmedia]$ rclone version
rclone v1.52.0

  • os/arch: linux/amd64
  • go version: go1.14.3

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Centos 7, 64bit
3.10.0-1127.8.2.el7.x86_64

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

GoogleDrive

I am using @ Animosity022 guide to use google drive to store Plex media files on my testbed.
I can mount the google drive, create a MergerFS drive, download a file using Radarr+Transmission, after download is done Radarr creates a HardLink from the download folder to the Media Root directory which Plex has access to; Plex is able to detect and play the file. And After the seeding is done Radarr removes the media file from the transmission.
The problem is when I run the "upload_cloud" script manually, it move the file from the local drive (/mnt/storage2) to gcrypt:; the files are not listed under the MergerFS drive (/mnt/gmedia) anymore.

  • I am using a USB drive mounted at /mnt/storage2 as the local drive
  • Transmission+Radarr+Sonarr points to the MergerFS mount point (/mnt/gmedia)
  • upload_cloud move the files from the local drive to gcrypt:
  • /mnt/storage2 and /mnt/gdrive have identical folder structure
    -rclone move log shows that the files are transferred
  • Hardlink is configured for Radarr and Sonarr and

gmedia.service:
[root@ms1 app_containers]# cat /etc/systemd/system/gmedia.service
[Unit]
Description=gmedia mergerfs mount
Requires=rclone.service
After=rclone.service
RequiresMountsFor=/mnt/storage2/
RequiresMountsFor=/mnt/gdrive

[Service]
Type=forking
ExecStart=/usr/bin/mergerfs /mnt/storage2/:/mnt/gdrive /mnt/gmedia -o rw,async_read=false,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=partial,dropcacheonclose=true
KillMode=process
Restart=on-failure

[Install]
WantedBy=multi-user.target

Below is how the setup looks like:

	[plex@ms1 mnt]$ tree /mnt/storage2/
	/mnt/storage2/
	├── downloads2
	│   ├── complete
	│   ├── incomplete
	│   ├── raddar
	│   └── sonarr
	├── movies2
	└── tvshows2
	
	7 directories, 0 files
	
	[plex@ms1 mnt]$ tree /mnt/gdrive/
	/mnt/gdrive/
	├── downloads2
	│   ├── complete
	│   ├── incomplete
	│   ├── raddar
	│   └── sonarr
	├── movies2
	└── tvshows2
	
	7 directories, 0 files
	
	[plex@ms1 mnt]$ tree /mnt/gmedia/
	/mnt/gmedia/
	├── downloads2
	│   ├── complete
	│   ├── incomplete
	│   ├── raddar
	│   └── sonarr
	├── movies2
	└── tvshows2
	
	[plex@ms1 mnt]$ rclone ls gcrypt:     #rclone works and it is empty
	[plex@ms1 mnt]$
	
             [plex@ms1 app_containers]$ rclone config
	Current remotes:
	
	Name                 Type
	====                 ====
	gcrypt               crypt
	gdrive               drive
	
	
 I downloaded a movie using Radarr+Transmissions ** Transmission stops seeding the file**
	
	[plex@ms1 mnt]$ tree /mnt/gmedia/
	/mnt/gmedia/
	├── downloads2
	│   ├── complete
	│   ├── incomplete
	│   ├── raddar
	│   └── sonarr
	├── movies2
	│   └── Yesterday\ (2019)
	│       ├── Yesterday\ -\ 2019.mkv
	│       └── Yesterday\ -\ 2019.srt
	└── tvshows2
	
	[plex@ms1 mnt]$ tree /mnt/storage2/
	/mnt/storage2/
	├── downloads2
	│   ├── complete
	│   ├── incomplete
	│   ├── raddar
	│   └── sonarr
	├── movies2
	│   └── Yesterday\ (2019)
	│       ├── Yesterday\ -\ 2019.mkv
	│       └── Yesterday\ -\ 2019.srt
	└── tvshows2
	
	[plex@ms1 gmedia]$ tree /mnt/gdrive/
	/mnt/gdrive/
	├── downloads2
	│   ├── complete
	│   ├── incomplete
	│   ├── raddar
	│   └── sonarr
	├── movies2
	└── tvshows2
	
	***HardLink is created **

	[plex@ms1 mnt]$ stat /mnt/gmedia/movies2/Yesterday\ \(2019\)/Yesterday\ -\ 2019.mkv
	  File: ‘/mnt/gmedia/movies2/Yesterday (2019)/Yesterday - 2019.mkv’
	  Size: 837109963       Blocks: 1635000    IO Block: 4096   regular file
	Device: 100017h/1048599d        Inode: 18356272379978902384  Links: 1
	Access: (0644/-rw-r--r--)  Uid: ( 1000/    plex)   Gid: ( 1000/    plex)
	Context: system_u:object_r:fusefs_t:s0
	Access: 2020-06-01 14:21:12.929845268 -0400
	Modify: 2020-06-01 14:03:48.037111000 -0400
	Change: 2020-06-01 14:08:56.826893378 -0400
	 Birth: -
	
	[plex@ms1 mnt]$ ll /mnt/gmedia/movies2/
	total 8
	drwxr-xr-x+ 2 plex plex 4096 Jun  1 14:08 Yesterday (2019)
	[plex@ms1 mnt]$
	
	*** Plex points to /mnt/gmedia and is able to find and add the file to the library;***
	
	Then I manually run the following scripts
	
	/usr/bin/rclone move /mnt/storage2/ gcrypt: --log-file /opt/rclone/log/upload.log -v --exclude-from /opt/rclone/scripts/excludes --delete-empty-src-dirs --fast-list --drive-stop-on-upload-limit
	
	Exclude file
	*partial~
	*sidecar
	lost+found/**
	torrents/**
	NZB/**
	downloads2/**
	
	[plex@ms1 gmedia]$ tree /mnt/gmedia/
	/mnt/gmedia/
	├── downloads2
	│   ├── complete
	│   ├── incomplete
	│   ├── raddar
	│   └── sonarr
	├── movies2
	└── tvshows2
	
	7 directories, 0 files
	
	[plex@ms1 gmedia]$ tree /mnt/storage2/
	/mnt/storage2/
	└── downloads2
	    ├── complete
	    ├── incomplete
	    ├── raddar
	    └── sonarr
	
	5 directories, 0 files
	
	[plex@ms1 gmedia]$ tree /mnt/gdrive/
	/mnt/gdrive/
	├── downloads2
	│   ├── complete
	│   ├── incomplete
	│   ├── raddar
	│   └── sonarr
	├── movies2
	└── tvshows2
	
	[plex@ms1 gmedia]$ rclone ls gcrypt:
	837109963 movies2/Yesterday (2019)/Yesterday - 2019.mkv
	      148 movies2/Yesterday (2019)/Yesterday - 2019.srt

I think you forgot to fill in the rest of the template. All you've included is mergerfs configuration and nothing related to rclone besides the move command.

Can you provide the information from the template such as debug logs and mount detail?

sure,

[plex@ms1 log]$ cat /etc/systemd/system/rclone.service
[Unit]
Description=RClone Service
Wants=network-online.target
After=network-online.target
#AssertPathIsDirectory= /mnt/gdrive

[Service]
Type=notify
Environment=RCLONE_CONFIG=/opt/rclone/rclone.conf
Environment=RCLONE_USER_AGENT='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36'
RestartSec=5
KillMode=none
ExecStart=/usr/bin/rclone mount gcrypt: /mnt/gdrive
--allow-other
--config=/opt/rclone/rclone.conf
--drive-chunk-size 128M
--vfs-read-chunk-size 32M
--dir-cache-time 1000h
--log-level INFO
--log-file /opt/rclone/log/rclone.log
--poll-interval 15s
--umask 002
--uid 1000
--gid 1000
--rc
--rc-addr :5572
--user-agent=${RCLONE_USER_AGENT}
--async-read=false

ExecStop=/bin/fusermount -uz /mnt/gdrive
ExecStartPost=/usr/bin/rclone rc vfs/refresh recursive=true --rc-addr 127.0.0.1:5572 _async=true
Restart=on-failure
RestartSec=10
User=plex
Group=plex

[Install]
WantedBy=multi-user.target

rclone.conf:

[gdrive]
type = drive
client_id = ************
client_secret = *******************************
scope = drive
root_folder_id = 1wAynwmW0h6cf0uAFcVri_-LFrhNXYic1
token = {"************************"}

[gcrypt]
type = crypt
remote = gdrive:
filename_encryption = standard
directory_name_encryption = true
password = ****************
password2 = *****************

rclone.log (12.9 KB) upload.log (4.4 KB)

These errors are certainly affecting the change notify which isn't then expiring the vfs cache.

Encrypted drive 'gcrypt:': ChangeNotify was unable to decrypt "media/f5e6q8dnsupl363j1j0ma95fbs": not a multiple of blocksize

Do you have non-encrypted files in the crypt remote location? I'm guessing you do.

Typically you'd have your crypt in a directory like this:

[gcrypt]
type = crypt
remote = gdrive:directory
filename_encryption = standard
directory_name_encryption = true
password = ****************
password2 = *****************

In your case that looks like the media directory.

Yes, wrong "remote" was the problem, gcrypt was connected to the root folder of google drive instead of "media" folder; I changed the remote to gdrive:/media and it worked.

Thanks,

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