OPNsense Forum
English Forums => 23.7 Legacy Series => Topic started by: wbennett on October 08, 2023, 07:54:36 pm
-
Good day,
Just wondering how the logging retention affects the hard drive. I am currently keeping logs for seven days and I am not sure if, after the logs are flushed and a new seven day log starts, the same part of the drive is being written to for each seven day retention?
Thanks for any assistance.
-
you're fine - ZFS is a copy on write system https://en.wikipedia.org/wiki/Copy-on-write
-
you're fine - ZFS is a copy on write system https://en.wikipedia.org/wiki/Copy-on-write
I am using UFS, would that be any different?
-
UFS does not use copy on write. If you are worried about uneven drive wear because of logging you either need to switch to ZFS or configure a central logging server
-
Besides ... any particular reason why you are worried? Are you using an SSD as your boot drive? What's its TBW? Even with the same area written again and again the SSD controller usually will have your back. What you perceive as "the same area" in reality is far from it.
-
UFS does not use copy on write. If you are worried about uneven drive wear because of logging you either need to switch to ZFS or configure a central logging server
Is the only way to switch to ZFS a complete reinstall?
-
Yes, but again, why are you worried? An SSD does not care if it's the same area or not. The manufacturer gurantees a certain number of terabytes written (TBW), regardless of the location. The controller creates an illusion of a certain capacity and certain fixed block addresses while spreading the wear over all cells all the time.
Look up the TBW value in your SSD's data sheet, compare with the actual number reported by smartctl -a ...
-
Yes, but again, why are you worried? An SSD does not care if it's the same area or not. The manufacturer gurantees a certain number of terabytes written (TBW), regardless of the location. The controller creates an illusion of a certain capacity and certain fixed block addresses while spreading the wear over all cells all the time.
Look up the TBW value in your SSD's data sheet, compare with the actual number reported by smartctl -a ...
IIRC, it's actually impossible to write to the same area with an SSD as the controller will straight out lie to you.