OPNsense Forum

Archive => 16.1 Legacy Series => Topic started by: smajor on March 01, 2016, 12:47:11 am

Title: fsck and OpnSense
Post by: smajor on March 01, 2016, 12:47:11 am
I recently discovered that my filesystem didn't come up cleanly after a power outage and may be related to some issues I had.

I did the old school boot into single user mode and ran fsck - actually twice before everything got cleaned up.

Is there a built in with with OpnSense to do this?  I found this with pfSense:

touch /root/force_fsck would force a check/repair on reboot.  Didn't seem to affect OpnSense.  This might be something handy to have as a GUI option down the road?
Title: Re: fsck and OpnSense
Post by: franco on March 01, 2016, 07:50:02 am
We do a bit of recover on boot:

https://github.com/opnsense/core/blob/master/src/etc/rc#L48

You can, however, run the full fsck in background mode later on (while mounted):

# fsck -B /dev/ada0s1a

Not sure how to integrate this correctly into the system, I think FreeBSD actually does that after mounting, sending the background check into the actual background to not postpone boot.
Title: Re: fsck and OpnSense
Post by: smajor on March 02, 2016, 01:13:17 am
That's interesting, I'll try that if it happens again. I know in this particular case, only going in single user mode was going to fix it. We had an extended power outage that the UPS didn't make it through.