Merged local (no cache) combined with merged remote (cache)

So I have the following:

disk1,disk2,disk3....disk8 for local stuff
googleteamdrive1.....googleteamdrive8 for remote stuff (actually it's an encrypted google drive so googleteamdrive is an encrypted mount).

I want to create a union of all of these, but struggling to understand how to properly handle the caching aspect, I want to use VFS caching for the remote drives only.

From my understanding, if I use VFS caching on the union mount, it would actually cache all my local writes too. Since my drives are all SSDs this kind of doesn't make sense as it means all files will be written to the "cache" and then writtne to my drive.

So, based on this setup, does it make sense to create a union with the appropriate VFS settings for googleteamdrive* remotes, then create another union without caching for local and the remote mount?

I tried this but ran into problems with random seeking without VFS caching turned on (e.g. WriteFileHandle.Write: can't seek in file without --vfs-cache-mode >= writes) for the merged drive.

So basically I wanted merged drive which doesn't cache for local but does cache for remotes.

Not sure if this is the best way, but so far I've settled on:
googleteamdrive1 -> /teamdrive1 (with VFS cache)
googleteamdrive2 -> /teamdrive2 (with VFS cache)
googleteamdrive3 -> /teamdrive3 (with VFS cache)
mergerfs -> /disk1,disk2,disk3....disk8:teamdrive1=NC:teamdrive2=NC:teamdrive3=NC

So this way I can get the benefits of caching only the remote stuff and have the local stuff act well with hardlinks and such and it should seek fine (unlike if using uncached union mount).

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