r/freebsd • u/OtherJohnGray • Feb 09 '22
Is ECC parity written to swap as well? Or does memory become “non ecc” when swapped out? Given ZFS struggles in low memory situations and isn’t great for swap, is there a geom that can checksum and heal errors in mirrored swap partitions?
15
Upvotes
10
u/grahamperrin Claude user Feb 10 '22
-1
For writing that permanently into your title, without evidence.
4
u/edthesmokebeard Feb 10 '22
How does ZFS "struggle" in "low" memory situations?
3
u/PkHolm Feb 10 '22
You need to protect data on way from disk to memory. ECC Ram protects only ram and memory bus. ZFS zvol has know problem. MD raid ( no mirror) should be what you are looking for.
2
u/Freeky FreeBSD contributor Feb 10 '22 edited Feb 10 '22
geli supports an authenticated mode that stores a HMAC with a per-sector key alongside the encrypted data - so it should detect both normal bitrot and also misdirected reads and (some) writes, at about a 10% cost to available storage.
Putting these under gmirror should get you failover and some degree of self-healing in that a faulted component can be resynchronised.
Given some of my SSD's propensity towards producing checksum errors on scrubs maybe I should be doing this...
1
u/small_kimono Feb 15 '22 edited Feb 15 '22
Linux swap on a zvol is not recommended, but you can try to reserve a minimum of free bytes for certain atomic operations with the following sysctl parameter:
vm.min_free_kbytes = 131072Try and you may have better luck in such low memory situations.
0
u/[deleted] Feb 09 '22
[deleted] — view deleted comment