I moved from Google Suite to Hetzner cloud storage running Windows Server, and I'm mounting it as FTP to my Whatbox server (where plex is installed) using rclone to scan for content.
Moving from google rclone mount, I assumed there are less limitations with ftp since it's me who's running the server, so I tried removing a few parameters from the mount command to make it as simple as possible, but I can't seem to find the right command. I keep running into issues that cause either plex to crash, or for the mount itself to break. The issues that I'm facing:
Scanning libraries after adding new files takes a very long time as it goes through every single folder again, and I have terabytes of data. With gsuite mount, it would detect the new files and scan the newly modified directories only. Scan would only take seconds. Now it takes 10-20 mins. I think this has to do with cache?
While scanning libraries, it tends to crash a lot. By crash, I mean either Plex just hangs while scanning the same movie/show and stops playing anything, resulting in having to restart it.
Another way it crashes while scanning for a while is all folders in the mount become empty when I browse them. So Plex thinks that the files were deleted and my content would move to the trash, and I would have to unmount then remount for it to work
I keep getting errors in the SSH of the whatbox server while it's playing or scanning content. It's usually like this:
These issues have been causing my plex to constantly scan, constantly crash, and just cause a headache as I haven't been able to figure out how to fix it. I'm not an expert when it comes to parameters for the mount command, and I've tried browsing the forums here but couldn't find the right modifications that I need to make for an ftp mount.
What I would like to achieve:
Be able to scan the libraries quickly without going through every single folder in the mount
Be able to detect new files a few seconds after I've added them to the mounted server (I'm assuming this has to do with --poll-interval)
Not get errors often resulting in having to remount
I hope this isn't too much to ask. Any help would be greatly appreciated. Thank you
Run the command 'rclone version' and share the full output of the command.
rclone v1.63.1-DEV
os/version: gentoo 2.14 (64 bit)
os/kernel: 5.15.74-gentoo-whatbox (x86_64)
os/type: linux
os/arch: amd64
go/version: go1.20.5
go/linking: dynamic
go/tags: none
Which cloud storage system are you using? (eg Google Drive)
Hetzner storage running Windows Server, mounting as ftp to Whatbox server (seedbox) with plex
The command you were trying to run (eg rclone copy /tmp remote:tmp)
not sure what you mean, ftp server inside windows server, ftp with hetzner storagebox or what?
what does window server have to do with it?
when i rclone mount with hetzner stoargebox, i use webdav.
ftp is terrible, sftp slightly less terrible.
need to prime/pre-load the vfs dir cache.
to the mount command, add --rc --rc-no-auth
once the mount is live, run+wait rclone rc vfs/refresh
trigger plex to scan the library.
gdrive supports ChangeNotify, ftp,sftp,webdav do not.
using debug output would show that.
so if you add a new file to ftp server, rclone will not auto-magically detect it.
plex would have to scan the mountpoint, which would trigger rclone to scan the ftp server.
--cache-db-purge - does nothing. --drive-chunk-size 16M - does nothing, that is for gdrive, not ftp.
for debug output, -vv is a flag to be added to the rclone command.
Yes I agree that ftp is terrible haha. I'm honestly not sure how to use webdav.
Using Hetzner Robot I installed Windows Server just so can manage my files on the server with a UI, and through that I was able to start the ftp server so that I can mount it on rclone.
It sounds like webdav is the way to go. Do you by any chance know a tutorial on how to activate it and mount it to a seedbox?
Maybe I wasn't clear. Right now using --poll-interval=1s, the files do show up right away in the mount, so that's working. Only issue is the scan taking long. I guess I will have to run rclone rc vfs/refresh like you listed above, before scanning, every time?
that should work for gdrive, ftp does not support polling:
really need to use -vv or at least -v and in the output, would see INFO : ftp://redacted:37245: poll-interval is not supported by this remote
the docs can be very confusing,
"will only be picked up once the directory cache expires if the backend configured does not support polling for changes"
correct.
with rclone mount, there are two caches.
each cache has:
a. different purpose
b. different data
c. different storage
d. different levels of volatility
vfs-dir-cache
a. to speed up the listing of directory/file names from slow cloud based storage.
b. a list of directory/file names.
c. stored in memory.
d. once rclone mount is killed, the cache is lost. does not survive a reboot.
vfs-file-cache
a. to store the contents of files read from slow cloud based storage.
b. the contents of files.
c. stored in local storage.
d. once rclone mount is killed, the file cache contents are perseved. does survive a reboot.
if you re-run the same mount command, the rclone should re-use the cache.
Hello, thank you everyone for your replies and help. I wanted to take some time and make sure that my issues have been fixed before updating this post.
So as others suggested, I have switched from FTP to SFTP mount from my windows machine, and was able to add 4 of my partitions to the mount by using mklink in CMD.
Scanning libraries has been much faster, and I haven't had any playback issues since then. I stopped getting write IO errors in the whatbox server SSH.
I've been using this with my rclone sftp mount command:
Only issue is that running rclone rc vfs/refresh would stop working after a while, so the files wouldn't refresh. It works for a few hours after mounting, but maybe after a day or so, it just stops working. I would either have to remount, or in my FTP program (Filezilla) I would rename the folder to refresh the files inside of it. Maybe the refresh command stops working due to some wrong parameter in my mount command? Any help would be appreciated.
Either way, most of my issues have been fixed by making this switch. Thanks again everyone for your help
but the directories wouldn't refresh. It works at first, but after a while, I run the command, get the OK message, but the new files would still not show up. Am I doing something wrong?
Sorry, I meant that I created it in the directories that are within the SFTP shared folders. It usually shows up if I run the refresh command after mounting, but now after a while, it doesn't seem to be properly refreshing.
Is there a way I can exclude all irrelevant info from the debug so I can share here? Getting lots of ChunkedReader.Read logs from plex playback. I ran the mount command with debug and now a few hours later, the refresh command is already not working properly.