Storage options for log files only

Started by Lantern5, August 04, 2024, 02:23:35 PM

Previous topic - Next topic
Hi all,
Just getting started on Opnsense and was reading that it's a good idea to move log files to a separate disc. I have a NVME SSD now, what type of storage is ideal a second disc for log files only?


  • Would high endurance SD Cards be a good choice?
  • Or would one of those Hybrid HDDs be a better choice. I could use a single disc for OS and log files with this option

Would appreciate some guidance oj this topic.

I would not bother too much about this. Usually, this type of question arises because of two aspects:

1. You fear about excessive wear on your log disk.
2. You fear that the logs will fill up the disk to 100% and stall the system.

Usually, point 1 is not a real problem with decent SSD hardware - i.e. no QLC or consumer-grade SSDs, you should use "Pro" disks. You could even use normal spinning disks as storage speed is of no big concern with OpnSense.

But even with consumer-grade disks, this should not be a problem at all. You can check on the commandline with "smartctl -a /dev/XXXX" how much of the lifetime writes a disk has already used up. In my case, it is 3% and the machine is in use for ~1 year, so there is more than 30 years life left there.

If you are a business with hundreds of clients or massive bandwidth, that may be another thing, but in that case, you probably redirect your logs to a seperate log server, so there are no local logs at all.

Also, if you do not need to keep logs between reboots, you can also use memory logging.

As for point 2, you can limit the storage space for the /var/log dataset if you are using ZFS (which you should), so if it is full, it does not break anything. With memory logging, the space is limited by definition.
Intel N100, 4 x I226-V, 16 GByte, 256 GByte NVME, ZTE F6005

1100 down / 800 up, Bufferbloat A+

Thanks for the response.

The SSD is an Intel SSD Pro 7600p Series 256 GB NVME SSD. 

This drive was already used in another machine for a couple of years, and smartctl reports 3% used

Already on ZFS.

Maybe I am overthinking this, but would still like to learn how to move log files. Can you please help with detailed steps or a link?


I answered in your other thread because the title better matches the purpose.
Intel N100, 4 x I226-V, 16 GByte, 256 GByte NVME, ZTE F6005

1100 down / 800 up, Bufferbloat A+