FSCK on boot - BSD

This is a discussion on FSCK on boot - BSD ; Hello, I have a problem with dirty slices... some file corruption after a few crash. The server is in a datacentre so the only link to it is with ssh. The fsck -y command after a reboot is not capable ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: FSCK on boot

  1. FSCK on boot

    Hello,

    I have a problem with dirty slices... some file corruption after a few
    crash. The server is in a datacentre so the only link to it is with ssh.

    The fsck -y command after a reboot is not capable to repair the slices
    so I need to go in single user mode... but this is not posible (I
    think!) without loosing the ssh access.

    I know that fsck is run automaticly after a crash... but without -y so
    it does not fix many problems.

    How do I change this on boot time? I want to make sure that before the
    slices are mounted, fsck will perform the needed modification? Where is
    the file I need to edit to add "-y" ?

    Or is there a better way?
    Thanks!
    --
    Jason

  2. Re: FSCK on boot

    On Fri, 1 Aug 2008 21:13:34 UTC, Jason Lambert
    wrote:

    > I have a problem with dirty slices... some file corruption after a few
    > crash. The server is in a datacentre so the only link to it is with ssh.
    >
    > The fsck -y command after a reboot is not capable to repair the slices
    > so I need to go in single user mode... but this is not posible (I
    > think!) without loosing the ssh access.
    >
    > I know that fsck is run automaticly after a crash... but without -y so
    > it does not fix many problems.
    >
    > How do I change this on boot time? I want to make sure that before the
    > slices are mounted, fsck will perform the needed modification? Where is
    > the file I need to edit to add "-y" ?


    Lookas as if, in rc.conf:

    fsck_y_enable="YES"

    might do it.
    --
    Bob Eager
    UNIX since v6..
    http://tinyurl.com/2xqr6h


  3. Re: FSCK on boot

    On Fri, 01 Aug 2008 17:13:34 -0400,
    Jason Lambert wrote:
    > The server is in a datacentre so the only link to it is with ssh.


    This is why you have remote serial console access[0][1].


    > The fsck -y command after a reboot is not capable to repair the slices
    > so I need to go in single user mode... but this is not posible (I
    > think!) without loosing the ssh access.


    Basically, no, though depending on which partitions are affected
    you might be able to turn off the things that might scribble on them
    then unmount them and have fsck have a go at them.


    > I know that fsck is run automaticly after a crash... but without -y so
    > it does not fix many problems.


    As mentioned you might force -y at boot.


    [0] Some other box, often some appliance that'll let you ssh into it
    then connect to a serial port connected to your box. Some can also
    cycle the power, let you dial into them over modem, etc. etc.
    [1] Or one of those lights-out management cards that provide everything
    from telnet access to copying of the vga picture to some web interface.
    Basically re-inventing what Real Computers have built into them from
    the start without the dependency on having graphics hardware present.

    --
    j p d (at) d s b (dot) t u d e l f t (dot) n l .
    This message was originally posted on Usenet in plain text.
    Any other representation, additions, or changes do not have my
    consent and may be a violation of international copyright law.

  4. Re: FSCK on boot

    On Aug 1, 4:13*pm, Jason Lambert wrote:
    > Hello,
    >
    > I have a problem with dirty slices... some file corruption after a few
    > crash. The server is in a datacentre so the only link to it is with ssh.
    >
    > The fsck -y command after a reboot is not capable to repair the slices
    > so I need to go in single user mode... but this is not posible (I
    > think!) without loosing the ssh access.
    >
    > I know that fsck is run automaticly after a crash... but without -y *so
    > it does not fix many problems.
    >
    > How do I change this on boot time? I want to make sure that before the
    > slices are mounted, fsck will perform the needed modification? *Where is
    > the file I need to edit to add "-y" ?
    >
    > Or is there a better way?


    Depending on which mount points they are, you could re-mount them
    read only and do the dirty work from ssh.

    Probably won't work with /var
    very unlikely you would ever get it to work on /
    maybe /usr
    and most /tmp errors can be shrugged off anyway
    unless they are harbingers of your entire drive dying.

  5. Re: FSCK on boot

    Bob Eager wrote:
    > On Fri, 1 Aug 2008 21:13:34 UTC, Jason Lambert
    > wrote:
    >
    >> I have a problem with dirty slices... some file corruption after a few
    >> crash. The server is in a datacentre so the only link to it is with ssh.
    >>
    >> The fsck -y command after a reboot is not capable to repair the slices
    >> so I need to go in single user mode... but this is not posible (I
    >> think!) without loosing the ssh access.
    >>
    >> I know that fsck is run automaticly after a crash... but without -y so
    >> it does not fix many problems.
    >>
    >> How do I change this on boot time? I want to make sure that before the
    >> slices are mounted, fsck will perform the needed modification? Where is
    >> the file I need to edit to add "-y" ?

    >
    > Lookas as if, in rc.conf:
    >
    > fsck_y_enable="YES"
    >
    > might do it.


    Hello,

    It is already in the /etc/rc.conf and not allowing the cleanup. My
    guess is that this file is invoqued to late in the boot process...

    It must be very early... ? Any idea?

    Thanks!
    --
    Jason

  6. Re: FSCK on boot

    jpd wrote:
    > On Fri, 01 Aug 2008 17:13:34 -0400,
    > Jason Lambert wrote:
    >> The server is in a datacentre so the only link to it is with ssh.

    >
    > This is why you have remote serial console access[0][1].


    AFAIK, this is not available in the machine... and I have zero
    experience with this!



    >> The fsck -y command after a reboot is not capable to repair the slices
    >> so I need to go in single user mode... but this is not posible (I
    >> think!) without loosing the ssh access.

    >
    > Basically, no, though depending on which partitions are affected
    > you might be able to turn off the things that might scribble on them
    > then unmount them and have fsck have a go at them.



    That's my probleme... I need to clean:
    /
    /tmp
    /var
    /usr
    /work



    >> I know that fsck is run automaticly after a crash... but without -y so
    >> it does not fix many problems.

    >
    > As mentioned you might force -y at boot.



    Yes but how? Or were?

    Thanks!
    --
    Jason

  7. Re: FSCK on boot

    Jason Lambert wrote:
    [snip]
    >> Lookas as if, in rc.conf:
    >>
    >> fsck_y_enable="YES"
    >>
    >> might do it.

    >
    > Hello,
    >
    > It is already in the /etc/rc.conf and not allowing the cleanup. My
    > guess is that this file is invoqued to late in the boot process...
    >
    > It must be very early... ? Any idea?
    >
    > Thanks!
    > --
    > Jason

    Try both in rc.conf:

    fsck_y_enable="YES"
    background_fsck="NO"

    -Jason


  8. Re: FSCK on boot

    Jason Bourne wrote:

    > Try both in rc.conf:
    >
    > fsck_y_enable="YES"
    > background_fsck="NO"


    When do you suppose that rc is invoked?

  9. Re: FSCK on boot

    On Sat, 02 Aug 2008 09:29:40 -0700,
    Michael Sierchio wrote:
    > Jason Bourne wrote:
    >> Try both in rc.conf:
    >>
    >> fsck_y_enable="YES"
    >> background_fsck="NO"

    >
    > When do you suppose that rc is invoked?


    It may be that Jason is under the impression --as I was-- that the system
    was still booting and up in some fashion. If that is not the case, or the
    partition rc.conf is on isn't to be forced into writeable state, then the
    OP is pretty much SOL without (some form of) console access.


    --
    j p d (at) d s b (dot) t u d e l f t (dot) n l .
    This message was originally posted on Usenet in plain text.
    Any other representation, additions, or changes do not have my
    consent and may be a violation of international copyright law.

+ Reply to Thread