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)