Pfsense Warning: fopen(/tmp/config.lock): failed to open stream

  • This has happened the past 2 days in a row. when I drop to console none of the options work. I cant even have the system reboot. Every option 0 to 14 fails..something about unable to create symlinks and cant find inodes. I still can get to the internet but I dont know if the firewall is actually functioning. It doesnt allow a ovpn connection in this state. All I can do is power cycle it by holding the powerbutton for 5seconds. I'm running the latest stable version 2.01 and I was reading about tmp and log files being full? So I ran df -h after reboot and this is the results:
    $ df -h
    Filesystem    Size    Used  Avail Capacity  Mounted on
    /dev/ad0s1a    3.3G    183M    2.8G    6%    /
    devfs          1.0K    1.0K      0B  100%    /dev
    /dev/md0      3.6M    34K    3.3M    1%    /var/run
    I'm have pfsense installed on a 4gig flashdrive and have been running it with no issue for over a year. I'm not sure but maybe this is a bug and I have checked some new option but is there any way for me to turn logging off so that I can eliminate the possibility of my logs filling up the drive. As you can see after the reboot there is plenty of available space. Any help would be greatly appreciated! ???

  • pfSense shell command```
    df -h -i

    pfSense logs are generally (always?) "circular" logs of fixed size which hold the last "n" bytes of logging information.
    I have run pfSense for over 3 years on a 1GB disk module and have never seen this problem.
    If I recall correctly, I have seen reports that if a bad spot develops in a crucial part of the file system metadata, attempts to create new files can get an "out of inodes" error report. It could be worth doing a read scan of your hard drive (for example```
    dd if=/dev/ad0 of=/dev/null bs=65536
    ```) to see if any bad blocks or disk errors are reported on the console.

  • Rebel Alliance Developer Netgate

    Most common cause of those errors is a failing CF/SSD/HDD. If it's failing, the OS can't write (and can't read some spots) so you get inode errors because the drive being full is the closest thing the OS can find to account for the drive failing to take the write command.

  • Well I ran dd if=/dev/ad0 of=/dev/null bs=65536 and it didn't show any errors. my pfsense isn't showing that error today since yesterdays powercycle and then a soft reboot. I have also disabled writing logs to local ram disk which might have fixed my issue. I'm sure it isn't very hard to fill the ram disk. I'll keep you guys posted and let me know if you come across a similar issue or any other way to test my media to make sure it isn't failing. my current flash disk on module isn't SMART capable.

  • Rebel Alliance Developer Netgate

    The logs cannot fill up anything. They are a constant size, binary circular log format. They never grow.

    Your HDD may act OK now, but I wouldn't trust it any farther than I could throw it.

  • Is there any other way to test the flash drives health?

Log in to reply