I recently rewrote my config and decided to give impermanence a shot.
Right now I’m using ext4 for the ephemeral root partition and I’m reformatting on each reboot (here’s the mkfs snippet). The setup uses two SSDs with LVM + striping so the writes are distributed equally.
Will this wear out my SSDs fast? can I test this and see how much data the formatting writes to the SSDs?
Use smartctl from smartmontools to find the Percentage Used: and Data Units Written: of the SSD before and after formatting with sudo smartctl -a /dev/<your-nvme-device>.
The formatting just writes new headers. It’s basically nothing. You don’t need to worry about SSD wear (it’s a drastically overblown concern in the first place).
But the MBR is always at sector 0, so eventually the write head will wear a groove in the disk there
(More serious answer: I think reformatting ext4 is a great idea, if you don’t have enough memory for a tmpfs, although I believe it doesn’t take much - my root on tmpfs is currently using only 2 MB of memory.)
I want to be able to download large files outside the persistence mounts so tmpfs would be risky. I don’t use btrfs because I had performance issues with it (IOPS around 10k) but I suspect I somehow misconfigured something.
So I chose ext4 because I wanted a “classic” setup with no caveats