Re: fsck on boot
- From: ibuprofin@xxxxxxxxxxxxxxxxxxxxxx (Moe Trin)
- Date: Wed, 08 Feb 2006 21:32:59 -0600
On Wed, 08 Feb 2006, in the Usenet newsgroup comp.os.linux.embedded, in article
<43EA5F11.7050802@xxxxxxxxxxxxxxxxxxxx>, Carlos wrote:
The problem with the system is that we have customers that love to just
pull the plug on the back without shutting them down properly.
That makes for problems. If you can't smack the customers upside the
head a few times to indicate that's a bad thing, about the only thing
you can do is to provide a split power source, so that the lights and
displays die immediately on loss of power and the CPU and disk retain
power long enough to shut down cleanly after recognizing the loss of
power. Probably not an easy thing to put into practice.
I know my Tivo doesn't even have a power button and I have had to unplug
it while recording stuff and it never has frozen on reboot, then maybe
they use a different FS or they don't run fsck.
The "program" portion of the system is RO media, so yanking the power
can't screw that. There _MAY_ be a mechanism to recognize when the
power has failed, and to immediately stop writing to disk (and hope
that any buffers get written correctly) so as to not squitter all over
the platters when the power is insufficient to control where the head
is located.
We are considering the read only mounting.
That's a highly desirable solution. Used to be you could buy the better
grade of disks that had a write-enable jumper. With the jumper (or an
external switch) in one position, the entire drive was read-only. Moving
the jumper (or changing the switch position) allowed the drive to be
made writable. This was entirely independent of how the drive was
mounted. We used this feature on our public facing systems, so that
even if someone cracked in, they had no place to even temporarily
store their rootkit or whatever, never mind altering the files. We're
now using bootable CDs or DVDs as those hard drives are somewhat scarce
today.
In Message-ID: <43ea788d$0$25087$5426a0f7@xxxxxxxxxxxxxxx>, you also
ask:
We noticed that Linux does a lot of IO buffering/caching, I mean more
than 1 gig of RAM goes to buffers and cache according to the "free"
command. Our systems have a lot of RAM, often unused.
Standard answer: unused RAM is wasted RAM - Linux uses it to cache a
lot of things.
What we are wondering is whether that buffer/cache is write or read or
both? and if so, is there a way to turn off writing cache/buffers?
Both - and don't forget that most hard drives also have a cache. Turning
caching off completely makes little sense, even in your "pull the plug"
scenario. You will slow the system down slightly, but you can turn off
the write caching - depending on the file system you are using. Look at
the 'sync' option to 'mount', and depending on your kernel. you may be
able to tweak the timing of 'bdflush' if your kernel uses it. The command
'apropos sync tune' might offer further clues.
Old guy
.
- Follow-Ups:
- Re: fsck on boot
- From: Carlos
- Re: fsck on boot
- References:
- fsck on boot
- From: Carlos
- Re: fsck on boot
- From: Moe Trin
- Re: fsck on boot
- From: Carlos
- fsck on boot
- Prev by Date: Re: fsck on boot
- Next by Date: Re: fsck on boot
- Previous by thread: Re: fsck on boot
- Next by thread: Re: fsck on boot
- Index(es):