Journalised filesystems work by saving filesystem "meta data" at periodic intervals (checkpoints). If a system crashes, by power failure or by the kernel crashing for example, and if the hardware isn't damaged, then the filesystem can be automatically rebuilt relatively quickly from the most recent checkpoint with a complete "journal". It is a common misconception that journalised filesystems are designed to protect your ordinary data; i.e. your kid's school project! This is NOT the case. A journalised filesystem is designed to protect your filesystem! Luckily, recovery of the filesystem has essentially nothing to do with a "race between the CPU, disk electronics and disk motor"!
In Frank's case, had he used ext2 instead of ext3, he would have had to wait a a lot longer for his filesystem to be rebuilt, and he may not have had a working filesystem at the end of it all!
If it's your data you want to protect, perform regular backups. ;-)
Dr. Kevin Farrell,
Lecturer in Computing,
Institute of Technology,
Blanchardstown Road North,
Telephone: +353 - 1 - 885 1095
On Sat, Apr 24, 2004 at 11:01:33AM +0100, Niall O Broin wrote:
> BTW I find this rather interesting - here's Frank with a journalling
> filesystem which suffered an unplanned poweroff, one of the things with
> which a jfs should cope better than a non jfs - but it didn't. Of
> course, perhaps the damage would have been much worse without a jfs.
Journalling protects you very well against you hitting the reset button
or crashing the kernel. In these cases, the disk still has power and
makes sure that the data just written by the kernel hits the platters.
When you pull power, it becomes a race between the CPU, disk electronics
and disk motor. Writes that got to the disk might not make it from the
disk's on-board cache to the platters.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!