Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

File systems: Journaling  and Error Correction (general)

Posted on 2016-08-08
3
100 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 35

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
winscp 000webhost.com 6 73
number in printf 13 32
blank screen when trying to setup Unity on Ubuntu 14.04 9 42
RHEL installation problems on HP Proliant DL 360 G6 server 20 63
In a recent article here at Experts Exchange (http://www.experts-exchange.com/articles/18880/PaperPort-14-in-Windows-10-A-First-Look.html), I discussed my nine-month sandbox testing of the Windows 10 Technical Preview, specifically with respect to r…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

840 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