Union Mount settings for Plex

I’m using the command below to mount a UNION (google drive and Local). Used for PLEX. But I’m also writing completed downloads from Sonarr/Radarr.

Reached the point on the learning curve where I know enough to be dangerous, and not enough to know I’m being dangerous! Anybody any thoughts / optimizations for this mount?

–buffer-size 1G
–dir-cache-time 72h
–drive-chunk-size 256M
–log-level INFO
–vfs-read-chunk-size 32M
–vfs-read-chunk-size-limit off
–poll-interval 1m
–vfs-cache-mode writes
Media_union: H:

I specifically have queries on:
–rc - is this only really needed for scripting commands to the remote?

–dir-cache-time 72h - Should I be using “–vfs-cache-max-age duration”?

–drive-chunk-size 256M - I have fairly slow upload speed, 12Mb, would I benefit from this being lower?

–poll-interval 1m - Should I be using “–vfs-cache-poll-interval”?

Any other noob errors I’m making?

So my general mantra with this stuff is keep it simple. I try to use the defaults wherever it makes sense to keep them.

rc - you are correct as that’s only used for remote control commands. If you don’t plan to use it, you can remove this option

dir-cache-time and vfs-cache-max-age-duration are two different things. dir-cache-time is how long the directory and file system will stay unless a polling interval invalidates them. I personally keep this as big as possible as the bigger the better imo. 72 hours or something along those lines helps reduce API hits that aren’t needed as nothing changed so why repoll.

all the vfs-cache commands relate back to the vfs-cache-mode that you are using. So if you are using writes, any write stays in cache (local disk) until the age expires.

drive-chunk-size is only for uploads and works with using vfs-cache-mode-writes and sends the uploads broken up in chunks. Your upload speed really doesn’t matter as it just uploads a 512M chunk over time and it takes however long your upload is. There have been a few tests on this and 32M or 64M seems to be a sweet spot for it.

poll-interval is how often rclone polls Google Drive for changes. 1 minute is the default and really should be just left alone.

All the vfs-cache options are written up here:


as the vfs-cache-poll-interval only impacts what is in the actual vfs-cache.

fast-list does nothing on a mount so can be removed.

Your buffer-size at 1G means every file opened consumes 1GB of memory so be sure you have enough memory to handle whatever your max load is. Again, I don’t see much value in this personally so I keep this at the default.

My mount is simple:

/usr/bin/rclone mount gcrypt: /GD --allow-other --dir-cache-time 96h --drive-chunk-size 32M --log-level INFO --log-file /opt/rclone/logs/rclone.log --timeout 1h --umask 002 --rc

We talked about the cache time and I use 96 hours.
Timeout is for resuming playback in plex.
umask is to set permissions
I use remote control so I keep that.

@Animosity022 Thanks for the explanations.

So dir-cache is the list of files and directory’s. The vfs-cache is a cache for any files being read (from remote) or written (to remote), is that, roughly, correct? I think I need a “explain it to me like I’m 5” on this one :blush:

I’m using a Union remote (with the local drive) as the write. So the --drive-chunk-size will be how quickly it’s writing back to the local drive?

I put –poll-interval 1m, in because I was seeing delay between Radarr/Sonarr copying the file to directory and being able to browse to it (Via Explorer) and PLEX picking it up. I’ve also updated the “connect” setting on Radarr/Sonarr to tell PLEX of any downloads. But any advice on making that file visibility snappier?

p.s. What’s the purpose of your umask command?

For now I’ll update to.

–rc - Remove (don’t need)
–buffer-size 1G - Remove (Default should be fine)
–dir-cache-time 72h
–drive-chunk-size 256M - Change int to 64M
–fast-list - Remove (Does nothing)
–log-level INFO
–vfs-read-chunk-size 32M
–vfs-read-chunk-size-limit off
–poll-interval 1m - remove (because I’m applying the default anyway. Is this correct??)
–vfs-cache-mode writes
Media_union: H:

umask sets proper user/group/file permissions. It’s a bit of a long explanation but a solid read here:

I’m not sure if drive-chunk-size matters for local disks as those are writing to cloud remotes and how the chunking is done and if the remote supports it.

