ffs_valloc dup alloc - UFS/fsck issue?
-
Hi all,
We have some pfSense 2.4.3p1 systems installed in locations that sometimes looses power.
This occasionally causes disk issues, but at version 2.2 and before this was normally fixed by fsck and no big problem.At 2.4.3p1 we see an increase in system failures because fsck doesn't seem to be able to fix disk problems.
Is this a known issue? Is it related to UFS/journaling used from 2.3/2.4?Can it be permantly fixed/avoided in some way? I know booting into single user and running fsck -yf (no journal) fixes it, but that is not a durable "fix".
Thanks in advance for any tips!
-
- Put the device on a UPS, bonus points if it's a UPS supported by a package like apcupsd or nut that can shut the firewall down before the battery drains.
- Use ZFS instead of UFS.
-
Thanks, jimp.
-
It is already on UPS, but the nature of the install sometimes make the installations without power for a longer time. Sometimes users "coldstarts" the unit by holding the power button until it shuts down and causes disk issues.
-
How can I do that?
Cheers
-
-
@jarlel said in ffs_valloc dup alloc - UFS/fsck issue?:
Sometimes users "coldstarts" the unit by holding the power button until it shuts down and causes disk issues.
Such users should not be able to touch network gear..
As mentioned get the bonus points by using UPS that allows for firewall to shut down if battery gets low, etc.
As to ZFS, you choose it when you do an install
https://www.netgate.com/docs/pfsense/book/install/perform-install.html
Partition / Filesystem SelectionThe Partitioning step selects the filesystem for the firewall’s target disk. In pfSense 2.3.x and before, the only option was UFS.The new ZFS filesystem type is more reliable and has more features than the older UFS format, however ZFS can be memory hungry. Either filesystem will work on hardware with several GB of RAM, but if RAM usage is critical to other tasks that will run on this firewall, UFS is a more conservative choice. For hardware that requires UEFI, use ZFS.
The process varies slightly depending on the selected filesystem type, so follow the section below that matches the filesystem type used by this firewall.
-
@johnpoz said in ffs_valloc dup alloc - UFS/fsck issue?:
@jarlel said in ffs_valloc dup alloc - UFS/fsck issue?:
Sometimes users "coldstarts" the unit by holding the power button until it shuts down and causes disk issues.
Such users should not be able to touch network gear..
I agree, but sometimes unavoidable...
As to ZFS, you choose it when you do an install
https://www.netgate.com/docs/pfsense/book/install/perform-install.htmlThanks, will look into this. So, no way of changing this after install, I guess...
Using ZFS makes fsck able to fix everything, right? That is the difference?Cheers
-
Off the top I do not believe there is a way to change without clean install.
Take backup copy of config, clean install - restore config.. Should take all of a few minutes if you are on site or have appropriate smart hands on site.
-
You need to re-install to switch filesystem types, no way around that.
ZFS is a much more durable filesystem, it means fsck is no longer needed. And in fact fsck does not work on ZFS (or didn't last time I forgot and tried it!).
Just for clarity the problem in UFS is usually not the fsck cannot repair it, It's that fsck returns the filesystem is clean when it isn't. That's why it can often be repaired by running it repeatedly from single user mode. It's certainly possible to damage the filesystem beyond what UFS can repair no matter how many times it's run though.
https://www.freebsd.org/doc/handbook/zfs.html
Steve