Date: Mon, 14 Oct 2013 18:54:04 +0100 From: Bruce Cran <bruce@cran.org.uk> To: CeDeROM <cederom@tlen.pl>, Brad Mettee <bmettee@pchotshots.com> Cc: David Demelier <demelier.david@gmail.com>, Adam Vande More <amvandemore@gmail.com>, FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: SU+J Lost files after a power failure Message-ID: <525C2FBC.4080808@cran.org.uk> In-Reply-To: <CAFYkXjm8y0Br31_pqRZc0sNFbqCNtKHhjeQuiLXkGT2zxSu0GA@mail.gmail.com> References: <525A6831.5070402@gmail.com> <l3gc7e$c91$1@ger.gmane.org> <20131014133953.58f74659@gumby.homeunix.com> <525C1D1C.9050708@gmail.com> <CA%2BtpaK2Pr2po2cQ1yanQK9%2BwLp77SYqYHjxiXaU5FfXwHrkGow@mail.gmail.com> <CAFYkXjn-1wTJcQ4a_fyXCvwh9ukt3%2BdjM2qsMeaH1HhVJNvhiA@mail.gmail.com> <525C2554.7080203@pchotshots.com> <CAFYkXjm8y0Br31_pqRZc0sNFbqCNtKHhjeQuiLXkGT2zxSu0GA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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: Data Mode --------- 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. -- Bruce Cran
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?525C2FBC.4080808>