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

How to make a drive that will not save back to the original location? #36

Closed kingmomomo closed 3 years ago

kingmomomo commented 4 years ago

How to make a drive that will not save back to the original location? I would like to make a copy of the original location but not wish to save it back. Thanks.

rogerdahl commented 4 years ago

In /usr/local/bin/log2zram, comment out the call to mergeOverlay so that it looks like:

# mergeOverlay >>${ZLOG} 2>&1 || exit 1
StuartIanNaylor commented 4 years ago

It uses a mergeOverlay tool https://github.com/kmxz/overlayfs-tools which as far as I know is the only tool for overlayfs.

Apart from https://github.com/https://github.com/amir73il/overlayfs/wiki/Snapshots-HOWTO/overlayfs/wiki/Snapshots-HOWTO

So as roger said or systemctl edit zram-config and stop the ExecStop=/usr/local/bin/zram-config stop from being run by editing it.

I guess create a snapshot that you can mount elsewhere but apart from knowing of its existence that is the limit of my snapshot knowledge. I was always hoping amir73il was going to do a merge down from lastest snapshot so you could rotate down through a history. I would have a read and see if it will provide what you need.

Fork the project or just copy and maybe create a merge elsewhere version?