Hubbry Logo
NTFSNTFSMain
Open search
NTFS
Community hub
NTFS
logo
7 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
NTFS
NTFS
from Wikipedia
NT File System[1]
Developer(s)Microsoft
Full nameNT File System[2]
IntroducedJuly 27, 1993; 32 years ago (1993-07-27) with Windows NT 3.1
Partition IDs0x07 (MBR)
EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (GPT)
Structures
Directory contentsB-tree variant[3][4]
File allocationBitmap
Bad blocks$BadClus (MFT Record)
Limits
Max volume size264 clusters − 1 cluster (format);
256 TB[a] − 64 KB[a] (Windows 10 version 1703, Windows Server 2016 or earlier implementation)[3]
8 PB[a] − 2 MB[a] (Windows 10 version 1709, Windows Server 2019 or later implementation)[5]
Max file size16 EB[a] − 1 KB (format);
16 TB − 64 KB (Windows 7, Windows Server 2008 R2 or earlier implementation)[3]
256 TB − 64 KB (Windows 8, Windows Server 2012 or later implementation)[6]
8 PB − 2 MB (Windows 10 version 1709, Windows Server 2019 or later implementation)[5]
Max no. of files4,294,967,295 (232−1)[3]
Max filename length255 UTF-16 code units[7]
Allowed filename
characters
  • In Win32 namespace: any UTF-16 code unit (case-insensitive) except /\:*"?<>| as well as NUL[7]
  • In POSIX namespace: any UTF-16 code unit (case-sensitive) except / as well as NUL
Features
Dates recordedCreation, modification, POSIX change, access
Date range1 January 1601 – 14 Sept 30828 or 28 May 60056 (File times are 64-bit numbers counting 100-nanosecond intervals (ten million per second) from 1601)[b]
Date resolution100 ns
ForksYes (see § Alternate data stream (ADS) below)
AttributesRead-only, hidden, system, archive, not content indexed, off-line, temporary, compressed, encrypted
File system
permissions
ACLs
Transparent
compression
Per-file, LZ77 (Windows NT 3.51 onward)
Transparent
encryption
Per-file,
DESX (Windows 2000 onward),
Triple DES (Windows XP onward),
AES (Windows XP Service Pack 1, Windows Server 2003 onward)
Data deduplicationYes (Windows Server 2012)[8]
Other
Supported
operating systems
Windows NT 3.1 and later
Mac OS X 10.3 and later (read-only)
Linux kernel version 2.6 and later
Linux kernel versions 2.2–2.4 (read-only)
FreeBSD
NetBSD
OpenBSD (read-only)
ChromeOS
Solaris
ReactOS (read-only)

NT File System (NTFS) (commonly called New Technology File System) is a proprietary journaling file system developed by Microsoft in the 1990s.[9][10][2]

It was developed to overcome scalability, security and other limitations with FAT.[11] NTFS adds several features that FAT and HPFS lack, including: access control lists (ACLs); filesystem encryption; transparent compression; sparse files; file system journaling and volume shadow copy, a feature that allows backups of a system while in use.

Starting with Windows NT 3.1, it is the default file system of the Windows NT family superseding the File Allocation Table (FAT) file system.[12] NTFS read/write support is available on Linux and BSD using NTFS3 in Linux and NTFS-3G in both Linux and BSD.[13][14][15]

NTFS uses several files hidden from the user to store metadata about other files stored on the drive which can help improve speed and performance when reading data.[1]

NTFS was slated to be replaced by WinFS, one of the anchor features of the Longhorn platform, however WinFS was cancelled after Microsoft was unable to resolve performance problems with the filesystem.

History

[edit]

In the mid-1980s, Microsoft and IBM formed a joint project to create the next generation of graphical operating system; the result was OS/2 and HPFS. Because Microsoft disagreed with IBM on many important issues, they eventually separated; OS/2 remained an IBM project and Microsoft worked to develop Windows NT and NTFS.

The HPFS file system for OS/2 contained several important new features. When Microsoft created their new operating system, they borrowed many of these concepts for NTFS.[16] The original NTFS developers were Tom Miller, Gary Kimura, Brian Andrew, and David Goebel.[17]

Probably as a result of this common ancestry, HPFS and NTFS use the same disk partition identification type code (07). Using the same Partition ID Record Number is highly unusual, since there were dozens of unused code numbers available, and other major file systems have their own codes. For example, FAT has more than nine (one each for FAT12, FAT16, FAT32, etc.). Algorithms identifying the file system in a partition type 07 must perform additional checks to distinguish between HPFS and NTFS.

Versions

[edit]

Microsoft has released five versions of NTFS:

NTFS version number First operating system Release date New features Remarks
1.0 Windows NT 3.1 1993[12] Initial version NTFS 1.0 is incompatible with 1.1 and newer: volumes written by Windows NT 3.5x cannot be read by Windows NT 3.1 until an update (available on the NT 3.5x installation media) is installed.[18]
1.1 Windows NT 3.5 1994 Named streams and access control lists[19] NTFS compression support was added in Windows NT 3.51
1.2 Windows NT 4.0 1996 Security descriptors Commonly called NTFS 4.0 after the OS release
3.0 Windows 2000 2000 Disk quotas, file-level encryption in a form of Encrypting File System, sparse files, reparse points, update sequence number (USN) journaling, distributed link tracking, the $Extend folder and its files Compatibility was also made available for Windows NT 4.0 with the Service Pack 4 update. Commonly called NTFS 5.0 after the OS release.[20]
3.1 Windows XP October 2001 Expanded the Master File Table (MFT) entries with redundant MFT record number (useful for recovering damaged MFT files) Commonly called NTFS 5.1 after the OS release. LFS version 1.1 was replaced by version 2.0 as of Windows 8 to improve performance.

The NTFS.sys version number (e.g. v5.0 in Windows 2000) is based on the operating system version; it should not be confused with the NTFS version number (v3.1 since Windows XP).[21][22]

Although subsequent versions of Windows added new file system-related features, they did not change NTFS itself. For example, Windows Vista implemented NTFS symbolic links, Transactional NTFS, partition shrinking, and self-healing.[23] NTFS symbolic links are a new feature in the file system; all the others are new operating system features that make use of NTFS features already in place.

Scalability

[edit]

NTFS is optimized for 4 KB[a] clusters, but supports a maximum cluster size of 2 MB[a]. (Earlier implementations support up to 64 KB)[5] The maximum NTFS volume size that the specification can support is 264 − 1 clusters, but not all implementations achieve this theoretical maximum, as discussed below.

The maximum NTFS volume size implemented in Windows XP Professional is 232 − 1 clusters, partly due to partition table limitations. For example, using 64 KB clusters, the maximum size Windows XP NTFS volume is 256 TB minus 64 KB. Using the default cluster size of 4 KB, the maximum NTFS volume size is 16 TB minus 4 KB. Both of these are vastly higher than the 128 GB[a] limit in Windows XP SP1. The size of a partition in the Master Boot Record (MBR) is limited to 2 TiB with a hard drive with 512-byte physical sectors,[24][25] although for a 4 KiB physical sector the MBR partition size limit is 16 TiB. An alternative is to use multiple GUID Partition Table (GPT or "dynamic") volumes for be combined to create a single NTFS volume larger than 2 TiB. Booting from a GPT volume to a Windows environment in a Microsoft supported way requires a system with Unified Extensible Firmware Interface (UEFI) and 64-bit[c] support.[26] GPT data disks are supported on systems with BIOS.

The NTFS maximum theoretical limit on the size of individual files is 16 EB[a][27] (16 × 10246 or 264 bytes) minus 1 KB, which totals 18,446,744,073,709,550,592 bytes. With Windows 10 version 1709 and Windows Server 2019, the maximum implemented file size is 8 PB[a] minus 2 MB or 9,007,199,252,643,840 bytes.[5]

Interoperability

[edit]

Windows

[edit]

While the different NTFS versions are for the most part fully forward- and backward-compatible, there are technical considerations for mounting newer NTFS volumes in older versions of Microsoft Windows. This affects dual-booting, and external portable hard drives. For example, attempting to use an NTFS partition with Windows' feature "Previous Versions" (Volume Shadow Copy) on an operating system that does not support it will result in the contents of those previous versions being lost.[28]

A Windows command-line utility called convert.exe can convert supporting file systems to NTFS, including HPFS (only on Windows NT 3.1, 3.5, and 3.51), FAT16 and FAT32 (on Windows 2000 and later). The conversion occurs in-place, meaning the existing files stay where they are and are not re-written during the process. The process is not reversible without formatting and writing the files again.[29][30]

FreeBSD

[edit]

FreeBSD 3.2 released in May 1999 included read-only NTFS support written by Semen Ustimenko.[31][32] This implementation was ported to NetBSD by Christos Zoulas and Jaromir Dolecek and released with NetBSD 1.5 in December 2000.[33] The FreeBSD implementation of NTFS was also ported to OpenBSD by Julien Bordet and offers native read-only NTFS support by default on i386 and amd64 platforms as of version 4.9 released 1 May 2011.[34][32]

Linux

[edit]

Linux kernel versions 2.1.74 and later include a driver written by Martin von Löwis which has the ability to read NTFS partitions;[35] kernel versions 2.5.11 and later contain a new driver written by Anton Altaparmakov (University of Cambridge) and Richard Russon which supports file read.[36][37][35] The ability to write to files was introduced with kernel version 2.6.15 in 2006 which allows users to write to existing files but does not allow the creation of new ones.[38] Paragon's NTFS driver (see below) has been merged into kernel version 5.15, and it supports read/write on normal, compressed and sparse files, as well as journal replaying.[39]

NTFS-3G is a free GPL-licensed FUSE implementation of NTFS that was initially developed as a Linux kernel driver by Szabolcs Szakacsits. It was re-written as a FUSE program to work on other systems that FUSE supports like macOS, FreeBSD, NetBSD, OpenBSD,[40] Solaris, QNX, and Haiku[41] and allows reading and writing to NTFS partitions. A performance enhanced commercial version of NTFS-3G, called "Tuxera NTFS for Mac", is also available from the NTFS-3G developers.[42]

Captive NTFS, a 'wrapping' driver that uses Windows' own driver ntfs.sys, exists for Linux. It was built as a Filesystem in Userspace (FUSE) program and released under the GPL but work on Captive NTFS ceased in 2006.[43]

Linux kernel versions 5.15 onwards carry NTFS3, a fully functional NTFS Read-Write driver which works on NTFS versions up to 3.1 and is maintained primarily by the Paragon Software Group.

macOS

[edit]

Mac OS X 10.3 included Ustimenko's read-only implementation of NTFS from FreeBSD. Then in 2006 Apple hired Anton Altaparmakov to write a new NTFS implementation for Mac OS X 10.6.[44] Native NTFS write support is included in 10.6 and later, but is not activated by default, although workarounds do exist to enable the functionality. However, user reports indicate the functionality is unstable and tends to cause kernel panics.[45]

Paragon Software Group sells a read-write driver named NTFS for Mac,[46] which is also included on some models of Seagate hard drives.[47]

OS/2

[edit]

The NetDrive package for OS/2 (and derivatives such as eComStation and ArcaOS) supports a plugin which allows read and write access to NTFS volumes.[48][49]

DOS

[edit]

There is a free-for-personal-use read/write driver for MS-DOS by Avira called "NTFS4DOS".[50][51]

Ahead Software developed a "NTFSREAD" driver (version 1.200) for DR-DOS 7.0x between 2002 and 2004. It was part of their Nero Burning ROM software.

Security

[edit]

NTFS uses access control lists and user-level encryption to help secure user data.

Access control lists (ACLs)

[edit]
NTFS file system permissions on a modern Windows system

In NTFS, each file or folder is assigned a security descriptor that defines its owner and contains two access control lists (ACLs). The first ACL, called discretionary access control list (DACL), defines exactly what type of interactions (e.g. reading, writing, executing or deleting) are allowed or forbidden by which user or groups of users. For example, files in the C:\Program Files folder may be read and executed by all users but modified only by a user holding administrative privileges.[52] Windows Vista adds mandatory access control info to DACLs. DACLs are the primary focus of User Account Control in Windows Vista and later.

The second ACL, called system access control list (SACL), defines which interactions with the file or folder are to be audited and whether they should be logged when the activity is successful, failed or both. For example, auditing can be enabled on sensitive files of a company, so that its managers get to know when someone tries to delete them or make a copy of them, and whether they succeed.[52]

Encryption

[edit]

