Solved

File systems: Journaling  and Error Correction (general)

Posted on 2016-08-08
3
86 Views
Last Modified: 2016-08-09
I am making my first array into the world of Linux and I have two questions which I believe is also inherent to a number of other operating systems. In my Linux book there is a short passage about fault-resilience and error correction and as the passage was very short, I looked did some online research which confused me even more.

My fist question is about the journaling

I understand that there are two methods of journaling: logical and physical and only the latter provides for full system recovery.

How can a logical/meta-data only journaling support system recovery? Is it like the system logs in Windows which informs the user which device or software has caused an error? Then it's up to the user to decide how to proceed?

On Wikipedia I read that "After a crash, recovery involves reading the journal from the file system and replaying changes from this journal until the file system is consistent again. " I assume this applies to the physical logging only?

My last question is about error checking:

Every time a user saves a file, a check value is stored alongside (or inside?) the file. Is this called the check value also known as the check sum? The same process is done when the file is opened. If the values don't match, then there was an error.  Is this done with a function known as Cyclic Redundancy Check? Or am I mixing things up?

Thank you for your help.
0
Comment
Question by:Massimo Scola
3 Comments
 
LVL 34

Accepted Solution

by:
Gary Patterson earned 350 total points
ID: 41747817
Journaling file systems write a log of uncommitted file system changes to a persistent store, and buffer them there until all of the file system updates complete. If the system crashes, the uncommitted journaled changes can be replayed into the file system, and lost file system changes recovered.

Writing to a journal is a fast, sequential write to disk, and can be done very quickly and efficiently.

Here's an article that explains journaling file systems in Linux in detail:

http://www.ibm.com/developerworks/library/l-journaling-filesystems/

And here is one that explains physical vs logical journaling:

http://www.ibm.com/developerworks/library/l-fs7/

CRC / checksum

A CRC is a checksum - it is just one particular checksum algorithm.  There are many others.  

CRC checking is done at the physical layer (disk sector), and may also be implemented at the file system level, and again at the application layer.  In most file systems, I'd imagine file checksums are  stored in the directory of the file system, or a similar internal file system table.

Application level checksums can be stored in the file itself, or in another file or a database.
0
 
LVL 88

Assisted Solution

by:rindi
rindi earned 150 total points
ID: 41747889
No, it isn't like the Windows system logs. It is more like what NTFS does, which is also a journaling file-system. If there is file-system corruption in NTFS you can run chkdsk with repair options which will repair those corruptions. On Linux it would be fsck which you would run to repair a corrupt file-system.

With BTRFS you get a file-system which is similar to Solaris' ZFS. It does snapshots, which means you can for example you can go back to a previous version if some installation botched something up. But it needs more management, for example your disk can fill up without you noticing. You need to prune old snapshots, and currently there are no reliable GUI tools for that.
0
 

Author Closing Comment

by:Massimo Scola
ID: 41749373
Brilliant! Thanks for your help!
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Windows 10 is here and for most admins this means frustration and challenges getting that first working Windows 10 image. As in my previous sysprep articles, I've put together a simple help guide to get you through this process. The aim is to achiev…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question