EXT3 data=ordered system crash
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.
Jan Kara
reviewerQuoted 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