Union drive in mac not syncing

What is the problem you are having with rclone?

It's my first time doing this.
I have setup 5 remote drives (all Onedrive) and wanting to union all of them and then mount them on my laptop to use as if it's a drive.
I have two issues:

  • The first being that, I can't seem to see the contents of my first remote after mounting even though it has existing contents in it. I thought about mounting the union remote into my existing OneDrive folder but it seems that's not doable.
  • The second being that, adding any files to the mounted union drive did not appear to be synced anywhere.

What am I doing wrong please?
Do I need to run rclone sync? or perhaps rclone bisync? But then isn't the remote I created already had the sync built-in?

Run the command 'rclone version' and share the full output of the command.

rclone v1.68.1

  • os/version: darwin 13.6.6 (64 bit)
  • os/kernel: 22.6.0 (arm64)
  • os/type: darwin
  • os/arch: arm64 (ARMv8 compatible)
  • go/version: go1.23.1
  • go/linking: dynamic
  • go/tags: cmount

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

OneDrive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

/usr/local/bin/rclone mount UnionOneDrive: /Users/suchan/SecureDrive --vfs-cache-mode=full --vfs-cache-max-size=10GiB --vfs-refresh --volname="OneDrive Union" -vv --daemon --daemon-wait 0

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[UnionOneDrive]
type = union
upstreams = onedrive1:drive1 onedrive2:drive2 onedrive3:drive3 onedrive4:drive4 onedrive5:drive5

[onedrive1]
type = onedrive
token = XXX
drive_id = XXX
drive_type = personal

[onedrive2]
type = onedrive
token = XXX
drive_id = XXX
drive_type = personal

[onedrive3]
type = onedrive
token = XXX
drive_id = XXX
drive_type = personal

[onedrive4]
type = onedrive
token = XXX
drive_id = XXX
drive_type = personal

[onedrive5]
type = onedrive
token = XXX
drive_id = XXX
drive_type = personal
### Double check the config for sensitive info before posting publicly

A log from the command that you were trying to run with the -vv flag

[logfile](https://pastebin.com/dKsjxw70)

You are not showing any data supporting your claims that things do not work.. FYI - I use similar union myself without any issues so definitely it is possible to make it work.

Could you show rclone ls of this content (any small sample will be fine) and then rclone ls of union not listing it?

Thank you for your quick response.
So this is what I I tried.

rclone ls onedrive1

That command showed me everything I have in my first remote, below is a snippet of the output

    20423 Documents/Steffen Affidavit-ST EDit.docx
   241455 Games/AmpShell.zip
   186410 Games/play cs too much.jpg
    68836 eBooks/7-Steps-China-Import.jpg
  1216800 eBooks/A Grief Observed - C. S. Lewis.docx

Then I ran
rclone ls UnioneOneDrive:

And below is the only output it has

        0 TestDrive1/Cards/None.txt
        0 TestDrive1/Cards/Shaoran/The Freeze
        0 TestDrive1/Cards/Shaoran/The Re
        0 TestDrive1/Cards/Shaoran/The Storm
        0 TestDrive1/Cards/Shaoran/The Time
        0 TestDrive1/Cards/Sakura/The Fly
        0 TestDrive1/Cards/Sakura/The Mirror
        0 TestDrive1/Cards/Sakura/The Return
        0 TestDrive1/Cards/Sakura/The Sword

Those files are created by my running a combination of rclone mkdir and rclone touch

I assume it is typo and you use onedrive1:, otherwise you list some local directory.

It looks like you are listing root / folder of your onedrive1.

[UnionOneDrive]
type = union
upstreams = onedrive1:drive1 ...

and it is not part of your union. Only content from drive1 directory on onedrive1: is.

So far no surprises:) All works as you configured it.

Confirm when you solve this and we will move to uploads.

Ohhh, I understand now!
I didn't realise that the argument next to the "onedrive1:" was actually a directory name. Silly me.

Thank you! I figured it out now :slight_smile:

Good to hear that it works now:)

As a bonus I suggest to use create_policy = mfs instead of default epmfs. Then it always picks up upstream with most free space. Otherwise files can get "clustered" if there are some dirs with a lot of files.

Also consider creating your own client_id for each onedrive remote. It should help with throttling if you transfer a lot of data.

Thank you for your suggestion.
I'll try that option, although after getting your message, I slightly changed my approach with my union remote to this

- type: union
- upstreams: onedrive1:od1 onedrive2:od2 onedrive3:od3 onedrive4:od4 onedrive5:od5

Then I created the directory od1 in my first onedrive account, and directory od2 in the my second onedrive account, and so on.
Finally, I moved all existing files into od1. So performing

rclone ls UnionOneDrive:

Now yields this

od1\
od1\dir1
od1\dir1\file1
od1\dir2\file2
od2\
od3\
od4\
od5\

I did this so I guess I could easily differentiate where my files "live". Is this a bad idea?
Will create_policy= mfs make a difference with above structure?

I'll look into creating my own client_id.

Thank you again!

This is good approach I use myself. Exactly like you said it allows to clearly define where Union files live. Mfs is always fine IMO when you want multiple remotes act as one and they support “rclone about”. Like OneDrive

1 Like

Hello,

Thank you for your reply and all your very helpful tips so far.

I just realised, I think what I should've done is to keep my remote upstream in this manner:

onedrive1: onedrive2: onedrive3: onedrive4: onedrive5:

Because otherwise i'm just showing what's under the directory od1 and still unable to differentiate between each drives.

Now I am confused:)

Whole purpose of the union is not to be able to differentiate between each drive. Multiple remotes are merged and become one - hence name "union".

Maybe what you want is combine remote

[AllDrives]
type = combine
upstreams = drive1=onedrive1: drive2=onedrive2:

Then under single remote you will have all drives but clearly separated.

Apologies, I thought you said you used the same approach as what I mentioned before?

Why would one use union over say, remote?

Even more confusing now. As Union is remote. Anyway:)

Could you explain what you want to achieve? Than maybe we can suggest some solution.

Sorry to confuse you.
I wasn't sure what I want to achieve actually, but ideally as I have all this onedrive space to use (around 5tb), I'd like to be able to maximise usage of space not have to sacrifice performance.
One use case I thought of: Store all my photos, videos and any music files onto them and be able to access all of them from any of my mobile devices (iphone, ipad etc) without having to remember which account I've placed the file into.

Is that possible?

What you describe sound like union. But then you contradict yourself by saying:

and

So you want to know which drive is which and what is where but still be able to access all using one remote - use combine, where all drive will be accessible via separate virtual directories.

You want to make one BIG remote (containing all your OneDrives) and do not worry what is where - use union.

Thank you kind sir, you have been very patient and very accommodating with all my silly questions so far.

After having a think about it and what you've explained to me, I think I might use union. Reason is I like the idea of using the create_policy=mfs and letting rclone always picks up upstream with most free space.

Thank you, thank you, once again.

1 Like

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