Solved

File systems: Journaling  and Error Correction (general)

Posted on 2016-08-08
3
63 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:mscola
3 Comments
 
LVL 34

Accepted Solution

by:
Gary Patterson earned 350 total points
Comment Utility
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 87

Assisted Solution

by:rindi
rindi earned 150 total points
Comment Utility
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:mscola
Comment Utility
Brilliant! Thanks for your help!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Windows 7 does not have the best desktop search built in. This is something Windows 7 users have struggled with. You type something in, and your search results don’t always match what you are looking for, or it doesn’t actually work at all. There ar…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now