How does ntfs journaling help recover system failures




















Microsoft gets a bad rap for a lot of the things it does. But one thing it has done extremely well is create a robust, scalable, efficient file system. NTFS is a journaling file system, which means that, in addition to writing information to the disk, the file system also maintains a log of all changes made.

This feature makes NTFS particularly robust when it comes to recovering from various kinds of failures, such as a power loss or a system crash.

In one of these events, the file system can quickly recover with no loss of data. In very rare instances—Microsoft claims that less than 1 percent of outages fall into this category—a crash requires that you run the CHKDSK repair program to maintain volume integrity. NTFS' security system is quite robust and basically allows or denies access to file system objects on a very granular basis. Attached to each MFT entry is a particular kind of metadata tag with the title of "security descriptor" SD which, appropriately enough, contains information about who is allowed access to a file or folder.

Note the use of the word "metadata" in the previous paragraph. NTFS is very metadata-driven. In fact, when you first create an NTFS partition, a number of metadata files are created, each designed to help track one particular aspect of the file system. This file, under Windows NT 4. Under Windows NT 3. This file exists just in case the primary MFT becomes corrupt, which is one of the reasons that NTFS stores this backup as far away from the primary as possible.

Back on metadata—NTFS' use of metadata and metadata files to describe components of the file system makes it much easier to add features to the file system and to maintain backward compatibility with older versions of NTFS.

I'm not going to delve much deeper into the inner workings of NTFS in this article, but, if there is interest from the readership, I will do so in a future article. NTFS is extremely efficient when it comes to making use of disk space.

Unfortunately, small cluster sizes can result in a performance hit due to the need to read so many clusters to pull data from and write data to the disk. Journaling filesystems write metadata i. Greater flexibility. Journaling filesystems often create and allocate inodes as they are needed, rather than preallocating a specific number of inodes when the filesystem is created. This removes limitations on the number of files and directories that can be created on that partition.

NTFS is a journaling file system, which means that, in addition to writing information to the disk, the file system also maintains a log of all changes made.

This feature makes NTFS particularly robust when it comes to recovering from various kinds of failures, such as a power loss or a system crash. Since NTFS is a journaling file system, it can auto-repair the internal data structures that are used to keep track of files, so the drive itself remains logically consistent. These differences on a desktop will probably not be visible to you, especially if you already have a fast disk.

For anything with higher capability, XFS tends to be faster. Various benchmarks have concluded that the actual ext4 file system can perform a variety of read-write operations faster than an NTFS partition. Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up. Connect and share knowledge within a single location that is structured and easy to search.

In case of a power outage, can the NTFS filesystem be harmed? And is the NTFS built-in mirroring on dynamic disks guaranteed to keep the files in a consistent state in case of a power outage? My point of view of this is that journaling file systems is specifictly designed to tolerate such kind of problems. The user data is not guaranteed by the NTFS file system, but applications like database management system has transaction managers that protects the data.

A few quotes from the great book Microsoft Windows Internals :. NTFS includes a number of advanced features. One of its most significant features is recoverability. If a system is halted unexpectedly, the metadata of a FAT volume can be left in an inconsistent state, leading to the corruption of large amounts of file and directory data.

NTFS logs changes to metadata in a transactional manner so that file system structures can be repaired to a consistent state with no loss of file or directory structure information. File data can be lost, however. From the start, NTFS was designed to include features required of an enterprise-class file system.

To minimiza data loss in the face of an unexpected system outage or crash, a file system must ensure that the integrity of its metadata is guaranteed at all times.

Finally, a file system must allow for software-based data redundancy as a low-cost alternative to hardware-redundant solutions for protecting user data. NTFS uses atomic transactions to implement its file system recovery features. It guarantees that the transaction os either completed or, if the system fails while executing the transaction, rolled back.

In addition, NTFS uses redundant storage for vital file system information so that if a sector on the disk goes bad, NTFS can still access the volume's critical file system data. In addition to recoverability of file system data, some customers require that their own data not be endangered by a power outage or a catastrophic disk failure.

The NTFS recovery capabilities do ensure that the file system on a volume remains accessible, but they make no guarantees for complete recovery of user files. Protection for applications that can't risk losing data is provided through data redundancy.

Data redundancy for user files is implemented via the Windows layered driver model, which provides fault-tolerant disk support. A volume manager can mirror, or duplicate, data from one disk onto another disk so that a redundant copy can always be retrieved. NTFS recovery support ensures that if a power failure or a system failure occurs, no file system operations transactions will be left incomplete and the structure of the disk volume will remain intact without the need to run a disk repair utility.

Although NTFS doesn't guarantee protection of user data in the event of a system crash - some changes can be lost from the cache - applications can take advantage of the NTFS write-through and cash-flushing capabilities to ensure that file modifications are recorded on disk at appropriate intervals.

Both cache write-through - forcing the write operations to be immediately recorded on disk - and cash flushing - forcing contents to be written to disk - are efficient operations. Furthermore, unlike the FAT file system, NTFS guarantees that user data will be consistent and available immediately after a write-through operation or a cash flush, even if the system subsequently fails.

Theory aside, there are so many problems to be found on this site, caused on NTFS by power outage, that the answer has to be : NO.



0コメント

  • 1000 / 1000