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