poll-interval is only for changes that occur outside of a local system so I server1 writes a file to the cloud, server2 would pick up 1 minute later. If everything happens on server1, the polling interval is really irrelevant.

I personally run everything on the same system so not relevant for me.

Sonarr/Radarr make copies of files so if it has to move the file, you have to wait for it to copy it and that takes time depending on the size of the file.

Whatever problem I had it may be a PEBKAC* issue! I was seeing the file on the local disk but not seeing it on the Union Mount for up to 20 minutes. I’ve retested now and It’s fine though. I’ve been been making changes all over the place though and it may just have been something out of sync.

*problem exists between keyboard and chair. :grinning:

Getting this error on my union… Radar is trying to import a film in but can’t.

The Rclone logs say:

2019/04/12 01:43:22 ERROR : Films/How to Train Your Dragon 3 (2019)/How to Train Your Dragon The Hidden World (2019) Bluray-720pHow to Train Your Dragon The Hidden World (2019) - [BLURAY-720P][AC3 5.1][X264]-WHITERE.mkv: File.openRW failed: cache open file failed: The system cannot find the path specified.
2019/04/12 01:43:22 ERROR : IO error: cache open file failed: The system cannot find the path specified.

Any thoughts?

Looks like the file isn’t there and it’s trying to open it.

Missing the rest of the log that might say how the file got there and what possibly happened.

Can you give more details? What’s your mount? How did the file get there? Is there more of the log that shows that?

Might have worked it out. Noticed my movie file name was very (very!) long. I’d messed up my rename settings in Radarr (pasted new settings at the end of rather than over the old ones).

With a shorter file name the import worked. Assume the error was path/filename length?

Without a log or details, really no way to know.

The log for the mount is as above, repeated continually.

The log from Radarr (in case it provides any insight) says:

System.IO.IOException: The request could not be performed because of an I/O device error.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.__Error.WinIOError()
at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
at NzbDrone.Common.Disk.DiskProviderBase.MoveFile(String source, String destination, Boolean overwrite) in C:\projects\radarr-usby1\src\NzbDrone.Common\Disk\DiskProviderBase.cs:line 224
at NzbDrone.Common.Disk.DiskTransferService.TryMoveFileVerified(String sourcePath, String targetPath, Int64 originalSize) in C:\projects\radarr-usby1\src\NzbDrone.Common\Disk\DiskTransferService.cs:line 564
at NzbDrone.Common.Disk.DiskTransferService.TransferFile(String sourcePath, String targetPath, TransferMode mode, Boolean overwrite, DiskTransferVerificationMode verificationMode) in C:\projects\radarr-usby1\src\NzbDrone.Common\Disk\DiskTransferService.cs:line 308
at NzbDrone.Common.Disk.DiskTransferService.TransferFile(String sourcePath, String targetPath, TransferMode mode, Boolean overwrite, Boolean verified) in C:\projects\radarr-usby1\src\NzbDrone.Common\Disk\DiskTransferService.cs:line 183
at NzbDrone.Core.MediaFiles.MovieFileMovingService.TransferFile(MovieFile movieFile, Movie movie, String destinationFilePath, TransferMode mode) in C:\projects\radarr-usby1\src\NzbDrone.Core\MediaFiles\MovieFileMovingService.cs:line 120
at NzbDrone.Core.MediaFiles.MovieFileMovingService.MoveMovieFile(MovieFile movieFile, LocalMovie localMovie) in C:\projects\radarr-usby1\src\NzbDrone.Core\MediaFiles\MovieFileMovingService.cs:line 80
at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeMovieFile(MovieFile movieFile, LocalMovie localMovie, Boolean copyOnly) in C:\projects\radarr-usby1\src\NzbDrone.Core\MediaFiles\UpgradeMediaFileService.cs:line 69
at NzbDrone.Core.MediaFiles.MovieImport.ImportApprovedMovie.Import(List`1 decisions, Boolean newDownload, DownloadClientItem downloadClientItem, ImportMode importMode) in C:\projects\radarr-usby1\src\NzbDrone.Core\MediaFiles\MovieImport\ImportApprovedMovie.cs:line 10

If you don’t have the full rclone log that’s fine. The repeating error isn’t helpful as it’s already occurred and provides no idea why it happened.

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