OPNsense Forum

English Forums => General Discussion => Topic started by: jojothehumanmonkey on January 29, 2023, 01:38:20 AM

Title: how to mimize disk usage
Post by: jojothehumanmonkey on January 29, 2023, 01:38:20 AM
hello, thanks,

i am confused, by default, if opnsense using a swap file?
and if so, how to move it to memory, same as "/var/log RAM disk" and "/tmp RAM disk"

from dashboard:
"SWAP usage 0 % ( 0/8192 MB )"

from system_advanced_misc.php, this setting is uncheck.
"Swap file Add a 2 GB swap file to the system"

from /etc/rc.conf, there is no "swapfile=", so does that mean, opnsense is not using swap.

swapinfo -k
Device          1K-blocks     Used    Avail Capacity
/dev/gpt/swapfs   8388608        0  8388608     0%

--------------

also, curious, what else does opnsense write to disk?
--- log files
if this is enabled, where does opnsense save logs?
Local Logging    Disable writing log files to the local disk

--- other stuff i would not know about, the so-called "unknown unkowns"

thanks, david
Title: Re: how to mimize disk usage
Post by: bartjsmit on January 29, 2023, 10:18:59 AM
Hi David, on the subject of logging - consider setting up an external log server and redirect your firewall logs to it. System, settings, logging/targets.

A big part of security is being able to work out what happened if something happens  ;)

Bart...
Title: Re: how to mimize disk usage
Post by: jojothehumanmonkey on January 30, 2023, 06:21:24 PM
thanks,

does anyone run `opnsense` from a read-only source, such as a cd-rom or DiskOnModule?