No config.xml found
-
I have been using pfsense for about 5 years and have never seen that. I also have several backups, should it be necessary to replace that file. Check to see if that file is there, then reboot properly and see if it's still there.
-
Any number of things changed, the hardware, the disk controller/disk itself, the OS, etc.
Sometimes the OS will cache writes, but also disks lie to the OS about whether or not they have flushed data to storage in the name of speed. Some filesystems cope better than others. If you "write" to disk and immediately yank the power there is no telling what state you left things in.
ZFS is more resilient against this kind of problem than UFS. It's not perfect, but much better.
-
@gtrovato , it could happen with different hardware other than Netgate hardware. This means your writing/reading speeds are sometimes not synchronize,as a result corrupted.
Just unplug and re-plug the power switch, do it over again. Or you can boot (S)ingle user with pfsense bootable usb and type: fsck -y
/sbin/reboot -
I just had this issue after several power outages in a row. My UPS failed also. What happened was that pfsense backed up an empty configuration file, no doubt because of the rapid power cycling. It then would attempt to restore it on boot, and hang.
The solution was to log in, find the offending backup file (zero size) and delete it. After that, the router booted using the previous backup file.
This is probably a bug.
-
It's not a bug per se, but a known problem with UFS in FreeBSD, and with many filesystems in general. Removing power unexpectedly leads to an unclean filesystem. The fix is to use a proper UPS and avoid unclean shutdowns where possible.
If you want to have better protection against it, use ZFS if you can. It's much better than UFS when it comes to avoiding this kind of problem, as mentioned earlier in the thread..
-
I just experienced this in my brand new SG-5100. I gracefully shut down computers, of course, but never in my 20-year career in IT have I seen an appliance corrupt its config because the power was pulled. That's kind the whole purpose of using appliances versus VMs.
-
I still believe that adding a bit of logic would make the appliance more resilient. I understand "filesystem is not our problem", but "this config backup is unusable so let's try the one before" seems pretty reasonable to me.
-
It does try to use backups if the main configuration is corrupt. By default about 30 such backups are kept on disk, and it will try them all. There was recently a bug in that code, but it's been fixed in 2.5.2.
Also, it's possible that other parts of the filesystem are corrupt, not just the configuration file(s).
If you are worried about that kind of thing, reinstall using ZFS and also use a UPS.
-
That explains it, thanks @jimp .
I think you're referring to https://redmine.pfsense.org/issues/11748Based on my experience with 2.5.1, I was under the mistaken impression that this was not a feature.
-
Yes, that is the issue. But to hit that problem both the current and first backup both had to be corrupted in just the wrong way.
-
I made the changes again since the previous config save. Then downloaded the xml for safe keeping. Attempted to put the device in production but it wasn't working. So I took it back down and tried to see what's up. Now it's bootlooping, orange LEDs flashing every minute, never comes up. This is a brand new device and even if it could be wiped, reloaded, I'm not gonna put such an unreliable device in production. RMA requested.