Closed mstormi closed 4 years ago
Uses mergeoverlay synctodisk doesn't exist copying whole directories on shutdown is just a bad idea.
Ok, but as mergeOverlay() is only called on zram-config stop, files will only be merged when that is executed on server shutdown. I'd like to sync once a day or so. DoI have to call overlay merge (via cron or other) to do that or is there a more clever way ?
You can not as you have to merge offline so cronjob reboot or work out a way to umount / from a working system.
Just an idea, I have come across https://github.com/amir73il/overlayfs/wiki/Overlayfs-snapshots Would that work to snapshot first and then (still online) copy the snapshot ?
This is the weird thing as supposedly no as the man himself Amir seemed to say. Have a look in the issue marked 'Help' Its weird as to be able to rotate snapshots on a live system would be freaking awesome.
If you would try it and see, but sort of don't if there is any possibility of corruption. I would rather it just didn't work than be a cause of corruption
Also would you try if my check for kernel 4.19 or less splits correct now and install Attr or Xattr depending on the previous
Yeah read that. What I understood is that
My interpretation is: noone tried to combine snapshots and those tools so it's worth a try ?
Please do mstormi see how it works. I have been playing with Wayland/Panfrost of late so not able to do any prolonged testing.
This is what I don't get as the most perfect example of snapshots would be able to do a oldest snapshot merge down and cycle through a history to any point. I am totally bemused by the lack of overlayfs tools in this regard and that makes me think there must be a reason for this that I am not understanding as I am like you.
The 'glue' in the middle layer is being used to merge down the lower with my limited understanding but nothing removes that glue and therefore surely it becomes out of sync? Maybe it does merge down and clean the merge layer its been a while since I really examined with depth.
Then there is another problem of race conditions of any file access in the upper of source files in the lower and middle merge. If you could lock the upper file as it is processed then prob nirvana but just have a hunch overlayfs tools is far simpler and just goes through the whole layer. Creates serialised cp, mv & rm and permission functions and just runs that as a script at the end.
Its a huge race scenario that is hugely likely to miss current activity and I am still unsure about merge layer update after completion.
I would be absolutely amazing to have live merges on an overlayfs and if you would whilst I am faffing with wayland give it a go?
I noticed the syncToDisk command is commented out in zram-config What does it mean, will changes to upper layer FS (in ram) ever get synced to lower layer (SD card)? Can I enforce a sync ?