Title. Asides from setting the whole disk to read-only. (It’s not an option since apparently docker dislikes that for some reason.). I’m trying to increase my microsd’s lifespan.
For instance, here’s my current /etc/fstab
tmpfs /tmp tmpfs rw,size=10M,nr_inodes=5k,noexec,nodev,nosuid,uid=gus,gid=notgus,noatime,mode=1700
tmpfs /var/log tmpfs rw,size=10M,nr_inodes=5k,noexec,nodev,nosuid,uid=gus,gid=notgus,noatime,mode=1700
tmpfs /var/tmp tmpfs rw,size=0M,nr_inodes=5k,noexec,nodev,nosuid,uid=gus,gid=notgus,noatime,mode=1700
tmpfs /var/run tmpfs rw,size=0M,nr_inodes=5k,noexec,nodev,nosuid,uid=gus,gid=notgus,noatime,mode=1700
tmpfs /var/spool tmpfs rw,size=0M,nr_inodes=5k,noexec,nodev,nosuid,uid=gus,gid=notgus,noatime,mode=1700
tmpfs /var/lock tmpfs rw,size=0M,nr_inodes=5k,noexec,nodev,nosuid,uid=gus,gid=notgus,noatime,mode=1700
tmpfs /var/cache tmpfs rw,size=0M,nr_inodes=5k,noexec,nodev,nosuid,uid=gus,gid=notgus,noatime,mode=1700
Thanks in advance.
It would work like the existing tmpfs that you already have. It overlays the tmpfs over the readonly filesystem mount:
df will tell you how much ram has been reserved for the tmpfs and how much has been “written.” On my 4GB Pi that is ~1.5GB. Mine is usually pretty idle and has been up for 40 days, so at 12% used ~1.5GB will last me quite a bit.