rpodgorny / unionfs-fuse

union filesystem using fuse
Other
309 stars 76 forks source link

[feature request] copy-down on write functionality or save to first rw #83

Closed lavdnone closed 6 years ago

lavdnone commented 6 years ago

Lets say we have: unionfs-fuse -o copydown,allow_other /home/username/up=RW:/home/username/low=RW /storage/ If file is saved or changed on up gets automatically copied down to low (the opposite of standard behavior as if file was opened from low and gets saved to up overlay)

or even with first tree being RO: unionfs-fuse -o savefirstrw,allow_other /home/username/up=RO:/home/username/low=RW /storage/ When file opened from RO up, gets saved automatically to low (as if low was on the first position in standard behavior) So all saved files that exist on first up are not shown changed at union location but saved versions reside at real location of low

rpodgorny commented 6 years ago

could you please describe your actual use case? thanks...

lavdnone commented 6 years ago

Here https://github.com/trapexit/mergerfs/issues/502 Lower posts probably most descriptive

lavdnone commented 6 years ago

Made changes to separate reads and writes to ro and rw layers, but at the end fuse overhead ate all possible benefits as I have lots of mv ops.

lavdnone commented 6 years ago

After purging whiteouts logic and setting two strict branches rw and ro, it actually works with no overhead. Put it in to test production on email servers with GlusterFS back-ends. So my writes go in to the cluster through network and reads from site's local brick, getting almost local fs read speeds. @rpodgorny thank you for your work and clean code!