• is /forcefsck not safe?

    From Charles T. Smith@21:1/5 to All on Mon Feb 15 15:30:41 2016
    This seems to be an undocumented feature, and when you do an internet
    search, some dolts keep repeating, don't run fsck on a running system.
    The assumption I've always gone on is that the fsck started as a
    consequence of /forcefsck would be done either directly by FS initialization code and/or while still rooted in the initrd virtual root.
    But maybe that's a naive assumption, and the dolts know something I don't.
    It would be nice if this weren't undocumented.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Charles T. Smith@21:1/5 to All on Mon Feb 15 15:44:31 2016
    On Mon, 15 Feb 2016 15:30:41 +0000, Charles T. Smith wrote:

    okay, I found this:

    http://bitsofmymind.com/2014/03/14/how-to-fix-fsck-your-root-file-system-that-you-have-to-boot-into-on-linux/

    I think a live DVD is probably safer and less work ...

    :(

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to Charles T. Smith on Mon Feb 15 16:22:07 2016
    On 2016-02-15, Charles T. Smith <cts.private.yahoo@gmail.com> wrote:
    This seems to be an undocumented feature, and when you do an internet
    search, some dolts keep repeating, don't run fsck on a running system.
    The assumption I've always gone on is that the fsck started as a
    consequence of /forcefsck would be done either directly by FS initialization code and/or while still rooted in the initrd virtual root.

    Note that initrd is a Linuxism; it is not universal. And whether or not /forcefsck is supported and how depends on the distro.

    "Classically", how it should work without any initrd or some such thing
    is that the boot scriptology processes this flag early on, while the
    root filesystem is still mounted in read-only mode. It worked this way
    on Linux distros before initrd was introduced, and perhaps still does
    on distros that don't use initrd (or don't do fsck out of initrd).

    Running fsck on a quiescent system whose root fs is mounted read-only
    is generally safe. Nothing should be reading any files (fsck is the only user-space thing running), so you have no write/read hazard, and there
    are no write/write hazards since the fs is read-only; the only writer is
    fsck.

    If the filesystem is unclean and altered by fsck, then an immediate
    reboot can take place, which blows off any inconsistency between what is
    on the disk now and what the kernel filesystem code *thinks* is on disk.

    By the way, FS initialization code in the kernel isn't going to contain
    a fsck implementation, by the way. In principle it could, but in reality
    it doesn't.

    But maybe that's a naive assumption, and the dolts know something I don't.
    It would be nice if this weren't undocumented.

    The dolts probably know that the boot-scripted fsck is somehow run on
    a read only FS, whether out of initrd or whatever.

    "Don't run fsck live" is correct, and applies when you're fully booted
    and mounted read/write.

    (Even so, it can still be okay if you are sure nothing is actually using
    the given volume. But what better way to prove that nothing is using
    it it than by successfully unmounting).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to Charles T. Smith on Mon Feb 15 16:24:23 2016
    On 2016-02-15, Charles T. Smith <cts.private.yahoo@gmail.com> wrote:
    On Mon, 15 Feb 2016 15:30:41 +0000, Charles T. Smith wrote:

    okay, I found this:

    http://bitsofmymind.com/2014/03/14/how-to-fix-fsck-your-root-file-system-that-you-have-to-boot-into-on-linux/

    I think a live DVD is probably safer and less work ...

    Just sitting back and letting your boot scripts do their work is less
    work.

    The rescue medium is for recovery situations when the disk is so
    trashed that the regular fsck can't deal with it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Charles T. Smith@21:1/5 to Kaz Kylheku on Mon Feb 15 16:30:43 2016
    On Mon, 15 Feb 2016 16:22:07 +0000, Kaz Kylheku wrote:

    Thank you, that sums it up pretty good...

    "Don't run fsck live" is correct, and applies when you're fully booted
    and mounted read/write.

    That's why I said "dolts", because the nature of the question implies that
    the questioner knows that and is trying to find a safe way to accomplish
    the fsck (but I regretted I used inflammatory language after I hit enter :) ).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)