Old file system and journaling.

New to Debian (Or Linux in general)? Ask your questions here!

Old file system and journaling.

Postby hack3rcon » 2019-08-26 05:43

Hello,
A file system like EXT2 not have journaling feature and if the system crashed then what's happened for the data?

Thanks.
hack3rcon
 
Posts: 293
Joined: 2015-02-16 09:54

Re: Old file system and journaling.

Postby Bloom » 2019-08-26 05:59

Without journaling, there is still caching. That means if the power goes off suddenly or the reset button (if present) of the system is pressed, data in RAM but not yet written to disc is lost.
That leaves the volume in a "dirty" state. If you're lucky, that can be repaired and you lose all files of which data to write was in still in RAM at the time of the calamity. If disc administrative data of directories and files (the so-called metadata) writing operations were lost, the disc's or partition's directory structure may be compromised. This may even the complete drive or partition unreadable.

A journaling system saves the last writing action and so can repeat that when the system reboots. This should recreate the lost data in RAM en finish the writing operation properly without any files lost.
There are also journaling systems which save only the metadata, not the actual data. These systems can still lose data on a sudden reboot or power loss, but metadata write operations (which have the potential to cause the most harm if they fail) will be saved.
User avatar
Bloom
 
Posts: 178
Joined: 2017-11-11 12:23

Re: Old file system and journaling.

Postby hack3rcon » 2019-08-26 07:15

Bloom wrote:Without journaling, there is still caching. That means if the power goes off suddenly or the reset button (if present) of the system is pressed, data in RAM but not yet written to disc is lost.
That leaves the volume in a "dirty" state. If you're lucky, that can be repaired and you lose all files of which data to write was in still in RAM at the time of the calamity. If disc administrative data of directories and files (the so-called metadata) writing operations were lost, the disc's or partition's directory structure may be compromised. This may even the complete drive or partition unreadable.

A journaling system saves the last writing action and so can repeat that when the system reboots. This should recreate the lost data in RAM en finish the writing operation properly without any files lost.
There are also journaling systems which save only the metadata, not the actual data. These systems can still lose data on a sudden reboot or power loss, but metadata write operations (which have the potential to cause the most harm if they fail) will be saved.

RAM? With journaling feature the data that existed to the RAM can be recovered when system rebooted?
hack3rcon
 
Posts: 293
Joined: 2015-02-16 09:54

Re: Old file system and journaling.

Postby Bloom » 2019-08-26 08:12

The journal is frequently written to disc, so that it can and will survice a sudden reboot or powerloss.
The idea is that de journal is written first, then the actual writing operaton is done. Because the journal is much less data (especially if only metadata is journaled), it finishes much more quickly and chances are very good that is is done before the calamity hits.
User avatar
Bloom
 
Posts: 178
Joined: 2017-11-11 12:23


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 11 guests

fashionable