Skip to contentSkip to conversation

EXT3 data=ordered system crash

DISCUSSION Anil kumar 2 participants 2 messages Aug 19, 2010 – Aug 31, 2010 VFS

lore
Share & tools
lore

Anil kumar

author
#0 lore raw

As I understand by default EXT3 uses "data=ordered" journalling mode. In this case, 1)the Data is written to the disk
2)MetaData is written to the journal
3)Transaction complete

With the above being the case, is there a possibility that if system crashes there will be filesystem inconsistency.

My understanding is that it should not as Data is first written to the disk and if it fails(or incompletes) then there is record of it anyway in the journal and if system crashes during writing MetaData to the journal it should be okay as actual Data is already in the Disk.

reviewer
#1 lore raw
Quoted 5 lines · Anil kumar

As I understand by default EXT3 uses "data=ordered" journalling mode. In this case, 1)the Data is written to the disk
2)MetaData is written to the journal
3)Transaction complete

Quoted 7 lines

With the above being the case, is there a possibility that if system crashes there will be filesystem inconsistency.

My understanding is that it should not as Data is first written to the disk and if it fails(or incompletes) then there is record of it anyway in the journal and if system crashes during writing MetaData to the journal it should be okay as actual Data is already in the Disk.

Yes. You can find what mode the filesystem is using by looking at
/proc/mounts. It is data=ordered by default but superblock flags can influence this as well and for some time there was a kernel config option so that we defaulted to data=writeback when no other mode was specified...

Honza

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR