# Can we abuse of the journal recovery feature?

## Logicien

Today, the power cut twice on my Gentoo system cause have not been enough careful with the cables. So, I had to power on twice on an umounted, so on an unclean Gentoo root partition.

I had nothing important to be save before the power cut but, is the recovery journal can always make clean an Ext4 filesystem so my data integrity will be good since the last normal and clean boot?

----------

## Roman_Gruber

Not sure what you really ask for.

When you have doubts on the file system integrity, you may run file system check from a live-cd

----------

## Jaglover

Logicien,

I wouldn't count on it.

----------

## NeddySeagoon

Logicien,

journal replay gets your filesystem metadata back into a self consistent state, much like fsck can but faster as there is no need to read the entire volume.

Neither of these things say anything about the user data on the volume and indeed, fsck can often make a bad situation worse for user data.

Ext4 journaling has several modes. The more of it you use the slower it goes.

The only thing to save you from a power failure is an uninterruptible power supply.

----------

## Logicien

Thank's for the answers. The Ext4 journal use data=ordered, the default. So with this mode data can be already written on the hard drive and not using any inode on the metadatas if a cut arrive after a data write but before the writing of the metadatas and the journal. Yes, I can can do an fsck.ext4 at anytime.

I was on Xfce4 who gave me the desktop as normal after the power cut. Only Seamonkey saw a browser not clean close and offer me to restaure the last sesson or start a new one.

My electricity cable extension have a power button who is easy to press by error. I may find a one with no button to avoid that cut of power.

 :Very Happy: 

----------

