RClone Union vs RClone + UnionFS/MergerFS

So I have a few remote drives I want to merge into a "set" of mount points. Unfortunately the 3 drives I am trying to merge don't have exactly the same structure so I can't just union the roots and call it a day. Nor can I change the existing structures. So I am left with the following conundrum.... is it better have a single rclone mount for each drive, and then use UnionFS or MergerFS to merge them, or it is better to create 4 RClone Union Mounts. Here is an example of what I am talking about.




My target layout is


Option one would be to have all three drives defined in the rclone.conf with unions defined:

PDFs - Union of DriveA/PDFs DriveB/MyData/PDFs
DOCs - Union of DriveA/DOCs DriveB/MyData/PDFs
Videos - Union of DriveA/VideosDriveB/Media/MyVideos
Photos - Union of DriveA/Photos DriveB/Media/MyPhotos

This is the way I am currently doing it and I have 4 systemd services that start each union and then vfs refresh to load up the cache. The issue I see with this is that each union forms its own connection to the drive and its own cache.

The alternative would be to have rclone mounts:


And then to use UnionFS/MergerFS to make the /mnt/merged/ (again I would need four different mounts, unless I am overlooking a cleaner way to do it). The upside I see with this is that I have only a single rclone connection to each drive with a single cache for each one, the downside being I now have 3 rclone mounts and 4 mergerfs/unionfs mounts.

Thoughts? Suggestions

I can't think of a way of sharing the drive connection for two drives with different "roots"- rclone doesn't work like that at the moment.

So if you want the smallest number of drive connections then your 3 drives + unionfs over the top is the way to go.

Note that you can start multiple mounts in a single rclone binary using the api rclone rc mount/mount this may use slightly less memory but there probably isn't much in it.

That's what I was leaning towards. Right now the four unions are using three drive config sets. So I think the 4 connections is causing API limit issues when they all try to get the VFS update at the same time.

If I wanted to use rclone rc mount/mount would I make a single systemd and exec the first mount, then 2 subsequent rc mount commands? And the options would all be shared (e.g. vfs settings, allow others, etc) or do they all need to be set on each mount?


That would probably be the easiest way. The first mount's vfs settings would be used for all the others which would make the subsequent mounts just a question of passing in the mountpoint and remote.

Or you could run rclone rcd instead of mount and set up all the mounts via the rc

The docs show how to pass mount and vfs options in.

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