OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 16.1 Legacy Series »
  • fsck and OpnSense
« previous next »
  • Print
Pages: [1]

Author Topic: fsck and OpnSense  (Read 5533 times)

smajor

  • Jr. Member
  • **
  • Posts: 74
  • Karma: 10
    • View Profile
fsck and OpnSense
« 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?
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13952
  • Karma: 1208
    • View Profile
Re: fsck and OpnSense
« Reply #1 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.
Logged

smajor

  • Jr. Member
  • **
  • Posts: 74
  • Karma: 10
    • View Profile
Re: fsck and OpnSense
« Reply #2 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.
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 16.1 Legacy Series »
  • fsck and OpnSense
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2