ecdye / zram-config

A complete zram-config utility for swap, directories, and logs to reduce SD, NAND and eMMC block wear.
MIT License
412 stars 53 forks source link

updates to lower file system #30

Closed malahal closed 3 years ago

malahal commented 4 years ago

I am using /var as overlay "dir". I am using RPi4 4GB with raspbian-lite as a router and few programs write to /var/lib as as well as /var/log. I see writes to SD card every few seconds (probably minutes) and "find" command indicates that the the lower file system files in "/opt/zram/var.bind" are getting updated. How often is this done and can I control this?

My entry in /etc/ztab: dir lz4 500M 1500M /var /var.bind

malahal commented 4 years ago

I ended up mounting a bunch of directories in /var with overlay. Now, I don't see any writes to my SD card while Pi4 is doing firewall and routing duties. Thank you to these scripts. Would be nice to specify a set of directories with zdir though. The ones I did are here:

/home /root /var/lib/systemd/timesync /var/lib/dhcp /var/lib/vnstat /var/spool/squid /var/lib/unifi /var/lib/mongodb /var/log