RAM disk being mounted too late?

Started by darkcrucible, December 18, 2024, 04:41:05 PM

Previous topic - Next topic
I was trying to reduce the number of writes to disk by turning on the RAM disk option for /var/log and /tmp.
When I rebooted, RRD stopped working but netflow was still operational. I noticed that disk usage was not going down much and the flowd.log* files were missing in the new /var/log. There are other files not present in the ramdisk like pf.today, ipfw, etc. Those appear to persist on the disk but are not used on the ram disk.

When looking at the mounts, in the system there are two for /tmp and /var/log:
zroot/tmp                    213G    948K    213G     0%    /tmp
tmpfs                        7.8G    580K    7.8G     0%    /tmp
zroot/var/log                213G     89M    213G     0%    /var/log
tmpfs                        7.8G    3.1M    7.8G     0%    /var/log

Is the tmpfs being mounted too late?
I think you can "over mount" a file system in a folder that's in use. Processes that are using the original FS's stuff will continue to do so. This kind of defeats the purpose of the ram disk. Am I all mistaken on this?

Looks like the RRD issue was due to an unrelated issue fixed with the most recent hotfix.
After a reset of the NetFlow data, I see flowd.log* in the tmpfs version of /var/log. It now comes back after a reboot as well. Everything seems fine. Perhaps it was the shortlived upgrade to 24.7.11 before 11_2.