Encrypting File System (EFS) provides user-transparent encryption of any file or folder on an NTFS volume.[53] EFS works in conjunction with the EFS service, Microsoft's CryptoAPI and the EFS File System Run-Time Library (FSRTL). EFS works by encrypting a file with a bulk symmetric key (also known as the File Encryption Key, or FEK), which is used because it takes a relatively small amount of time to encrypt and decrypt large amounts of data than if an asymmetric key cipher is used. The symmetric key that is used to encrypt the file is then encrypted with a public key that is associated with the user who encrypted the file, and this encrypted data is stored in an alternate data stream of the encrypted file. To decrypt the file, the file system uses the private key of the user to decrypt the symmetric key that is stored in the data stream. It then uses the symmetric key to decrypt the file. Because this is done at the file system level, it is transparent to the user.[54] Also, in case of a user losing access to their key, support for additional decryption keys has been built into the EFS system, so that a recovery agent can still access the files if needed. NTFS-provided encryption and NTFS-provided compression are mutually exclusive, meaning they can not be used for the same files at the same time; however, NTFS can be used for one and a third-party tool for the other.

The support of EFS is not available in Basic, Home, and MediaCenter versions of Windows, and must be activated after installation of Professional, Ultimate, and Server versions of Windows or by using enterprise deployment tools within Windows domains.

Features

[edit]

Journaling

[edit]

NTFS is a journaling file system and uses the NTFS Log ($LogFile) to record metadata changes to the volume. It is a feature that FAT does not provide and is critical for NTFS to ensure that its complex internal data structures will remain consistent in case of system crashes or data moves performed by the defragmentation API, and allow easy rollback of uncommitted changes to these critical data structures when the volume is remounted. Notably affected structures are the volume allocation bitmap, modifications to MFT records such as moves of some variable-length attributes stored in MFT records and attribute lists, and indices for directories and security descriptors.

The ($LogFile) format has evolved through several versions:

Windows Version $LogFile format version
Windows NT 4.0 1.1
Windows 2000
Windows XP
Windows Vista
Windows 7
Windows 8 2.0
Windows 8.1
Windows 10
Windows 11

The incompatibility of the $LogFile versions implemented by Windows 8, Windows 10, Windows 11 prevents Windows 7 (and earlier versions of Windows) from recognizing version 2.0 of the $LogFile. Backward compatibility is provided by downgrading the $LogFile to version 1.1 when an NTFS volume is cleanly dismounted. It is again upgraded to version 2.0 when mounting on a compatible version of Windows. However, when hibernating to disk in the logoff state (a.k.a. Hybrid Boot or Fast Boot, which is enabled by default), mounted file systems are not dismounted, and thus the $LogFiles of any active file systems are not downgraded to version 1.1. The inability to process version 2.0 of the $LogFile by versions of Windows older than 8.0 results in an unnecessary invocation of the CHKDSK disk repair utility. This is particularly a concern in a multi-boot scenario involving pre- and post-8.0 versions of Windows, or when frequently moving a storage device between older and newer versions. A Windows Registry setting exists to prevent the automatic upgrade of the $LogFile to the newer version. The problem can also be dealt with by disabling Hybrid Boot.[55]

The USN Journal (Update Sequence Number Journal) is a system management feature that records (in $Extend\$UsnJrnl) changes to files, streams and directories on the volume, as well as their various attributes and security settings. The journal is made available for applications to track changes to the volume.[56] This journal can be enabled or disabled on non-system volumes.[57]

[edit]

The hard link feature allows different file names to directly refer to the same file contents. Hard links may link only to files in the same volume, because each volume has its own MFT. Hard links were originally included to support the POSIX subsystem in Windows NT.[58]

Although hard links use the same MFT record (inode) which records file metadata such as file size, modification date, and attributes, NTFS also caches this data in the directory entry as a performance enhancement. This means that when listing the contents of a directory using FindFirstFile/FindNextFile family of APIs, (equivalent to the POSIX opendir/readdir APIs) the software listing the directory will also receive this cached information, in addition to the name and inode. However, software may not see up-to-date information, as this information is only guaranteed to be updated when a file is closed, and then only for the directory from which the file was opened.[59] This means where a file has multiple names via hard links, updating a file via one name does not update the cached data associated with the other name. Software can obtain up-to-date data using GetFileInformationByHandle (which is the equivalent of the POSIX fstat function). This can be done using a handle which has no access to the file itself (passing zero to CreateFile for dwDesiredAccess), and closing this handle has the incidental effect of updating the cached information.

Windows uses hard links to support short (8.3) filenames in NTFS. Operating system support is needed because there are legacy applications that can work only with 8.3 filenames, but support can be disabled. In this case, an additional filename record and directory entry is added, but both 8.3 and long file name are linked and updated together, unlike a regular hard link.

The NTFS file system has a limit of 1023 hard links on a file.[60][clarification needed]

Alternate data stream (ADS)

[edit]

Alternate data streams allow more than one data stream to be associated with a filename (a fork), using the format "filename:streamname" (e.g., "text.txt:extrastream"). These streams are not shown to or made editable by users through any typical GUI application built into Windows by default, disguising their existence from most users. Although intended for helpful metadata, their arcane nature makes them a potential hiding place for malware, spyware, unseen browser history, and other potentially unwanted information.

Alternate streams are not listed in Windows Explorer, and their size is not included in the file's size. When the file is copied or moved to another file system without ADS support the user is warned that alternate data streams cannot be preserved. No such warning is typically provided if the file is attached to an e-mail, or uploaded to a website. Thus, using alternate streams for critical data may cause problems. Microsoft provides a downloadable tool called Streams[61] to view streams on a selected volume. Starting with Windows PowerShell 3.0, it is possible to manage ADS natively with six cmdlets: Add-Content, Clear-Content, Get-Content, Get-Item, Remove-Item, Set-Content.[62]

A small ADS named Zone.Identifier is added by Internet Explorer and by most browsers to mark files downloaded from external sites as possibly unsafe to run; the local shell would then require user confirmation before opening them.[63] When the user indicates that they no longer want this confirmation dialog, this ADS is deleted. This functionality is also known as "Mark of the Web".[64][65] All Chromium (e.g. Google Chrome) and Firefox-based web browsers also write the Zone.Identifier stream to downloaded files.

Malware has used alternate data streams to hide code.[66] Since the late 2000s, some malware scanners and other special tools check for alternate data streams. Due to the risks associated with ADS, particularly involving privacy and the Zone.Identifier stream, there exists software specifically designed to strip streams from files (certain streams with perceived risk or all of them) in a user-friendly way.[67]

