SU+J Lost files after a power failure
bruce at cran.org.uk
Mon Oct 14 17:54:16 UTC 2013
On 10/14/2013 6:16 PM, CeDeROM wrote:
> Isn't there Journal to prevent and reverse such damage?
Unlike other journaling filesystems, UFS+J only protects the metadata,
not the data itself - i.e. I think it ensures you won't have to run a
manual fsck, but just like plain old UFS files may be truncated as the
journal is replayed.
For ext3, https://www.kernel.org/doc/Documentation/filesystems/ext3.txt
explains the different modes, with 'ordered' being default:
There are 3 different data modes:
* writeback mode
In data=writeback mode, ext3 does not journal data at all. This mode provides
a similar level of journaling as that of XFS, JFS, and ReiserFS in its default
mode - metadata journaling. A crash+recovery can cause incorrect data to
appear in files which were written shortly before the crash. This mode will
typically provide the best ext3 performance.
* ordered mode
In data=ordered mode, ext3 only officially journals metadata, but it logically
groups metadata and data blocks into a single unit called a transaction. When
it's time to write the new metadata out to disk, the associated data blocks
are written first. In general, this mode performs slightly slower than
writeback but significantly faster than journal mode.
* journal mode
data=journal mode provides full data and metadata journaling. All new data is
written to the journal first, and then to its final location.
In the event of a crash, the journal can be replayed, bringing both data and
metadata into a consistent state. This mode is the slowest except when data
needs to be read from and written to disk at the same time where it
outperforms all other modes.
More information about the freebsd-questions