Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Old file system and journaling.

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
hack3rcon
Posts: 746
Joined: 2015-02-16 09:54
Has thanked: 48 times

Old file system and journaling.

#1 Post by hack3rcon »

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

Thanks.

User avatar
Bloom
df -h | grep > 90TiB
df -h | grep > 90TiB
Posts: 504
Joined: 2017-11-11 12:23
Been thanked: 26 times

Re: Old file system and journaling.

#2 Post by Bloom »

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.

hack3rcon
Posts: 746
Joined: 2015-02-16 09:54
Has thanked: 48 times

Re: Old file system and journaling.

#3 Post by hack3rcon »

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?

User avatar
Bloom
df -h | grep > 90TiB
df -h | grep > 90TiB
Posts: 504
Joined: 2017-11-11 12:23
Been thanked: 26 times

Re: Old file system and journaling.

#4 Post by Bloom »

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.

Post Reply