[solved] Ramdisk configuration
I am new to pfSense. The log churn is high so I want to protect my SSD by mounting some or all of /var/log to a ramdisk.
I see that there's already a ramdisk /dev/md0 mounted to /var/run. I looked around (for example in /etc/fstab) but I don't see where that is being configured.
My (naive) questions:
- Where is /dev/md0 configured?
- If I change the config and reboot, will md0 be mounted with a new size?
- Rather than expanding md0, should I make a new ramdisk?
- If I make a new ramdisk, where would the mdconfig and mount commands go?
You can accomplish what you want at System / Advanced / Miscellaneous > Use RAM Disks
That being said, unless you have a legacy SSD this isn't necessary.
It's really useful for flash drive installs, modern SSD's don't have the write sensitivity that legacy SSD's did.
That's exactly what I was looking for. I hear your statement on modern SSD quality; hopefully it's right but I'd rather play it safe anyway. I have a SanDisk SSD i110 32GB. It hasn't given me any issues yet (not that that means anything, I've only been using it for a week). Thank you.
Unless you're writing logs in a heavy fashion you're good without the RAM disks, I have a similar 32GB SSD and I just haven't bothered. I have TRIM turned on the filesystem and the disk is only about 6% full.
Unless you're writing logs in a heavy fashion
Depending on your definition of heavy, I am at some points. While I'm learning pfSense sometimes I need to log all blocked traffic to see what I need to do to my rules, for example.
I have TRIM turned on the filesystem
That seems rather important; and I didn't have it! Thanks for the reminder! I have successfully followed this walkthrough:
the disk is only about 6% full.
Indeed - mine is only at 2%.
If you do choose to keep RAM disks, remember that you will lose everything saved to in on reboot.
You can select scheduled writes to disk in the settings for certain things.
This may or may not matter to you.