NTFS Streams were introduced in Windows NT 3.1, to enable Services for Macintosh (SFM) to store resource forks. Although current versions of Windows Server no longer include SFM, third-party Apple Filing Protocol (AFP) products (such as GroupLogic's ExtremeZ-IP) still use this feature of the file system.

File compression

[edit]

Compression is enabled on a per-folder or per-file basis by setting the 'compressed' attribute. When compression is enabled on a folder, any files moved or saved to that folder will be automatically compressed using LZNT1 algorithm (a variant of LZ77).[68] The compression algorithm is designed to support cluster sizes of up to 4 KB; when the cluster size is greater than 4 KB on an NTFS volume, NTFS compression is not available.[69] Data is compressed in 16-cluster chunks (up to 64 KB in size); if the compression reduces 64 KB of data to 60 KB or less, NTFS treats the unneeded 4 KB pages like empty sparse file clusters—they are not written. This allows for reasonable random-access times as the OS merely has to follow the chain of fragments.

Compression works best with files that have repetitive content, are seldom written, are usually accessed sequentially, and are not themselves compressed. Single-user systems with limited hard disk space can benefit from NTFS compression for small files, from 4 KB to 64 KB or more, depending on compressibility. Files smaller than approximately 900 bytes are stored within the directory entry of the MFT.[3]

For operating systems besides Windows, all versions of the NTFS-3G driver support reading compressed files according to its developers, but support for appending data to compressed files, which means adding new data resulting in increasing the size of a file, was added in November 2009. Overwriting existing compressed data is supported since August 2010.[70]

Advantages

[edit]

Users of fast multi-core processors will find improvements in application speed by compressing their applications and data as well as a reduction in space used. Even when SSD controllers already compress data, there is still a reduction in I/Os since less data is transferred.[71]

According to research by Microsoft's NTFS Development team, 50–60 GB is a reasonable maximum size for a compressed file on an NTFS volume with a 4 KB (default) cluster (block) size. This reasonable maximum size decreases sharply for volumes with smaller cluster sizes.[72]

Disadvantages

[edit]

Large compressible files become highly fragmented since every chunk smaller than 64 KB becomes a fragment.[72][73] Flash memory, such as SSD drives do not have the head movement delays and high access time of mechanical hard disk drives, so fragmentation has only a smaller penalty.

Windows 2000 cannot start if NTLDR is compressed because decompression filters are not yet loaded.[74] Later versions of Windows do not allow important system files to be compressed.

System compression

[edit]

Since Windows 10, Microsoft has introduced new file compression scheme based on the XPRESS algorithm with 4K/8K/16K block size[75] and the LZX algorithm;[76] both are variants of LZ77 updated with Huffman entropy coding and range coding, which LZNT1 lacked. These compression algorithms were taken from Windows Imaging Format (WIM file).

The new compression scheme is used by CompactOS feature, which reduces disk usage by compressing Windows system files.[77] CompactOS is not an extension of NTFS file compression and does not use the 'compressed' attribute; instead, it sets a reparse point on each compressed file with a WOF (Windows Overlay Filter) tag,[78] but the actual data is stored in an alternate data stream named "WofCompressedData", which is decompressed on-the-fly by a WOF filesystem filter driver, and the main file is an empty sparse file.[78] This design is meant purely for read-only access, so any writes to compressed files result in an automatic decompression.[78][79][80]

CompactOS compression is intended for OEMs who prepare OS images with the /compact flag of the DISM tool in Windows ADK,[81] but it can also be manually turned on per file with the /exe flag of the compact command.[82] CompactOS algorithm avoids file fragmentation by writing compressed data in contiguously allocated chunks, unlike core NTFS compression.[citation needed]

CompactOS file compression is an improved version of WIMBoot feature introduced in Windows 8.1. WIMBoot reduces Windows disk usage by keeping system files in a compressed WIM image on a separate hidden disk partition.[83] Similarly to CompactOS, Windows system directories only contain sparse files marked by a reparse point with a WOF tag, and Windows Overlay Filter driver decompresses file contents on-the-fly from the WIM image. WIMBoot is less effective than CompactOS though, as new updated versions of system files need to be written to the system partition, consuming disk space.[78]

Sparse files

[edit]
A sparse file: Empty bytes don't need to be saved, thus they can be represented by metadata.
One petabyte (1,125,899,906,842,624 bytes) of sparse files, 0 bytes on disk.

Sparse files are files interspersed with empty segments for which no actual storage space is used. To the applications, the file looks like an ordinary file with empty regions seen as regions filled with zeros; the file system maintains an internal list of such regions for each sparse file.[84] A sparse file does not necessarily include sparse zeros areas; the "sparse file" attribute just means that the file is allowed to have them.

Database applications, for instance, may use sparse files.[85] As with compressed files, the actual sizes of sparse files are not taken into account when determining quota limits.[86]

Volume Shadow Copy

[edit]

The Volume Shadow Copy Service (VSS) keeps historical versions of files and folders on NTFS volumes by copying old, newly overwritten data to shadow copy via copy-on-write technique. The user may later request an earlier version to be recovered. This also allows data backup programs to archive files currently in use by the file system.

Windows Vista also introduced persistent shadow copies for use with System Restore and Previous Versions features. Persistent shadow copies, however, are deleted when an older operating system mounts that NTFS volume. This happens because the older operating system does not understand the newer format of persistent shadow copies.[28]

Transactions

[edit]

As of Windows Vista, applications can use Transactional NTFS (TxF) to group multiple changes to files together into a single transaction. The transaction will guarantee that either all of the changes happen, or none of them do, and that no application outside the transaction will see the changes until they are committed.[87]

It uses similar techniques as those used for Volume Shadow Copies (i.e. copy-on-write) to ensure that overwritten data can be safely rolled back, and a CLFS log to mark the transactions that have still not been committed, or those that have been committed but still not fully applied (in case of system crash during a commit by one of the participants).

Transactional NTFS does not restrict transactions to just the local NTFS volume, but also includes other transactional data or operations in other locations such as data stored in separate volumes, the local registry, or SQL databases, or the current states of system services or remote services. These transactions are coordinated network-wide with all participants using a specific service, the DTC, to ensure that all participants will receive same commit state, and to transport the changes that have been validated by any participant (so that the others can invalidate their local caches for old data or rollback their ongoing uncommitted changes). Transactional NTFS allows, for example, the creation of network-wide consistent distributed file systems, including with their local live or offline caches.

Microsoft now advises against using TxF: "Microsoft strongly recommends developers utilize alternative means" since "TxF may not be available in future versions of Microsoft Windows".[88]

Quotas

[edit]

Disk quotas were introduced in NTFS v3. They allow the administrator of a computer that runs a version of Windows that supports NTFS to set a threshold of disk space that users may use. It also allows administrators to keep track of how much disk space each user is using. An administrator may specify a certain level of disk space that a user may use before they receive a warning, and then deny access to the user once they hit their upper limit of space. Disk quotas do not take into account NTFS's transparent file-compression, should this be enabled. Applications that query the amount of free space will also see the amount of free space left to the user who has a quota applied to them.

Reparse points

[edit]

Introduced in NTFS v3, NTFS reparse points are used by associating a reparse tag in the user space attribute of a file or directory. Microsoft includes several default tags including symbolic links, directory junction points and volume mount points. When the Object Manager parses a file system name lookup and encounters a reparse attribute, it will reparse the name lookup, passing the user controlled reparse data to every file system filter driver that is loaded into Windows. Each filter driver examines the reparse data to see whether it is associated with that reparse point, and if that filter driver determines a match, then it intercepts the file system request and performs its special functionality.

Date and time

[edit]

NTFS stores date and time attributes as a 64-bit integer[b] that counts the 100-nanosecond intervals from the beginning of the year 1601, following the Windows NT epoch. The year 1601 was chosen to align the beginning of the date range with the gregorian calendar in order to simplify calculations, given that the gregorian calendar operates on a 400-year cycle, and the 1601-2000 cycle was the active cycle at the time Windows NT was conceived.[89]

NTFS records four types of time stamps: A file creation time (interpreted as "birth time" on Linux), a last modification time, a last modification of the MFT record (interpreted as "change time" on Linux) and a last access time. Each of those times has the same granularity of 100 nanoseconds.

[7]

Limitations

[edit]

Resizing

[edit]

Starting with Windows Vista Microsoft added the built-in ability to shrink or expand a partition. However, this ability does not relocate page file fragments or files that have been marked as unmovable, so shrinking a volume will often require relocating or disabling any page file, the index of Windows Search, and any Shadow Copy used by System Restore. Various third-party tools are capable of resizing NTFS partitions.

OneDrive

[edit]

Since 2017, Microsoft requires the OneDrive file structure to reside on an NTFS disk.[90] This is because OneDrive Files On-Demand feature uses NTFS reparse points to link files and folders that are stored in OneDrive to the local filesystem, making the file or folder unusable with any previous version of Windows, with any other NTFS file system driver, or any file system and backup utilities not updated to support it.[91]

Structure

[edit]

NTFS is made up of several components including: a partition boot sector (PBS) that holds boot information; the master file table that stores a record of all files and folders in the filesystem; a series of meta files that help structure meta data more efficiently; data streams and locking mechanisms.

Internally, NTFS uses B-trees to index file system data. A file system journal is used to guarantee the integrity of the file system metadata but not individual files' content. Systems using NTFS are known to have improved reliability compared to FAT file systems.[92]

NTFS allows any sequence of 16-bit values for name encoding (e.g. file names, stream names or index names) except 0x0000. This means UTF-16 code units are supported, but the file system does not check whether a sequence is valid UTF-16 (it allows any sequence of short values, not restricted to those in the Unicode standard). In Win32 namespace, any UTF-16 code units are case insensitive whereas in POSIX namespace they are case sensitive. File names are limited to 255 UTF-16 code units. Certain names are reserved in the volume root directory and cannot be used for files. These are $MFT, $MFTMirr, $LogFile, $Volume, $AttrDef, . (dot), $Bitmap, $Boot, $BadClus, $Secure, $UpCase, and $Extend.[3] . (dot) and $Extend are both directories; the others are files. The NT kernel limits full paths to 32,767 UTF-16 code units. There are some additional restrictions on code points and file names.[93]

Partition Boot Sector (PBS)

[edit]
NTFS boot sector contents[94][95] (All values except strings are stored in little endian order.)
Byte offset Field length Typical value Field name Purpose
0x00 3 bytes 0xEB5290 x86 JMP and NOP instructions Causes execution to continue after the data structures in this boot sector.
0x03 8 bytes "NTFS    "
Word "NTFS" followed by four trailing spaces (0x20)
OEM ID This is the magic number that indicates this is an NTFS file system.
0x0B 2 bytes 0x0200 BPB Bytes per sector The number of bytes in a disk sector.
0x0D 1 byte 0x08 Sectors Per Cluster The number of sectors in a cluster. If the value is greater than 0x80, the amount of sectors is 2 to the power of the absolute value of considering this field to be negative.
0x0E 2 bytes 0x0000 Reserved Sectors, unused
0x10 3 bytes 0x000000 Unused This field is always 0
0x13 2 bytes 0x0000 Unused by NTFS This field is always 0
0x15 1 byte 0xF8 Media Descriptor The type of drive. 0xF8 is used to denote a hard drive (in contrast to the several sizes of floppy).
0x16 2 bytes 0x0000 Unused This field is always 0
0x18 2 bytes 0x003F Sectors Per Track The number of disk sectors in a drive track.
0x1A 2 bytes 0x00FF Number Of Heads The number of heads on the drive.
0x1C 4 bytes 0x0000003F Hidden Sectors The number of sectors preceding the partition.
0x20 4 bytes 0x00000000 Unused Not used by NTFS
0x24 4 bytes 0x00800080 EBPB Unused Not used by NTFS
0x28 8 bytes 0x00000000007FF54A Total sectors The partition size in sectors.
0x30 8 bytes 0x0000000000000004 $MFT cluster number The cluster that contains the Master File Table
0x38 8 bytes 0x000000000007FF54 $MFTMirr cluster number The cluster that contains a backup of the Master File Table
0x40 1 byte 0xF6 Bytes or Clusters Per File Record Segment A positive value denotes the number of clusters in a File Record Segment. A negative value denotes the amount of bytes in a File Record Segment, in which case the size is 2 to the power of the absolute value. (0xF6 = -10 → 210 = 1024).
0x41 3 bytes 0x000000 Unused This field is not used by NTFS
0x44 1 byte 0x01 Bytes or Clusters Per Index Buffer A positive value denotes the number of clusters in an Index Buffer. A negative value denotes the amount of bytes and it uses the same algorithm for negative numbers as the "Bytes or Clusters Per File Record Segment."
0x45 3 bytes 0x000000 Unused This field is not used by NTFS
0x48 8 bytes 0x1C741BC9741BA514 Volume Serial Number A unique random number assigned to this partition, to keep things organized.
0x50 4 bytes 0x00000000 Checksum, unused Supposedly a checksum.
0x54 426 bytes Bootstrap Code The code that loads the rest of the operating system. This is pointed to by the first 3 bytes of this sector.
0x01FE 2 bytes 0xAA55 End-of-sector Marker This flag indicates that this is a valid boot sector.

This boot partition format is roughly based upon the earlier FAT filesystem, but the fields are in different locations. Some of these fields, especially the "sectors per track", "number of heads" and "hidden sectors" fields may contain dummy values on drives where they either do not make sense or are not determinable.

The OS first looks at the 8 bytes at 0x30 to find the cluster number of the $MFT, then multiplies that number by the number of sectors per cluster (1 byte found at 0x0D). This value is the sector offset (LBA) to the $MFT, which is described below.

Master File Table

[edit]

In NTFS, all file, directory and metafile data—file name, creation date, access permissions (by the use of access control lists), and size—are stored as metadata in the Master File Table (MFT). This abstract approach allowed easy addition of file system features during Windows NT's development—an example is the addition of fields for indexing used by the Active Directory and the Windows Search. This also enables fast file search software to locate named local files and folders included in the MFT very quickly, without requiring any other index.

The MFT structure supports algorithms which minimize disk fragmentation.[96] A directory entry consists of a filename and a "file ID" (analogous to the inode number), which is the record number representing the file in the Master File Table. The file ID also contains a reuse count to detect stale references. While this strongly resembles the W_FID of Files-11, other NTFS structures radically differ.

A partial copy of the MFT, called the MFT mirror, is stored to be used in case of corruption.[97] If the first record of the MFT is corrupted, NTFS reads the second record to find the MFT mirror file. Locations for both files are stored in the boot sector.[98]

Metafiles

[edit]

NTFS contains several files that define and organize the file system. In all respects, most of these files are structured like any other user file ($Volume being the most peculiar), but are not of direct interest to file system clients.[99] These metafiles define files, back up critical file system data, buffer file system changes, manage free space allocation, satisfy BIOS expectations, track bad allocation units, and store security and disk space usage information. All content is in an unnamed data stream, unless otherwise indicated.

MFT (entries 0–26 are the NTFS metafiles)
Segment number File name Purpose
0 $MFT Describes all files on the volume, including file names, timestamps, stream names, and lists of cluster numbers where data streams reside, indexes, security identifiers, and file attributes like "read only", "compressed", "encrypted", etc.
1 $MFTMirr Duplicate of the first vital entries of $MFT, usually 4 entries (4 kilobytes).
2 $LogFile Contains transaction log of file system metadata changes.
3 $Volume Contains information about the volume, namely the volume object identifier, volume label, file system version, and volume flags (mounted, chkdsk requested, requested $LogFile resize, mounted on NT 4, volume serial number updating, structure upgrade request). This data is not stored in a data stream, but in special MFT attributes: If present, a volume object ID is stored in an $OBJECT_ID record; the volume label is stored in a $VOLUME_NAME record, and the remaining volume data is in a $VOLUME_INFORMATION record. Note: volume serial number is stored in file $Boot (below).
4 $AttrDef A table of MFT attributes that associates numeric identifiers with names.
5 . Root directory. Directory data is stored in $INDEX_ROOT and $INDEX_ALLOCATION attributes both named $I30.
6 $Bitmap An array of bit entries: each bit indicates whether its corresponding cluster is used (allocated) or free (available for allocation).
7 $Boot Volume boot record (VBR). This file is always located at the first clusters on the volume. It contains bootstrap code (see NTLDR/BOOTMGR) and a BIOS parameter block including a volume serial number and cluster numbers of $MFT and $MFTMirr.
8 $BadClus A file that contains all the clusters marked as having bad sectors. This file simplifies cluster management by the chkdsk utility, both as a place to put newly discovered bad sectors, and for identifying unreferenced clusters. This file contains two data streams, even on volumes with no bad sectors: an unnamed stream contains bad sectors—it is zero length for perfect volumes; the second stream is named $Bad and contains all clusters on the volume not in the first stream.
9 $Secure Access control list database that reduces overhead having many identical ACLs stored with each file, by uniquely storing these ACLs only in this database (contains two indices: $SII (Standard_Information ID) and $SDH (Security Descriptor Hash), which index the stream named $SDS containing actual ACL table).[19]
10 $UpCase A table of unicode uppercase characters for ensuring case-insensitivity in Win32 and DOS namespaces.
11 $Extend A file system directory containing various optional extensions, such as $Quota, $ObjId, $Reparse or $UsnJrnl.
12–23 Reserved for $MFT extension entries. Extension entries are additional MFT records that contain additional attributes that do not fit in the primary record. This could occur if the file is sufficiently fragmented, has many streams, long filenames, complex security, or other rare situations.
24 $Extend\$Quota Holds disk quota information. Contains two index roots, named $O and $Q.
25 $Extend\$ObjId Holds link tracking information. Contains an index root and allocation named $O.
26 $Extend\$Reparse Holds reparse point data (such as symbolic links). Contains an index root and allocation named $R.
27– Beginning of regular file entries.

These metafiles are treated specially by Windows, handled directly by the NTFS.SYS driver and are difficult to directly view: special purpose-built tools are needed.[d] As of Windows 7, the NTFS driver completely prohibits user access, resulting in a BSoD whenever an attempt to execute a metadata file is made. One such tool is the nfi.exe ("NTFS File Sector Information Utility") that is freely distributed as part of the Microsoft "OEM Support Tools". For example, to obtain information on the "$MFT"-Master File Table Segment the following command is used: nfi.exe c:\$MFT[100] Another way to bypass the restriction is to use 7-Zip's file manager and go to the low-level NTFS path \\.\X:\ (where X:\ resembles any drive/partition). Here, 3 new folders will appear: $EXTEND, [DELETED] (a pseudo-folder that 7-Zip uses to attach files deleted from the file system to view), and [SYSTEM] (another pseudo-folder that contains all the NTFS metadata files). This trick can be used from removable devices (USB flash drives, external hard drives, SD cards, etc.) inside Windows, but doing this on the active partition requires offline access (namely WinRE).

Attribute lists, attributes, and streams

[edit]

For each file (or directory) described in the MFT record, there is a linear repository of stream descriptors (also named attributes), packed together in one or more MFT records (containing the so-called attributes list), with extra padding to fill the fixed 1 KB size of every MFT record, and that fully describes the effective streams associated with that file.

Each attribute has an attribute type (a fixed-size integer mapping to an attribute definition in file $AttrDef), an optional attribute name (for example, used as the name for an alternate data stream), and a value, represented in a sequence of bytes. For NTFS, the standard data of files, the alternate data streams, or the index data for directories are stored as attributes.

According to $AttrDef, some attributes can be either resident or non-resident. The $DATA attribute, which contains file data, is such an example. When the attribute is resident (which is represented by a flag), its value is stored directly in the MFT record. Otherwise, clusters are allocated for the data, and the cluster location information is stored as data runs in the attribute.

  • For each file in the MFT, the attributes identified by attribute type, attribute name must be unique. Additionally, NTFS has some ordering constraints for these attributes.
  • There is a predefined null attribute type, used to indicate the end of the list of attributes in one MFT record. It must be present as the last attribute in the record (all other storage space available after it will be ignored and just consists of padding bytes to match the record size in the MFT).
  • Some attribute types are required and must be present in each MFT record, except unused records that are just indicated by null attribute types.
    • This is the case for the $STANDARD_INFORMATION attribute that is stored as a fixed-size record and contains the timestamps and other basic single-bit attributes (compatible with those managed by FAT in DOS or Windows 9x).
  • Some attribute types cannot have a name and must remain anonymous.
    • This is the case for the standard attributes, or for the preferred NTFS "filename" attribute type, or the "short filename" attribute type, when it is also present (for compatibility with DOS-like applications, see below). It is also possible for a file to contain only a short filename, in which case it will be the preferred one, as listed in the Windows Explorer.
    • The filename attributes stored in the attribute list do not make the file immediately accessible through the hierarchical file system. In fact, all the filenames must be indexed separately in at least one other directory on the same volume. There it must have its own MFT record and its own security descriptors and attributes that reference the MFT record number for this file. This allows the same file or directory to be "hardlinked" several times from several containers on the same volume, possibly with distinct filenames.
  • The default data stream of a regular file is a stream of type $DATA but with an anonymous name, and the ADSs are similar but must be named.
  • On the other hand, the default data stream of directories has a distinct type, but are not anonymous: they have an attribute name ("$I30" in NTFS 3+) that reflects its indexing format.

All attributes of a given file may be displayed by using the nfi.exe ("NTFS File Sector Information Utility") that is freely distributed as part of the Microsoft "OEM Support Tools".[100]

Windows system calls may handle alternate data streams.[3] Depending on the operating system, utility and remote file system, a file transfer might silently strip data streams.[3] A safe way of copying or moving files is to use the BackupRead and BackupWrite system calls, which allow programs to enumerate streams, to verify whether each stream should be written to the destination volume and to knowingly skip unwanted streams.[3]

Resident vs. non-resident attributes

[edit]

To optimize the storage and reduce the I/O overhead for the very common case of attributes with very small associated value, NTFS prefers to place the value within the attribute itself (if the size of the attribute does not then exceed the maximum size of an MFT record), instead of using the MFT record space to list clusters containing the data; in that case, the attribute will not store the data directly but will just store an allocation map (in the form of data runs) pointing to the actual data stored elsewhere on the volume.[101] When the value can be accessed directly from within the attribute, it is called "resident data" (by computer forensics workers). The amount of data that fits is highly dependent on the file's characteristics, but 700 to 800 bytes is common in single-stream files with non-lengthy filenames and no ACLs.

  • Some attributes (such as the preferred filename, the basic file attributes) cannot be made non-resident. For non-resident attributes, their allocation map must fit within MFT records.
  • Encrypted-by-NTFS, sparse data streams, or compressed data streams cannot be made resident.
  • The format of the allocation map for non-resident attributes depends on its capability of supporting sparse data storage. In the current implementation of NTFS, once a non-resident data stream has been marked and converted as sparse, it cannot be changed back to non-sparse data, so it cannot become resident again, unless this data is fully truncated, discarding the sparse allocation map completely.
  • When a non-resident attribute is so fragmented that its effective allocation map cannot fit entirely within one MFT record, NTFS stores the attribute in multiple records. The first one among them is called the base record, while the others are called extension records. NTFS creates a special attribute $ATTRIBUTE_LIST to store information mapping different parts of the long attribute to the MFT records, which means the allocation map may be split into multiple records. The $ATTRIBUTE_LIST itself can also be non-resident, but its own allocation map must fit within one MFT record.
  • When there are too many attributes for a file (including ADS's, extended attributes, or security descriptors), so that they cannot fit all within the MFT record, extension records may also be used to store the other attributes, using the same format as the one used in the base MFT record, but without the space constraints of one MFT record.

The allocation map is stored in a form of data runs with compressed encoding. Each data run represents a contiguous group of clusters that store the attribute value. For files on a multi-GB volume, each entry can be encoded as 5 to 7 bytes, which means a KB MFT record can store about 100 such data runs. However, as the $ATTRIBUTE_LIST also has a size limit, it is dangerous to have more than 1 million fragments of a single file on an NTFS volume, which also implies that it is in general not a good idea to use NTFS compression on a file larger than 10 GB.[102]

The NTFS file system driver will sometimes attempt to relocate the data of some of the attributes that can be made non-resident into the clusters, and will also attempt to relocate the data stored in clusters back to the attribute inside the MFT record, based on priority and preferred ordering rules, and size constraints.

Since resident files do not directly occupy clusters ("allocation units"), it is possible for an NTFS volume to contain more files on a volume than there are clusters. For example, a 74.5 GB partition NTFS formats with 19,543,064 clusters of 4 KB. Subtracting system files (a 64 MB log file, a 2,442,888-byte Bitmap file, and about 25 clusters of fixed overhead) leaves 19,526,158 clusters free for files and indices. Since there are four MFT records per cluster, this volume theoretically could hold almost 4 × 19,526,158 = 78,104,632 resident files.

Opportunistic locks

[edit]

Opportunistic file locks (oplocks) allow clients to alter their buffering strategy for a given file or stream in order to increase performance and reduce network use.[103] Oplocks apply to the given open stream of a file and do not affect oplocks on a different stream.

Oplocks can be used to transparently access files in the background. A network client may avoid writing information into a file on a remote server if no other process is accessing the data, or it may buffer read-ahead data if no other process is writing data.

Windows supports four different types of oplocks:

  • Level 2 (or shared) oplock: multiple readers, no writers (i.e. read caching).
  • Level 1 (or exclusive) oplock: exclusive access with arbitrary buffering (i.e. read and write caching).
  • Batch oplock (also exclusive): a stream is opened on the server, but closed on the client machine (i.e. read, write and handle caching).
  • Filter oplock (also exclusive): applications and file system filters can "back out" when others try to access the same stream (i.e. read and write caching) (since Windows 2000)

Opportunistic locks have been enhanced in Windows 7 and Windows Server 2008 R2 with per-client oplock keys.[104]

Time

[edit]

Windows NT and its descendants keep internal timestamps as UTC and make the appropriate conversions for display purposes; all NTFS timestamps are in UTC.[citation needed]

For historical reasons, the versions of Windows that do not support NTFS all keep time internally as local zone time, and therefore so does the FAT file system. This means that when files are copied or moved between NTFS and FAT partitions, the OS needs to convert timestamps on the fly. But if some files are moved when daylight saving time (DST) is in effect, and other files are moved when standard time is in effect, there can be some ambiguities in the conversions. As a result, especially shortly after one of the days on which local zone time changes, users may observe that some files have timestamps that are incorrect by one hour. Due to the differences in implementation of DST in different jurisdictions, this can result in a potential timestamp error of up to 4 hours in any given 12 months.[105]

This problem is further exacerbated for any computers for which local time zone changes sometimes (e.g. due to moving the computer from one time zone to another, as often happens with laptops and other portable devices).

See also

[edit]

Notes

[edit]

References

[edit]

Further reading

[edit]
[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
NTFS, or New Technology File System, is a proprietary journaling file system developed by Microsoft for storing and retrieving files on hard disk drives and other storage media in Windows operating systems. Introduced on July 27, 1993, with the release of Windows NT 3.1, it succeeded the File Allocation Table (FAT) and High Performance File System (HPFS) by offering improved reliability, security, and support for larger storage capacities. As the default file system for modern Windows versions, including Windows 10, Windows 11, and Windows Server editions, NTFS provides a range of advanced features that enhance data management and system integrity. It employs transaction-based logging to ensure recoverability from power failures or crashes, allowing the system to roll back incomplete operations during recovery. Key capabilities include support for volumes up to 8 petabytes (PB) in Windows Server 2019 and later, file sizes up to 16 exabytes (EB), and extended path lengths of up to 32,767 characters, far exceeding the limitations of FAT32. Additionally, NTFS enables file and folder compression to optimize storage, disk quotas to manage user space allocation, and sparse file support for efficient handling of files with large empty sections. Security is a cornerstone of NTFS, integrating granular access controls through Access Control Lists (ACLs) that define permissions for users and groups at the file and directory levels, aligning with Windows' discretionary access control model. It also supports encryption via the Encrypting File System (EFS) for protecting sensitive data and compatibility with BitLocker for full-volume hardware-based encryption. Compared to predecessors like FAT, which lack native security and journaling, NTFS offers superior fault tolerance through self-healing mechanisms that automatically detect and repair corruption without manual intervention, such as during CHKDSK operations. These attributes make NTFS essential for enterprise environments, supporting features like Cluster Shared Volumes (CSV) for high-availability clustering in Windows Server.

History

Origins and Development

NTFS was conceived in the early 1990s as part of Microsoft's development of the Windows NT operating system kernel, aimed at overcoming the limitations of the FAT file system, particularly its 2 GB partition size restriction, while providing enhanced support for larger storage volumes, security features, and data reliability. The design sought to create a robust file system suitable for enterprise environments, incorporating journaling for fault tolerance to minimize data loss during system crashes and enabling long filenames up to 255 characters encoded in UTF-16 for improved usability over FAT's 8.3 naming convention. Key designers of the initial NTFS implementation included Tom Miller and Gary Kimura, who led the effort at Microsoft to architect a system capable of theoretically supporting volumes up to 16 exabytes, far exceeding contemporary needs and future-proofing for growing storage demands. Their work drew influences from established systems, including the High-Performance File System (HPFS) for hybrid file/directory organization, the FAT file system for compatibility with legacy structures, and POSIX standards to ensure portability and compliance with Unix-like interfaces. Additionally, the broader Windows NT project, led by former Digital Equipment Corporation engineers, incorporated concepts from the VMS operating system's file management for overall reliability and modularity, indirectly shaping NTFS's emphasis on integrity. NTFS made its initial public release alongside Windows NT 3.1 in July 1993, marking a significant departure from DOS-based file systems by prioritizing security through access control lists and fault tolerance via transaction logging, which allowed recovery from incomplete operations without full disk scans. Early adoption was limited to professional and server environments due to NT's focus on stability over consumer compatibility. One notable challenge in NTFS's early development was its proprietary nature, designed to deter reverse-engineering by competitors and protect Microsoft's intellectual property, resulting in closed documentation that restricted third-party development until partial specifications were released in 1999 to support driver creation for Windows 2000. This approach balanced innovation with control but initially hindered broader ecosystem growth. Later versions built upon this foundation with incremental enhancements.

Version History

NTFS has evolved through several versions since its initial release, with each iteration introducing enhancements to reliability, performance, and feature support, primarily aligned with major Windows operating system releases. These versions are identified by minor version numbers in the NTFS boot sector, reflecting incremental improvements in metadata handling, security, and storage efficiency. While early versions laid the foundation for advanced file system capabilities, later updates focused on integration with emerging Windows technologies, maintaining backward compatibility to ensure seamless operation across systems. The inaugural version, NTFS 1.0, debuted with Windows NT 3.1 on July 27, 1993, establishing the core architecture with transaction-based logging for recovery from incomplete operations, and utilizing fixed-size Master File Table (MFT) records of 1024 bytes to track file metadata. This version prioritized security through access control lists and support for long filenames, but lacked advanced features like compression or quotas, limiting its scope to enterprise environments seeking a robust alternative to FAT and HPFS. NTFS 1.1 arrived with Windows NT 3.5 in September 1994, incorporating POSIX-compliant permissions for broader interoperability and expanding cluster sizes up to 4 KB to better accommodate larger storage devices, while introducing initial support for file compression to reduce disk usage without significant performance overhead. These changes addressed limitations in the original design, enabling more efficient handling of diverse workloads in networked server scenarios. In 1996, NTFS 1.2 was released alongside Windows NT 4.0, adding update sequence numbers to critical structures like the boot sector and MFT records for enhanced metadata integrity and protection against partial writes or power failures, marking an early step toward improved recoverability. This version refined disk space allocation algorithms and logging primitives, setting the stage for full journaling in subsequent releases. A significant leap occurred with NTFS 3.0 in Windows 2000, launched on February 17, 2000, which introduced comprehensive USN journaling for tracking file changes and enabling efficient recovery, alongside disk quotas for user storage limits, Encrypting File System (EFS) for transparent data protection, sparse files to optimize storage for partially filled data sets, and reparse points for symbolic links and junction points. Importantly, NTFS 3.0 maintained full backward compatibility with volumes formatted under versions 1.1 and 1.2, allowing seamless upgrades without data migration. NTFS 3.1 followed in Windows Vista in 2006, enabling dynamic volume resizing to allow non-destructive expansion or shrinking of partitions and better support for larger disks. Subsequent minor updates in Windows 7, 8, and 10 emphasized performance optimizations, such as improved caching and defragmentation algorithms, without altering the core version number. Since 2010, NTFS has seen no major version increments, with enhancements in Windows 10 and 11 focusing on integration with features like Storage Spaces for pooled storage management introduced in 2012, alongside ongoing refinements for reliability and compatibility. By 2025, Windows Server 2025 continues to designate NTFS as the default file system for general-purpose volumes, coexisting with ReFS for high-resiliency scenarios, underscoring its enduring role in modern Windows ecosystems.

Architecture

On-Disk Structure

The on-disk structure of an NTFS volume begins with the Partition Boot Sector (PBS), located at logical sector 0 of the partition. This sector, which spans up to 16 sectors, contains critical metadata including the OEM identifier "NTFS " at bytes 3-10, the total number of sectors in the volume (bytes 40-47), the logical cluster number (LCN) of the Master File Table (MFT) starting at byte 48, and a 64-bit volume serial number at bytes 104-111. A backup copy of the PBS is stored at the end of the volume, typically at LCN (total clusters - 1), to facilitate recovery if the primary becomes corrupted. Following the PBS, the volume layout proceeds with the MFT mirror (a duplicate of the first four MFT records for redundancy), the primary MFT (starting at the LCN specified in the PBS), other essential metafiles such as LogFile,LogFile, Volume, AttrDef,AttrDef, Root, Bitmap,andBitmap, and Boot, and finally the space for user files and directories. This organization ensures that core metadata precedes user data, aiding efficient access and recovery. NTFS allocates disk space in fixed-size units called clusters, with a default size of 4 KB on volumes up to 16 TB, increasing to 8 KB for 16-32 TB and further for larger volumes based on size recommendations, though larger sizes up to 2 MB (2048 KB) are possible for bigger volumes to optimize performance and support larger capacities. The MFT plays a central role in mapping this layout to files and directories. Cluster allocation is managed via the $Bitmap metafile (MFT record 6), which serves as a bitmask array where each bit corresponds to one cluster on the volume: a 0 indicates a free cluster available for allocation, while a 1 denotes an allocated cluster. This simple bitmask tracks overall space usage without storing details on fragmentation or specific file extents. NTFS supports a theoretical maximum of 264 - 1 clusters per volume. The theoretical maximum volume size is 16 exabytes (264 bytes), achieved with optimal cluster and addressing configurations, limited primarily by hardware and OS implementations; while practical limits in modern Windows versions (Windows 10 version 1709 and later, Windows Server 2019 and later) support volumes up to 8 PB, depending on the cluster size, earlier versions were capped at 256 TB. All multi-byte numeric values in the on-disk structure, such as cluster counts and offsets, are stored in little-endian byte order. For integrity, NTFS incorporates self-healing mechanisms during volume mount, where the driver validates the primary PBS and, if it detects corruption (e.g., invalid checksum or inconsistencies), automatically falls back to the backup PBS at the volume's end to restore accessibility without user intervention.

Master File Table

The Master File Table (MFT) functions as the core directory and metadata database for NTFS volumes, cataloging every file and directory through dedicated records that store essential attributes and pointers to data locations. Organized as a special file named MFT,itconsistsofanarrayoffixedsizerecords,eachtypically1KBinlength,whereatleastonerecordisassignedtoeachfileordirectoryonthevolume,includingtheMFTitself.Thefirst16entriesarereservedexclusivelyforNTFSsystemmetafiles,withtheMFT, it consists of an array of fixed-size records, each typically 1 KB in length, where at least one record is assigned to each file or directory on the volume, including the MFT itself. The first 16 entries are reserved exclusively for NTFS system metafiles, with the MFT occupying entry 0. To minimize fragmentation and ensure efficient access, NTFS positions the MFT in a reserved zone at the volume's center and allows it to expand into relocatable regions across the disk as needed, dynamically adjusting reserved space based on usage patterns. For fault tolerance, the $MFTMirr metafile duplicates the first four MFT records, enabling recovery if the primary copies are corrupted. Each MFT record commences with a header that includes a 64-bit file reference, comprising a 48-bit segment number and a 16-bit sequence number to uniquely identify the entry and detect reuse across multiple records for the same file. The header further contains an update sequence array—a typically 2-byte structure for verifying the integrity of partial sector reads—an array of flags denoting record status (such as in-use or directory type), and the sequence number to handle files spanning multiple MFT entries. As the volume populates with files, the MFT expands by appending new extents to its data stream, with growth managed through the reserved MFT zone to avoid excessive fragmentation. While theoretically bounded by volume capacity, the MFT practically supports up to 2^32 entries due to addressing constraints. The update sequence number array, enabling partial read verification, was introduced in NTFS version 1.2. Attributes like file names and data streams reside within these records for small files or reference external clusters for larger ones.

Attributes and Streams

In NTFS, files and directories are composed of attributes, which are discrete units of data that encapsulate all metadata and content associated with the object. Each attribute includes a header specifying its type, size, and storage method, followed by the attribute value itself. Attributes enable flexible organization, allowing a single file record in the Master File Table (MFT) to hold multiple such units, each potentially representing different streams of information. This design supports rich file semantics beyond traditional systems. NTFS defines a set of standard attribute types identified by 32-bit numeric IDs, with common examples including STANDARDINFORMATION(0x10),whichstorestimestamps(creation,modification,access),fileattributes,andquotacharges;STANDARD_INFORMATION (0x10), which stores timestamps (creation, modification, access), file attributes, and quota charges; FILE_NAME (0x30), which holds the file or directory name in Unicode along with parent references and timestamps; DATA(0x80),theprimaryattributeforunstructuredfilecontent;andDATA (0x80), the primary attribute for unstructured file content; and INDEX_ROOT (0x90), used to root B+-tree indexes for directories and other indexed structures. Additional types like BITMAP(0xB0)manageallocationbitmaps,butthesystemreservesIDsfrom0x00to0xFFforstandarduse,withhighervaluesforcustomorextendedattributes.Thesetypesensurecomprehensivefiledescription,withBITMAP (0xB0) manage allocation bitmaps, but the system reserves IDs from 0x00 to 0xFF for standard use, with higher values for custom or extended attributes. These types ensure comprehensive file description, with DATA being mandatory for regular files. The timestamps stored in STANDARDINFORMATIONandSTANDARD_INFORMATION and FILE_NAME include the LastWriteTime (modification time). For files, LastWriteTime is updated when the file's content is modified (written to). For directories, LastWriteTime is updated when the directory's contents change — for example, when a file or subdirectory is created, deleted, renamed, or moved into or out of the directory. Modifying the content of a file inside the directory does not update the directory's LastWriteTime. This difference means directory timestamps cannot be relied upon to detect changes to files within them. Attributes are classified as resident or non-resident based on size relative to available space in the MFT record, typically 1 KB. Resident attributes, usually under 512 bytes, are stored inline within the MFT record's fix-up region, including their full header and value for quick access without additional disk seeks; examples include small FILENAMEorFILE_NAME or STANDARD_INFORMATION entries. Non-resident attributes exceed this threshold and have their content allocated in the volume's user data clusters, with the MFT record holding only the attribute header, including starting virtual cluster number (VCN), allocated size, and a reference to the data runs; this applies to large $DATA attributes or extended indexes. The threshold ensures efficient small-file handling while scaling for larger ones. For non-resident attributes, data location is specified via a runslist in the attribute header, a sequence of run descriptors mapping virtual cluster numbers (VCNs) to logical cluster numbers (LCNs) on disk. Each run represents a contiguous extent, described by its length in clusters and starting LCN; the list supports fragmentation by chaining multiple runs. To optimize space, runs use variable-length encoding: the first byte of each run indicates the size (0-8 bytes) of the length and offset fields via its low and high nibbles, respectively, allowing compact representation for small values while supporting 64-bit volumes. Sparse runs are encoded with a zero-length offset to denote unallocated "holes" in the file, facilitating sparse file storage without wasting clusters for empty regions. This format balances efficiency and flexibility for large or fragmented files. A key feature of attributes is support for multiple streams per file, where each instance of the $DATA attribute type constitutes a separate stream. The default unnamed stream (accessed as the file itself) holds primary content, while named streams allow additional data attachment, such as metadata or auxiliary information; for example, the :Zone.Identifier stream stores security zone details for downloaded files. The reported file size reflects the unnamed stream's valid data length, but the total allocated size encompasses all streams' allocations, enabling hidden or application-specific data without altering the main file view. This mechanism underpins alternate data streams, though detailed usage is covered elsewhere. When a file accumulates more than about 15 attributes or exceeds the MFT record's capacity, an ATTRIBUTELIST(type0x20)attributeiscreated,typicallyresident,tocatalogallattributes.Thislistcomprisesvariablelengthentries,eachspecifyinganattributestypeID,instancenumber(formultipleslikeATTRIBUTE_LIST (type 0x20) attribute is created, typically resident, to catalog all attributes. This list comprises variable-length entries, each specifying an attribute's type ID, instance number (for multiples like DATA), MFT record number, and offset within that record, linking to external MFT entries that hold overflow attributes. The base MFT record references this list, ensuring complete file reconstruction by traversing linked records; without it, large files with many streams or metadata would fragment excessively. This extension maintains NTFS's scalability for complex files.

Metafiles and Indexing

NTFS employs a set of special system files known as metafiles to manage critical volume metadata, ensuring the integrity and efficient operation of the file system. These metafiles are stored as entries within the Master File Table (MFT) and contain information essential for volume maintenance, allocation, and security. Key metafiles include LogFile,whichservesasatransactionalloggingfiletorecordfilesystemoperationsandmaintainconsistencyduringrecovery.[](https://learn.microsoft.com/enus/openspecs/windowsprotocols/msfscc/b04c3bd079dc4e58b8ed74f19fc2ea0a)TheLogFile, which serves as a transactional logging file to record file system operations and maintain consistency during recovery.[](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/b04c3bd0-79dc-4e58-b8ed-74f19fc2ea0a) The Volume metafile stores the volume's serial number, creation time, and a dirty flag indicating whether the volume requires checking. AttrDefdefinestheattributesavailableinthefilesystem,providingareferenceforattributetypesandnames.[](https://learn.microsoft.com/enus/openspecs/windowsprotocols/msfscc/b04c3bd079dc4e58b8ed74f19fc2ea0a)TheAttrDef defines the attributes available in the file system, providing a reference for attribute types and names.[](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/b04c3bd0-79dc-4e58-b8ed-74f19fc2ea0a) The Bitmap metafile maps all clusters on the volume, marking them as allocated or free to facilitate space management. Bootholdsthebootsectorcodenecessaryforvolumeinitialization.[](https://learn.microsoft.com/enus/openspecs/windowsprotocols/msfscc/b04c3bd079dc4e58b8ed74f19fc2ea0a)Boot holds the boot sector code necessary for volume initialization.[](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/b04c3bd0-79dc-4e58-b8ed-74f19fc2ea0a) BadClus lists clusters identified as defective, allowing the file system to avoid them during allocation. Finally, Securemanagessecuritydescriptorsforthevolume,includingtheSecure manages security descriptors for the volume, including the SII (Security ID Index) for indexing security identifiers and $SDH (Security Descriptor Header) for descriptor storage. To support efficient data retrieval, NTFS uses indexing mechanisms based on B+-tree structures for directories and other indexes. The $INDEX_ALLOCATION attribute stores the nodes of these B+-trees, enabling balanced, logarithmic-time lookups for file names and other indexed data. Directory entries are organized in these trees, with sorting performed using collating sequences derived from Unicode code points to ensure consistent, locale-independent ordering of filenames. Additional metafiles under the Extenddirectoryprovideoutofbandstorageforspecializeddata.TheExtend directory provide out-of-band storage for specialized data. The Reparse metafile holds reparse point information, such as targets for symbolic links, allowing the file system to redirect operations without embedding the data inline. Similarly, the $Quota metafile stores quota-related metadata in a structured format to track usage limits. The self-describing nature of NTFS arises from the fact that all metafiles, including those listed above, have dedicated entries in the MFT, forming a comprehensive database of the file system's own structure. This design enables boot-time validation tools, such as CHKDSK, to verify and repair the volume by cross-referencing MFT entries against metafile contents without external dependencies. Through updates to Windows 11 as of 2025, the core metafiles and indexing structures in NTFS have seen no major structural changes.

Core Features

Journaling

NTFS employs journaling to enhance fault tolerance and ensure metadata consistency following system failures, such as power outages or crashes. The primary mechanism is the LogFile,asystemfilethatservesasacircularbufferfortransactionlogging,recordingoperationsthatmodifycriticalfilesystemstructuresliketheMasterFileTable(MFT)anddirectories.TheLogFile, a system file that serves as a circular buffer for transaction logging, recording operations that modify critical file system structures like the Master File Table (MFT) and directories. The LogFile operates as a 64 MB buffer by default. This log captures metadata changes before they are committed to the disk, allowing the file system to maintain recoverability without journaling user data itself. Upon volume mount after a failure, NTFS initiates a restart process by replaying the $LogFile entries. This involves rolling forward completed transactions and undoing any in-progress ones to restore the file system to a consistent state, a process that typically completes quickly without user intervention. This mechanism makes significant file system corruption from sudden power loss or forced shutdowns rare in everyday use, especially compared to non-journaling file systems like FAT32. If inconsistencies persist, tools like chkdsk can further analyze and repair the volume using the journal data. Unlike full journaling systems that protect both metadata and user data, NTFS performs metadata-only journaling, safeguarding structures such as MFT entries and directory updates but offering no protection for file contents during interruptions. This approach contrasts with file systems like ReFS, which incorporate additional data integrity features beyond metadata logging. A secondary journaling feature is the Update Sequence Number (USN) Journal, which provides persistent change tracking for files and directories on the volume. Enabled via the fsutil command (e.g., fsutil usn createjournal), the USN Journal logs events like file creations, deletions, modifications, and renames, assigning each a unique sequence number for chronological ordering. It is particularly useful for applications requiring audit trails or incremental backups, as it records only the fact and reason of changes without storing full file contents. Journaling in NTFS introduces performance overhead, primarily on write operations due to the additional logging steps, estimated at around 5-10% in typical workloads. The journal size for $LogFile can be adjusted using chkdsk /L:size if necessary. The USN Journal size can also be adjusted using fsutil, with no strict maximum but practical limits based on volume activity. Despite these benefits, NTFS journaling does not guarantee against data loss; for instance, a power failure during a file write may result in partial or lost user data, even if metadata remains intact.

File Compression and Sparse Files

NTFS supports built-in file compression to reduce storage usage on volumes formatted with the file system. The compression is applied using the LZNT1 algorithm, a variant of the LZ77 compression method that incorporates run-length encoding for repeated sequences and Huffman coding for symbol encoding. This algorithm operates at the cluster level, dividing files into compression units—typically 16 clusters in size, equating to 64 KB on volumes with a 4 KB cluster size—and compressing each unit independently if it reduces the data size below the unit threshold. Compressed data is stored within the file's $DATA attribute, with the attribute's compression flag indicating the state and ensuring validity during access. Applications interact with compression transparently through APIs such as DeviceIoControl with FSCTL_SET_COMPRESSION to enable or disable it on files or directories, without needing to modify file-handling code. In addition to standard compression, NTFS handles sparse files to optimize storage for data with large ranges of zeros, such as database files or virtual disk images. Sparse files mark these zero-filled regions as non-allocated in the file's runlist within the $DATA attribute, avoiding physical disk allocation and thus saving space while maintaining the logical file size. Applications declare a file as sparse using the FSCTL_SET_SPARSE control code via DeviceIoControl, after which zero-data ranges can be set with FSCTL_SET_ZERO_DATA, prompting NTFS to deallocate the corresponding clusters if they fall within sparse areas. This mechanism is transparent to most applications, as reads from sparse regions return zeros without disk I/O, though writing to these areas allocates clusters on demand. The primary advantage of NTFS compression and sparse file support is reduced disk space consumption, particularly for compressible data like text files, where ratios up to 2:1 are achievable due to repetitive patterns. Sparse files further enhance efficiency by eliminating allocation for unused portions, beneficial for files with predictable zero patterns. However, compression introduces CPU overhead during write operations for encoding and read operations for decoding, potentially impacting performance on I/O-intensive workloads. It is less effective for already-compressed data like binaries or media, where minimal size reduction occurs alongside the processing cost. Hard links in NTFS allow multiple directory entries to reference the same file data on disk, enabling a single file to have multiple names within the file system. Unlike copies, hard links do not duplicate the file's content; instead, they share the same Master File Table (MFT) entry, where the file's metadata and data streams are stored. This mechanism ensures that modifications to the file through any linked name affect all links, and the file is only deleted when the last link is removed. Hard links are created using the CreateHardLink API function or the fsutil hardlink command, which adds a new FILENAMEattributetotheexistingMFTentrywithoutalteringthefilesdata.[](https://learn.microsoft.com/enus/windows/win32/api/winbase/nfwinbasecreatehardlinka)[](https://learn.microsoft.com/enus/windowsserver/administration/windowscommands/fsutilhardlink)EachMFTrecordcancontainmultipleFILE_NAME attribute to the existing MFT entry without altering the file's data.[](https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createhardlinka)[](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil-hardlink) Each MFT record can contain multiple FILE_NAME attributes, each pointing to a different parent directory and filename, thus representing the various hard links to the file. A key limitation of NTFS hard links is that they must reside on the same volume, as cross-volume links are not supported to maintain file system integrity. This restriction prevents potential issues with data consistency across different storage devices. Hard links are applicable only to files, not directories, distinguishing them from other linking mechanisms in NTFS. Reparse points extend NTFS functionality by allowing files or directories to contain special data that redirects or modifies access behavior, implemented via the $REPARSE attribute in the MFT. This attribute holds a reparse tag—a 32-bit value that identifies the type of reparse point—and associated data interpreted by file system filter drivers during path resolution. Reparse points are resolved transparently during file operations: when an application accesses a path containing a reparse point, the NTFS driver detects the tag and invokes the owning filter to process the data, potentially substituting a new path or performing custom actions. For directories, the reparse tag is also stored in the directory's index entries to facilitate efficient traversal. Common use cases for reparse points include symbolic links, which redirect to another file or directory using a tag like 0xA000000C, allowing flexible path aliasing similar to Unix symlinks but with NTFS-specific behaviors. Junctions, a type of reparse point with tag 0xA0000003, provide backward compatibility for redirecting directories to other locations on the same or different volumes, often used in system folders. Volume mount points employ reparse points (tag 0xA0000005) to nest volumes within the namespace without drive letters, enhancing directory structure organization. Additionally, reparse points support file deduplication through tags like 0x80000013, where identical files are replaced by pointers to shared data blocks managed by a filter driver. To prevent infinite loops from cyclic reparse points, NTFS enforces a maximum depth of 63 reparse points along any path, which can be lower depending on data length and system configuration. Reparse points cannot be set on non-empty directories, ensuring no conflicts with existing contents, and their data size is capped at 16 KB. These features make reparse points a versatile mechanism for extending NTFS without altering its core structure.

Alternate Data Streams

Alternate data streams (ADS) are a feature of the NTFS file system that allows individual files and directories to contain multiple independent streams of data beyond the primary unnamed stream, which stores the main file content. This enables the attachment of supplementary metadata, such as annotations or security information, to a file without modifying its core data, facilitating interoperability with systems like Macintosh HFS that support resource forks. Streams are stored as additional instances of the $DATA attribute in the file's entry within the Master File Table. ADS can be created using command-line tools, for example, by redirecting content to a named stream with the syntax echo "data" > file.txt:streamname, which appends a new stream named "streamname" to the file "file.txt". These streams can be accessed and edited directly by applications that support the stream syntax, such as opening file.txt:streamname in Notepad, or programmatically via Win32 APIs like CreateFile, where the filename parameter includes the colon-separated stream name. The total size reported for a file by tools like dir includes the combined size of the primary stream and all alternate streams, though the primary stream size may appear as zero if no data is stored there. Common use cases for ADS include storing security metadata; for instance, Windows Internet Explorer and Edge attach a Zone.Identifier stream to downloaded files to record the download source's security zone (e.g., Internet zone with value 3), triggering warnings or restrictions when executing the file. Additionally, Windows Explorer caches thumbnail previews of images and other media in ADS named under property handlers to accelerate thumbnail view rendering without regenerating them each time. By default, ADS are invisible in Windows Explorer and most file management interfaces, which display only the primary stream, potentially leading to overlooked data. They can be detected and enumerated using the command dir /R on a file or directory, which lists all streams along with their sizes, or with third-party tools like the Sysinternals Streams utility that leverages the undocumented FindFirstStreamW API for comprehensive scanning. From a security perspective, ADS pose risks because malware can exploit them to conceal payloads, such as embedding executable code or scripts within innocuous files like email attachments, evading detection by standard file viewers and some legacy antivirus scanners that ignore streams. For example, attackers have hidden ransomware components in ADS to bypass initial scans; effective mitigation requires antivirus software configured to inspect all streams during scans. ADS have specific limitations: they are not inherited by child files or subdirectories within a folder that has streams, as each stream is tied exclusively to its host file or directory. Furthermore, standard copy operations, such as those in Windows Explorer, may discard ADS when moving files to non-NTFS volumes (e.g., FAT32) or across systems, as the feature is NTFS-specific; preservation requires tools like robocopy with the /COPY:DATS flag to explicitly include data streams in the copy process.

Advanced Features

Quotas

NTFS disk quotas provide a mechanism for administrators to monitor and limit the amount of disk space used by individual users on an NTFS volume. These quotas are applied on a per-volume basis and track storage consumption based on file ownership, where the quota applies to files owned by a specific user as determined by the security descriptor. Introduced with Windows 2000 and NTFS version 3.0, quotas enable better management of shared storage environments by preventing any single user from monopolizing volume capacity. Quotas in NTFS are per-user only and do not support native per-group limits; they are enforced individually using security identifiers (SIDs) to associate limits with user accounts. Each quota entry includes two thresholds: a soft limit, which triggers logging or notifications when exceeded but allows continued writes, and a hard limit, which strictly enforces the cap by denying further write operations once reached. Usage is calculated by summing the allocated space of all files and directories owned by the user, including both named and unnamed data streams, but excluding system files and temporary allocations. The quota data is stored out-of-band in the Quotametafile,locatedatMFTentry144undertheQuota metafile, located at MFT entry 144 under the Extend directory, to avoid impacting file attribute performance. This metafile contains two indexed attributes forming B+ trees: the Oindex,whichtracksoutstandingtransactionsbySID,andtheO index, which tracks outstanding transactions by SID, and the Q index, which holds the primary quota control entries keyed by user SID for efficient lookups and updates. Quota information is separate from the file's standard attributes, allowing the NTFS driver to update usage counts asynchronously during file operations without immediate I/O to the metafile. Administrators manage quotas through the Disk Management console GUI, where they can enable quotas, set default limits, and configure individual user entries, or via the command-line tool fsutil quota for tasks like enabling, disabling, modifying limits, and querying usage. The Windows API provides programmatic access through structures like DISKQUOTA_INFORMATION for setting thresholds and querying states. When a user's usage approaches or exceeds thresholds, NTFS logs events to the system event log (Event ID 39 for warnings, 40 for denials), which can trigger notifications or scripts, but enforcement occurs at the file system level by failing write requests with STATUS_DISK_QUOTA_EXCEEDED if the hard limit is hit.

Volume Shadow Copy

The Volume Shadow Copy Service (VSS) integrates with NTFS to enable the creation of consistent, point-in-time snapshots of volumes, facilitating reliable backups and file recovery without interrupting ongoing operations. VSS coordinates between three main components: requestors (such as backup applications that initiate snapshot creation), writers (applications and services like Microsoft Exchange or SQL Server that ensure data consistency by flushing buffers and quiescing I/O), and providers (software or hardware modules that implement the actual snapshot mechanism). For NTFS volumes, the built-in software provider leverages block-level copy-on-write (CoW) operations to capture metadata and data changes efficiently, preserving the original volume's integrity while generating a read-only shadow copy. This architecture ensures application-aware snapshots, where writers notify VSS of critical data states to avoid inconsistencies during the brief freeze-and-thaw phase of snapshot creation. NTFS snapshots created via VSS provide point-in-time views of the file system by employing reparse points to redirect access to unchanged blocks on the original volume, while modified blocks are copied to a dedicated shadow storage area before being overwritten. This CoW mechanism minimizes initial overhead, as only altered data is duplicated, allowing the snapshot to reflect the volume's state at the exact moment of creation. The shadow storage area, located on an NTFS volume (which can be the same or a separate one from the shadowed volume), holds these differential copies and is configurable in size using tools like vssadmin, with a default allocation often set to 10% of the volume size or a minimum of 300-500 MB to accommodate initial changes. Administrators can adjust this limit to balance storage needs against retention requirements, ensuring sufficient space for multiple snapshots without excessive disk consumption. These snapshots support key user and system functionalities, including access to Previous Versions through Windows Explorer, where users can restore individual files or folders from historical points, and integration with System Restore for broader system recovery operations. By default, up to 64 client-accessible shadow copies can be maintained per volume, though the underlying VSS framework supports a maximum of 512 software shadow copies to prevent storage overflow. In implementation, VSS ensures snapshot consistency on NTFS by flushing pending I/O operations and committing entries in the LogFile(theNTFStransactionlog)todisk,whichatomicallyrecordsmetadatachangesandmaintainsfilesystemintegrityduringthecreationprocess.[](https://learn.microsoft.com/enus/windows/win32/vss/shadowcopycreationforproviders)Additionally,theLogFile (the NTFS transaction log) to disk, which atomically records metadata changes and maintains file system integrity during the creation process.[](https://learn.microsoft.com/en-us/windows/win32/vss/shadow-copy-creation-for-providers) Additionally, the VOLUME_IS_DIRTY flag in the volume's boot sector is checked and managed to verify that the file system is in a clean state prior to snapshotting, preventing inconsistencies from prior unclean shutdowns or errors. This integration with NTFS metafiles allows for reliable, crash-consistent snapshots that can be exposed as virtual volumes for backup tools. Despite its efficiency, VSS snapshots impose performance limitations, notably a temporary overhead on the first write to any block following snapshot creation, as the original data must be copied to shadow storage before the modification proceeds, potentially slowing I/O-intensive workloads. VSS is designed primarily for backup and recovery scenarios rather than real-time data replication, lacking the low-latency synchronization needed for continuous mirroring across systems.

Transactions

Transactional NTFS (TxF) is a feature introduced in Windows Vista with NTFS version 3.1 that enables applications to perform file and directory operations atomically across multiple objects on an NTFS volume, providing ACID (atomicity, consistency, isolation, durability) semantics for file system tasks. TxF integrates with the Windows Kernel Transaction Manager (KTM) to manage transactions, allowing developers to group operations such as creating, modifying, or deleting files and directories into a single unit that either fully commits or fully rolls back in case of failure. This builds upon NTFS's existing journaling capabilities by extending them to support transactional isolation through mini-versions of files, which permit concurrent access without interference. TxF operations are initiated via transacted Win32 APIs, such as CreateFileTransacted for opening files or directories within a transaction context, or explicit functions like CreateDirectoryTransacted and RemoveDirectoryTransacted for name-based operations. Transactions can span multiple files and directories, enabling complex scenarios where a logical operation affects several objects, such as renaming a set of related files or updating configuration data across multiple locations. Applications enlist handles in transactions explicitly, with support for auto-commit upon successful completion or manual control through transaction APIs for more granular handling; however, file operations do not automatically enlist in ambient transactions from higher-level frameworks like System.Transactions without additional implementation. The TxfLogmetafilestorestransactionspecificdata,complementingthegeneralTxfLog metafile stores transaction-specific data, complementing the general LogFile used for recovery, to track changes and ensure isolation via temporary mini-versions that are discarded on rollback. In the event of a system failure or explicit rollback, TxF leverages the NTFS $LogFile to undo uncommitted changes, restoring the file system to its pre-transaction state and maintaining consistency without partial updates. This recovery mechanism ensures durability for committed transactions while isolating ongoing ones from non-transactional access. Common use cases include software installers that need to apply or revert multiple file changes atomically to avoid leaving systems in inconsistent states, and lightweight databases or applications requiring file-based ACID properties for data integrity during operations like logging or configuration updates. Due to low adoption and maintenance priorities, Microsoft deprecated TxF APIs starting with Windows 8, recommending alternatives like application-level locking or database transactions for similar functionality, though the feature remains available for legacy compatibility in subsequent Windows versions including Windows 11.

System Compression

NTFS supports enhanced file and folder compression algorithms introduced starting with Windows 8, providing options for better storage efficiency on NTFS volumes. Windows 8 added support for XPRESS algorithms (XPRESS4K, XPRESS8K, XPRESS16K) via the compact command, offering faster processing with moderate compression ratios compared to the legacy LZNT1 method. Windows 10 further introduced the LZX algorithm, which achieves higher compression ratios (up to approximately 50% for compressible data) at the cost of increased CPU usage. These algorithms apply to individual files and folders, with compression stored in the standard $DATA attribute and a compression format flag, ensuring transparent decompression during access. Unlike explicit archiving, compression is on-the-fly and managed via the compact command (e.g., compact /c /exe:xpress8 for XPRESS8K or /exe:LZX for LZX in Windows 10 and later). Average compression ratios vary by data type but are around 1.5:1 to 2:1 for typical files; results depend on content compressibility, with incompressible data (e.g., media files) seeing minimal savings. There is no native per-volume automatic compression flag, but administrators can enable compression on the root folder during volume formatting (available since Windows XP) or post-formatting, causing new files to inherit the compressed attribute from their parent folder. Integration with data deduplication is supported in Storage Spaces configurations on NTFS volumes, allowing combined use for further space savings, though careful configuration is required to avoid conflicts. This feature is available only on NTFS-formatted volumes. While effective for HDDs in space-constrained environments, it is generally not recommended for SSDs due to increased write amplification, which can accelerate wear. In Windows 10 and later (including Windows 11 as of 2025), LZX support enhances efficiency for scenarios like OneDrive synchronization by reducing local storage without affecting cloud sizes. It also synergizes with sparse files by compressing non-contiguous data blocks.

Security

Access Control Lists

NTFS implements access control through security descriptors associated with files and directories, which include Access Control Lists (ACLs) to enforce granular permissions. These ACLs consist of two primary types: the Discretionary Access Control List (DACL), which specifies allow or deny access rights via Access Control Entries (ACEs) for trustees such as users and groups, and the System Access Control List (SACL), which defines auditing policies for monitoring access attempts. The SECURITYDESCRIPTORattributeineachfilesMFTrecordcontainsasecurityIDthatreferencesthesharedsecuritydescriptor(includingDACLandSACL)storedonceintheSECURITY_DESCRIPTOR attribute in each file's MFT record contains a security ID that references the shared security descriptor (including DACL and SACL) stored once in the Secure system file, enabling efficient per-file security without duplicating common descriptors across the volume. Each ACE in an ACL defines permissions for a specific Security Identifier (SID), which uniquely identifies a user, group, or other principal. The structure includes the SID, an access mask representing the rights granted or denied—such as GENERIC_READ (0x80000000) for read operations—and flags controlling inheritance and applicability, like OBJECT_INHERIT_ACE (0x1) for inheriting to child objects or CONTAINER_INHERIT_ACE (0x2) for subcontainers. Deny ACEs take precedence over allow ACEs during evaluation, ensuring that explicit denials block access even if broader allows exist, which promotes secure default configurations. ACLs support inheritance from parent directories to child files and subdirectories, allowing permissions to propagate automatically unless explicitly blocked. This propagation can be managed through command-line tools like icacls, which supports flags such as /inheritance:r to remove inheritance or /grant to add inheritable ACEs, or via the graphical Security tab in file properties for visual editing. SIDs in NTFS ACLs integrate seamlessly with Active Directory, enabling domain-wide permission management where group SIDs from AD domains reference users across networked environments. While NTFS ACLs provide flexible discretionary access control, they introduce performance overhead during access evaluation in deeply nested directory structures, as the system must traverse inheritance chains and evaluate multiple ACEs per request. Unlike mandatory access control systems such as SELinux, NTFS relies solely on discretionary ACLs without enforced labels or policies beyond owner-defined permissions. This model also underpins quota enforcement, where SID-based ownership determines storage limits as detailed in the quotas section.

Encryption and BitLocker Integration

The Encrypting File System (EFS), introduced in Windows 2000, enables per-file and per-directory encryption on NTFS volumes, providing transparent cryptographic protection for individual files using public-key infrastructure. When a user encrypts a file, EFS generates a unique symmetric File Encryption Key (FEK) to encrypt the file's data stream; this FEK is then encrypted (wrapped) with the user's public key derived from their EFS certificate and stored as metadata. The encrypted FEK, along with other recovery information, is saved in the NTFS-specific $EFS attribute, which holds Data Decryption Fields (DDFs) for user access and Data Recovery Fields (DRFs) for administrative recovery. EFS employs the Advanced Encryption Standard (AES) algorithm with 256-bit keys (identified as CALG_AES_256 in Windows cryptography APIs) for the symmetric encryption of file data, ensuring strong protection while maintaining compatibility across Windows versions from 2000 onward. For recovery purposes, domain administrators can designate Data Recovery Agents (DRAs) whose public keys encrypt copies of the FEK; in Active Directory environments, these recovery keys are escrowed to allow access if the original user's certificate is lost or unavailable. BitLocker, Microsoft's full-volume encryption feature available since Windows Vista, integrates with NTFS by leveraging the file system's metadata structures to support drive unlocking and key management, though the actual encryption occurs at the volume level outside the NTFS layer. BitLocker uses AES encryption (128-bit or 256-bit keys) and relies on the Trusted Platform Module (TPM) hardware to securely store and protect the Volume Master Key (VMK), which encrypts the Full Volume Encryption Key (FVEK) used for the drive; BitLocker integrates with NTFS by allowing the file system to operate on encrypted volumes transparently, with its own metadata structures handling drive unlocking and key management at the volume level. When used together on NTFS volumes, EFS and BitLocker provide layered security, resulting in double encryption for EFS-protected files on BitLocker-encrypted drives, as the file contents are encrypted by EFS while the entire volume—including the $EFS attribute—is encrypted by BitLocker. However, EFS has limitations in such setups, including incompatibility with NTFS compression: files cannot be both compressed and EFS-encrypted simultaneously, as the two features are mutually exclusive at the file attribute level. From a security perspective, EFS relies on certificate-based key management with escrow in Active Directory for DRAs to prevent data loss, while BitLocker's TPM integration mitigates vulnerabilities like cold boot attacks—where encryption keys might be extracted from RAM after power-off—by sealing keys in tamper-resistant hardware that clears memory on reset.

Interoperability

Windows Support

NTFS has been natively supported in the Windows NT operating system family since Windows NT 3.1, providing full read and write access to volumes formatted with the file system across all editions of Windows NT-based operating systems. This native integration ensures seamless handling of NTFS volumes without requiring additional drivers or third-party software on Windows platforms. Starting with Windows 2000, NTFS became the default file system for system and boot volumes during installation, replacing FAT as the primary choice due to its superior security, reliability, and performance features. Windows provides a suite of built-in command-line tools for managing and maintaining NTFS volumes. The chkdsk utility scans volumes for logical and physical errors, repairs file system metadata, and recovers data from bad sectors, making it essential for routine disk health checks and repairs. Fsutil offers advanced management capabilities, such as configuring the NTFS log file size with commands like fsutil behavior setlogfilesize to adjust journaling parameters for better performance and recovery. For handling access control lists (ACLs), icacls allows administrators to display, modify, back up, or restore permissions on files and directories, enabling precise control over NTFS security descriptors. NTFS maintains strong backward compatibility across Windows versions, allowing newer releases to fully access and utilize volumes formatted by earlier ones; for instance, Windows 10 and later can read and write to NTFS 3.0 volumes created in Windows 2000 without issues. Forward compatibility is generally reliable for basic operations, though advanced features from newer versions may require updates on older systems to avoid limitations, with such issues being rare in practice. As of 2025, NTFS remains the core file system in Windows 11 and Windows Server 2025, integral to system installations and data storage, while ReFS serves as an alternative for environments prioritizing data resiliency and scalability in server deployments. In dual-boot configurations involving Windows and other operating systems, the convert.exe utility facilitates non-destructive conversion of FAT or FAT32 volumes to NTFS, preserving existing data and enabling full NTFS feature support without reformatting. This tool is particularly useful for upgrading legacy partitions during multi-OS setups, ensuring compatibility with Windows' native NTFS handling.

Linux and FreeBSD Support

Linux provides NTFS support through two primary drivers: the userspace ntfs-3g driver and the in-kernel ntfs3 driver. The ntfs-3g driver, an open-source FUSE-based implementation, has offered stable full read/write access to NTFS partitions since its 2007 release. It operates in userspace, ensuring compatibility across various Linux distributions, and includes utilities such as ntfsfix for performing basic NTFS boot sector repairs and clearing the dirty bit on volumes marked as uncleanly unmounted. The ntfs3 driver, developed by Paragon Software and integrated into the Linux kernel starting with version 5.15 in 2021, delivers faster read/write performance compared to ntfs-3g by running natively in the kernel. It supports NTFS versions up to 3.1, including features like sparse files, compression, and journal replay. Volumes can be mounted using the mount -t ntfs3 command, and it has become the preferred option in many distributions by 2025 due to its efficiency. In October 2025, a new NTFSplus driver was proposed as a successor to ntfs3, aiming to address stability issues and improve performance. However, write operations remain experimental in certain scenarios; improper shutdowns, such as those following Windows hibernation or fast startup, can lead to file system corruption because the driver does not fully handle Windows-specific hibernation states. Users are recommended to disable Windows hibernation and fast startup features in dual-boot environments to minimize these risks. FreeBSD offers read-only NTFS support via its built-in kernel driver, which handles basic access to NTFS volumes without write capabilities. For full read/write functionality, the fusefs-ntfs package—based on ntfs-3g—must be installed, providing userspace-mounted access similar to Linux implementations. This setup supports NTFS versions up to 3.1 and integrates with FUSE for safe handling of Windows-formatted storage. Both Linux and FreeBSD NTFS drivers share common limitations, including no native enforcement of NTFS quotas or support for the Encrypting File System (EFS). Journaling is partially implemented, with the drivers capable of replaying the NTFS journal to recover from crashes but lacking integration with the host OS's native journaling for proactive protection. These constraints highlight the emulated nature of NTFS on Unix-like systems, where advanced Windows-specific features require proprietary tools or are unavailable.

macOS and Other OS Support

macOS has included native read-only support for NTFS file systems since Mac OS X 10.3 Panther, released in 2003. This capability allows users to access and read files on NTFS-formatted volumes, such as external drives or partitions shared with Windows systems, without additional software. However, write operations, file creation, or modifications require third-party solutions, as native support deliberately excludes write access to prevent potential data corruption or compatibility issues. Commercial third-party drivers, such as Paragon Software's Microsoft NTFS for Mac and Tuxera's Microsoft NTFS for Mac, enable full read and write access to NTFS volumes on macOS. These drivers integrate at the kernel level to provide native-speed performance and are compatible with recent versions, including macOS Sonoma (version 14) and Sequoia (version 15) as of 2025. They support basic NTFS features like file compression and large volumes but do not implement advanced functionalities such as the Encrypting File System (EFS) or disk quotas, which remain exclusive to Windows environments. Apple's security architecture further complicates third-party NTFS implementations. System Integrity Protection (SIP), introduced in macOS El Capitan (10.11) and enhanced in subsequent releases, blocks the loading of unsigned kernel extensions, including older or unauthorized NTFS drivers. As of 2025, this restriction persists in macOS Sonoma and later, requiring users to rely on notarized, signed drivers from reputable vendors to avoid compatibility blocks or system instability. OS/2 offered limited interoperability with NTFS through third-party installable file system (IFS) drivers, such as ntfs-os2 version 0.03, which enabled read access to Windows NT NTFS partitions as standard drive letters starting in the late 1990s. IBM did not provide native NTFS drivers in OS/2 releases, including Warp 4 (1996), which primarily supported HPFS and FAT file systems; instead, users depended on these freeware IFS modules for basic compatibility. Early implementations were prone to instability, particularly for write operations, limiting their reliability in production environments. MS-DOS lacks any native support for NTFS, as it predates the file system's introduction in Windows NT 3.1 (1993). Third-party utilities like NTFSDOS, first released in 1999, provided read-only access to NTFS volumes under DOS and early Windows 9x environments using DOS Protected Mode Interface (DPMI) for 32-bit operations. Professional editions offered write capabilities, but these were widely regarded as unsafe due to risks of data corruption and incomplete handling of NTFS structures like journaling. Among other operating systems, BeOS achieved partial NTFS interoperability via third-party drivers, such as those released around 2006, which supported basic read and write operations for files, directories, and symlinks but lacked comprehensive feature parity. On Android devices, NTFS access for USB storage is facilitated by applications like Paragon Software's exFAT/NTFS for USB, a non-root solution that enables read and write transfers between device memory and NTFS-formatted external drives without native kernel modifications. ReactOS does not yet support NTFS as of its 0.4.15 release in March 2025, though development is ongoing for future versions.

Limitations

Resizing and Partitioning

NTFS supports dynamic resizing of volumes starting with Windows Vista, which introduced version 3.1 of the file system, enabling both extension and shrinking operations through built-in tools such as Disk Management and the diskpart command-line utility. To extend an NTFS volume, contiguous unallocated space must be available immediately following the volume on the same disk for basic volumes, while dynamic volumes can utilize unallocated space on any dynamic disk; the process involves selecting the volume in Disk Management and following the Extend Volume wizard or using the extend command in diskpart. Shrinking is similarly performed via the Shrink Volume option in Disk Management or the shrink command in diskpart, but it is constrained by the need for contiguous free space and cannot reduce the volume below the space required for critical system files. Key limitations in shrinking NTFS volumes arise from unmovable files, such as the Master File Table (MFT) and the $LogFile, which reserve space at the beginning of the volume and prevent reduction beyond their allocated size; for instance, the MFT dynamically expands but cannot be relocated during standard operations, often limiting shrink amounts to available space after these structures. After resizing, running chkdsk is recommended to verify and repair any potential inconsistencies in the file system metadata, as the operation may alter volume parameters that require validation. For partitioning, NTFS is fully compatible with both Master Boot Record (MBR) and GUID Partition Table (GPT) schemes, allowing volumes to be created or managed on disks using either format without file system-specific restrictions. Converting an existing partition to NTFS, such as from FAT or FAT32, can be done without data loss using the convert command in the Command Prompt—for example, convert D: /fs:ntfs—which updates the file system in place while preserving files and directories. Third-party tools like MiniTool Partition Wizard provide additional capabilities for NTFS resizing, particularly when dealing with non-contiguous free space, by allowing partition movement and more flexible adjustments that exceed the limitations of native Windows tools. Resizing and partitioning operations on NTFS carry inherent risks, including potential data corruption or volume inaccessibility if interrupted or if unmovable files are mishandled; Microsoft strongly recommends creating a full backup before proceeding to mitigate these risks.

Scalability Constraints

NTFS imposes specific limits on volume sizes, balancing theoretical maxima with practical constraints influenced by cluster allocation. The file system supports a theoretical maximum volume size of 16 exbibytes (2^64 bytes), but this is constrained by the number of clusters, limited to 2^32 - 1 (approximately 4.29 billion). In practice, the maximum volume size depends on the cluster size; for example, with a 64 KB cluster size, it is 256 terabytes, while Windows Server 2019 and later support up to 8 petabytes with a 2 MB cluster size. Larger clusters enable higher capacities, though such configurations are used primarily in server environments due to compatibility considerations. Cluster size directly affects these limits, with smaller clusters enabling finer granularity but capping overall volume capacity at lower thresholds. Individual file sizes on NTFS are theoretically capped at 2^64 bytes (16 exbibytes). However, scalability challenges arise with the number of files, particularly due to the Master File Table (MFT), which stores metadata for every file and directory. When volumes contain millions of files—such as exceeding 10 million entries— the MFT can become bloated and fragmented, leading to increased seek times, slower directory traversals, and even boot delays as the system loads file indexes. Performance scaling in NTFS is affected by its journaling mechanism and fragmentation tendencies. The NTFS log file records metadata changes to ensure crash recovery, but this introduces overhead that grows with write-intensive workloads. Fragmentation becomes more pronounced as volumes exceed 50% capacity, where free space fragmentation hinders contiguous allocation, increasing read/write latencies—especially on mechanical drives, though less so on SSDs. In the context of 2025 hardware, NTFS performs adequately on NVMe SSDs for volumes up to 100 TB, supporting modern workloads like AI datasets or virtual machines without significant bottlenecks. For petabyte-scale storage, however, Microsoft recommends ReFS over NTFS due to the latter's cluster and MFT limitations, which can lead to inefficiencies in ultra-large environments. To mitigate these constraints, regular defragmentation consolidates files and optimizes the MFT, improving access speeds on fragmented volumes. Additionally, Storage Spaces enables pooling of multiple drives into resilient, scalable volumes using NTFS, bypassing single-volume limits through tiered or mirrored configurations.

Compatibility Challenges

OneDrive synchronization with NTFS volumes encounters several compatibility hurdles related to advanced file system features. Alternate Data Streams (ADS) and Encrypting File System (EFS) attributes are not preserved during sync, as OneDrive primarily handles the primary data stream and skips specialized metadata streams. Similarly, NTFS compression is not maintained in the cloud, leading to files being decompressed upon upload, which can alter file sizes and behaviors upon download. Residual losses in extended attributes persist, particularly for legacy or specialized NTFS metadata. In multi-boot environments, NTFS partitions face access restrictions due to Windows' Fast Startup and hibernation mechanisms. When enabled, Fast Startup creates a hibernation file (hiberfil.sys) that locks the NTFS volume, preventing other operating systems from mounting it read-write and risking data inconsistency if forced. This lockout extends to shared partitions in dual-boot setups, where resuming from hibernation or improper shutdown can leave the file system in an unclean state, necessitating a full Windows restart to resolve. Linux-based writes to such locked or inconsistent NTFS volumes further exacerbate risks, potentially causing journal mismatches that lead to corruption detectable only upon Windows boot. Legacy systems like MS-DOS and Windows 9x offer only limited, read-only access to NTFS via third-party VFAT-compatible drivers, without native support for the file system. These environments cannot interpret NTFS structures, resulting in partitions appearing inaccessible or requiring specialized tools for basic read operations. Long filename support is entirely absent in pure DOS mode, as VFAT extensions apply only to FAT volumes, forcing users to rely on 8.3 naming conventions or external utilities for any interaction. In cloud and virtual machine scenarios, NTFS receives full read-write support in platforms like Azure VMs and VirtualBox guests, enabling seamless hosting of Windows environments. However, exporting Volume Shadow Copy Service (VSS) snapshots—used for point-in-time backups—remains constrained, particularly on volumes exceeding 64 TB, where VSS operations fail due to inherent size limits. As of 2025, ongoing challenges include stability concerns with Linux's ntfs3 kernel driver for write operations, which has demonstrated unreliability in handling complex NTFS structures, leading to directory corruption in testing scenarios. Additionally, NTFS lacks native quantum-safe encryption, with EFS and BitLocker relying on pre-quantum algorithms like AES, while Microsoft plans broader post-quantum transitions no earlier than 2029.

References

Add your contribution
Related Hubs
User Avatar
No comments yet.