Thanks for that link. It explains what Microsoft is doing and hints at what Dropbox could do for a similar workaround.
Microsoft maintains two directories with cloud content. Their “sync root” is the location where files are synced. It is (and must be) ~/Library/CloudStorage/OneDrive-Personal
, just like Dropbox’s directory. But they also maintain a cache directory in a “hidden location”.
Their cache directory apparently (based on their article - I don’t use OneDrive on my Macs) contains a shadow of all your cloud storage. Most of the files are zero-length, except for local changes that have yet to be sync’ed to the server and files you tagged as “Always available on this device”. I assume files in the CloudStorage location exist as links to this cache directory for these “always available” files and when the local version differs from the remote version (e.g. when new changes have been saved but not yet sync’ed).
Anyway, when you choose to use another location on an external drive, they keep the sync root as it is - in CloudStorage, but they create the cache directory in a hidden directory on the external drive and symlink the publicly-visible directory on that drive to the sync root.
I assume that, when this is configured, files you mark as “always available” and unsynced changes will therefore end up on the external drive. Other files (those that OneDrive can choose to discard) will be stored in the CloudStorage location, and will be downloaded/purged as necessary based on available internal storage and your usage patterns.
All that having been said…
I wonder if another possible workaround might be to put your home directory on external media. Specify that location when creating the account. Then, I assume the CloudStorage location would be on that media. This might impact system performance if it’s an HDD, but the impact might not be too bad if the System and Data volumes (including application installations) are still on the internal volume.
Of course, if you try this, then that external volume MUST be available and mounted before you log-in. Depending on your device (destkop vs. laptop) and your usage patterns (tethered to a desk or on the go), this may or may not be acceptable.