NTFS: Difference between revisions
→Transactions: TxF might be depricated |
No edit summary |
||
(616 intermediate revisions by more than 100 users not shown) | |||
Line 1: | Line 1: | ||
{{Short description|Proprietary file system developed by Microsoft}} |
|||
{{multiple issues| |
|||
{{Infobox file system |
|||
{{lead too short|date=February 2014}} |
|||
| developer = [[Microsoft]] |
|||
{{Missing information|[[File system permissions]]|date=February 2014}} |
|||
| name = NT File System<ref name="karresand2019">{{Cite journal| doi = 10.1016/j.diin.2019.04.018| issn = 1742-2876| volume = 29| pages = –51–S60| last1 = Karresand| first1 = Martin| last2 = Axelsson| first2 = Stefan| last3 = Dyrkolbotn| first3 = Geir Olav| title = Using NTFS Cluster Allocation Behavior to Find the Location of User Data| journal = Digital Investigation| date = 2019-07-01| s2cid = 199004263| doi-access = free| hdl = 11250/2631756| hdl-access = free}}</ref> |
|||
}} |
|||
| full_name = NT File System<ref name="ntfs_abbr"/> |
|||
{{infobox file system |
|||
| variants = |
|||
| name = NTFS |
|||
| introduction_date = {{Start date and age|1993|07|27}} |
|||
| full_name = New Technology File System<ref name="ntfs_abbr" /> |
|||
| partition_id = {{mono|[[Partition type#PID 07h|0x07]]}} ([[Master boot record|MBR]])<br />{{mono|[[Basic Data Partition|EBD0A0A2-B9E5-4433-87C0-68B6B72699C7]]}} ([[GUID Partition Table|GPT]]) |
|||
| developer = [[Microsoft]] |
|||
| directory_struct = [[B-tree]] variant<ref>{{cite web|title=How NTFS Works|url=https://technet.microsoft.com/en-us/library/cc781134(v=ws.10).aspx|website=TechNet| date=8 October 2009 |publisher=Microsoft|access-date=2 December 2017}}</ref><ref>{{cite web|access-date=2019-05-13|title=B*Trees - NTFS Directory Trees - Concept - NTFS Documentation|url=https://flatcap.org/linux-ntfs/ntfs/concepts/tree/index.html|website=flatcap.org|archive-date=2019-05-13|archive-url=https://web.archive.org/web/20190513230245/https://flatcap.org/linux-ntfs/ntfs/concepts/tree/index.html|url-status=dead}}</ref> |
|||
| introduction_os = [[Windows NT 3.1]] |
|||
| file_struct = Bitmap |
|||
| introduction_date = July 1993 |
|||
| bad_blocks_struct = $BadClus (MFT Record) |
|||
| partition_id = <tt>[[Partition type#PID 07h|0x07]]</tt> ([[Master boot record|MBR]]) <br /> <tt>[[Basic Data Partition|EBD0A0A2-B9E5-4433-87C0-68B6B72699C7]]</tt> ([[GUID Partition Table|GPT]]) |
|||
| max_volume_size = 2<sup>64</sup> [[Data cluster|clusters]] − 1 cluster (format);<br />256{{nbsp}}[[terabyte|TB]]{{efn|name=units|1={{CompUnits|KBMBGBTBPBEB}}}} − 64{{nbsp}}[[kilobyte|KB]]{{efn|name=units}} ([[Windows 10]] version 1703, [[Windows Server 2016]] or earlier implementation)<ref name="How NTFS Works"/><br />8{{nbsp}}[[petabyte|PB]]{{efn|name=units}} − 2{{nbsp}}[[megabyte|MB]]{{efn|name=units}} (Windows 10 version 1709, [[Windows Server 2019]] or later implementation)<ref name="MS-FSA_id_1" /> |
|||
| directory_struct = [[B+ tree]]<ref name=insidewin2kntfs>{{cite web | url = http://msdn2.microsoft.com/en-us/library/ms995846.aspx | title = Inside Win2K NTFS, Part 1 | first = Mark |last=Russinovich | website = [[MSDN|Microsoft Developer Network]] |publisher=[[Microsoft]] | accessdate = 2008-04-18 | authorlink = Mark Russinovich }}</ref> |
|||
| max_file_size = 16{{nbsp}}[[exabyte|EB]]{{efn|name=units}} − 1{{nbsp}}[[kilobyte|KB]] (format);<br />16{{nbsp}}[[terabyte|TB]] − 64{{nbsp}}[[kilobyte|KB]] ([[Windows 7]], [[Windows Server 2008 R2]] or earlier implementation)<ref name="How NTFS Works"/><br />256{{nbsp}}[[terabyte|TB]] − 64{{nbsp}}[[kilobyte|KB]] ([[Windows 8]], [[Windows Server 2012]] or later implementation)<ref name="MS-FSA">{{cite web |url= https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fsa/4e3695bd-7574-4f24-a223-b4679c065b63 |title= Appendix A: Product Behavior |work= [MS-FSA]: File System Algorithms |publisher= Microsoft |date= 14 November 2013 |access-date= 2012-09-21}}</ref><br />8{{nbsp}}[[petabyte|PB]] − 2{{nbsp}}[[megabyte|MB]] (Windows 10 version 1709, [[Windows Server 2019]] or later implementation)<ref name="MS-FSA_id_1" /> |
|||
| file_struct = Bitmap |
|||
| max_files_no = 4,294,967,295 (2<sup>32</sup>−1)<ref name="How NTFS Works">{{cite web |url= https://technet.microsoft.com/en-us/library/cc781134(v=ws.10).aspx |title= How NTFS Works |date= 2003-03-28 |work= Windows Server 2003 Technical Reference |access-date= 2011-09-12}}</ref> |
|||
| bad_blocks_struct = $badclus (MFT Record) |
|||
| max_filename_size |
| max_filename_size = 255 [[UTF-16]] code units<ref name="ntfsdoc">{{cite web |url= http://dubeyko.com/development/FileSystems/NTFS/ntfsdoc.pdf |archive-url=https://ghostarchive.org/archive/20221009/http://dubeyko.com/development/FileSystems/NTFS/ntfsdoc.pdf |archive-date=2022-10-09 |url-status=live |title= NTFS Documentation |first1= Richard |last1= Russon |first2= Yuval |last2= Fledel |access-date= 2011-06-26}}</ref> |
||
| dates_recorded = Creation, modification, POSIX change, access |
|||
| max_files_no = 4,294,967,295 (2<sup>32</sup>-1)<ref name="How NTFS Works">{{cite web | url = http://technet.microsoft.com/en-us/library/cc781134(v=ws.10).aspx | title = How NTFS Works | date = 2003-03-28 | work = Windows Server 2003 Technical Reference | accessdate = 2011-09-12 }}</ref> |
|||
| date_range = 1 January 1601 – 14 Sept 30828 (File times are 64-bit positive signed numbers<ref>{{cite web |url=https://learn.microsoft.com/en-us/windows/win32/enwiki/api/minwinbase/ns-minwinbase-systemtime |title=SYSTEMTIME structure (minwinbase.h) |publisher=Microsoft |date=October 5, 2021 |access-date=January 7, 2024}}</ref> counting 100-nanosecond intervals (ten million per second) since 1601, which is more than 32,000 years) |
|||
| max_file_size = 16 [[exbibyte|EiB]] – 1 [[kibibyte|KiB]] (format);<br />16 [[tebibyte|TiB]] – 64 [[kibibyte|KiB]] ([[Windows 7]], [[Windows Server 2008 R2]] or earlier implementation)<ref name="How NTFS Works"/> 256 [[tebibyte|TiB]] – 64 [[kibibyte|KiB]] ([[Windows 8]], [[Windows Server 2012]] implementation)<ref name="MS-FSA">{{cite web | url = http://msdn.microsoft.com/en-us/library/ff469400%28v=prot.20%29.aspx#id116 | title = 6 Appendix A: Product Behavior | work = [MS-FSA]: File System Algorithms | publisher = Microsoft | date = 14 November 2013 | accessdate = 2012-09-21 }}</ref> |
|||
| date_resolution = 100 ns |
|||
| max_volume_size = 2<sup>64</sup> [[Data cluster|clusters]] − 1 cluster (format);<br />256 [[tebibyte|TiB]] − 64 [[kibibyte|KiB]] (implementation)<ref name="How NTFS Works"/> |
|||
| forks_streams = Yes (see {{section link||Alternate data stream (ADS)}} below) |
|||
| filename_character_set = In [[POSIX]] namespace, any [[UTF-16]] code unit (case-sensitive) except {{nowrap|U+0000 ([[null character|NUL]])}} and {{nowrap|/ ([[slash (punctuation)|slash]])}}. In Win32 namespace, any [[UTF-16]] code unit (case-insensitive) except {{nowrap|U+0000 ([[null character|NUL]])}} {{nowrap|/ ([[slash (punctuation)|slash]])}} {{nowrap|\ ([[backslash]])}} {{nowrap|: ([[colon (punctuation)|colon]])}} {{nowrap|* ([[asterisk]])}} {{nowrap|? ([[Question mark]])}} {{nowrap|" ([[Quotation mark|quote]])}} {{nowrap|< ([[Bracket|less than]])}} {{nowrap|> ([[Bracket|greater than]])}} and {{nowrap|| ([[Vertical bar|pipe]])}} <ref name="ntfsdoc"/> |
|||
| attributes = Read-only, hidden, system, archive, not content indexed, off-line, temporary, compressed, encrypted |
|||
| dates_recorded = Creation, modification, POSIX change, access |
|||
| date_range = 1 January 1601 – 28 May 60056 (File times are 64-bit numbers counting 100-nanosecond intervals (ten million per second) since 1601, which is 58,000+ years) |
|||
| date_resolution = 100 ns |
|||
| forks_streams = Yes (see [[#Alternate data streams (ADS)|§ Alternate data streams]] below) |
|||
| attributes = Read-only, hidden, system, archive, not content indexed, off-line, temporary, compressed |
|||
| file_system_permissions = [[Access Control List|ACLs]] |
| file_system_permissions = [[Access Control List|ACLs]] |
||
| compression |
| compression = Per-file, [[LZ77]] ([[Windows NT 3.51]] onward) |
||
| encryption = Per-file,<br />[[DESX]] ([[Windows 2000]] onward),<br />[[Triple DES]] ([[Windows XP]] onward),<br />[[Advanced Encryption Standard|AES]] (Windows XP Service Pack 1, [[Windows Server 2003]] onward) |
|||
| single_instance_storage = Yes ([[Windows Server 2012]])<ref name="singleinstancestorage">{{cite web | url = http://www.techrepublic.com/blog/datacenter/windows-server-8-data-deduplication-what-you-need-to-know/4887 | title = Windows Server 8 data deduplication | author = Rick Vanover | accessdate = 2011-12-02 }}</ref> |
|||
| OS = [[Windows NT 3.1]] and later<br />[[Mac OS X 10.3]] and later (read-only)<br />[[Linux kernel]] version 2.6 and later<br />Linux kernel versions 2.2-2.4 (read-only)<br />[[FreeBSD]]<br />[[NetBSD]]<br/>[[OpenBSD]] (read-only)<br />[[ChromeOS]]<br />[[Oracle Solaris|Solaris]]<br />[[ReactOS]] (read-only) |
|||
| encryption = Per-file,<br />[[DESX]] ([[Windows 2000]] onward),<br />[[Triple DES]] ([[Windows XP]] onward),<br />[[Advanced Encryption Standard|AES]] (Windows XP Service Pack 1, [[Windows Server 2003]] onward) |
|||
| filename_character_set = {{Plainlist| |
|||
| OS = [[Windows NT 3.1]] and later<br/>[[OS X 10.3]] and later (read-only) |
|||
* In [[Win32]] namespace: any [[UTF-16]] code unit (case-insensitive) except <code>/\:*"?<>|</code> as well as [[null character|NUL]]<ref name="ntfsdoc"/> |
|||
* In [[POSIX]] namespace: any [[UTF-16]] code unit (case-sensitive) except <code>/</code> as well as [[null character|NUL]] |
|||
}} |
|||
| introduction_os = [[Windows NT 3.1]] |
|||
| single_instance_storage = Yes ([[Windows Server 2012]])<ref name="singleinstancestorage">{{cite web |url= https://www.techrepublic.com/blog/the-enterprise-cloud/windows-server-8-data-deduplication-what-you-need-to-know/ |title= Windows Server 8 data deduplication |author= Rick Vanover |date= 14 September 2011 |access-date= 2011-12-02 |archive-date= 2016-07-18 |archive-url= https://web.archive.org/web/20160718150957/http://www.techrepublic.com/blog/the-enterprise-cloud/windows-server-8-data-deduplication-what-you-need-to-know/ |url-status= dead }}</ref> |
|||
}} |
}} |
||
'''NT File System''' ('''NTFS''') (commonly called ''New Technology File System'') is a proprietary [[journaling file system]] developed by [[Microsoft]] in the 1990s.<ref>{{Citation |title=The New Technology File System |date=2007 |work=Forensic Computing |pages=215–275 |editor-last=Sammes |editor-first=Tony |url=https://link.springer.com/chapter/10.1007/978-1-84628-732-9_6 |access-date=2024-08-14 |place=London |publisher=Springer |language=en |doi=10.1007/978-1-84628-732-9_6 |isbn=978-1-84628-732-9 |editor2-last=Jenkinson |editor2-first=Brian}}</ref><ref>{{Cite web |last=Weiss |first=David |date=2022-08-01 |title=What Is NTFS and How Does It Work? |url=https://www.datto.com/blog/what-is-ntfs-and-how-does-it-work/ |access-date=2024-08-14 |website=Datto |language=en-US}}</ref><ref name="ntfs_abbr">{{cite web |url=https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-efsr/230807ac-20be-494f-86e3-4c8ac23ea584 |title=Glossary |work=[MS-EFSR]: Encrypting File System Remote (EFSRPC) Protocol |publisher=Microsoft |date=14 November 2013}}</ref> |
|||
It was developed to overcome scalability, security and other limitations with [[File Allocation Table|FAT]].<ref>{{Cite web |title=New Technology File System - an overview {{!}} ScienceDirect Topics |url=https://www.sciencedirect.com/topics/computer-science/new-technology-file-system |access-date=2024-08-14 |website=www.sciencedirect.com}}</ref> NTFS adds several features that [[File Allocation Table|FAT]] and [[HPFS (file system)|HPFS]] lack, including: [[access control list]]s (ACLs); filesystem encryption; transparent compression; [[sparse file]]s; [[Journaling file system|file system journaling]] and [[shadow copy|volume shadow copy]], a feature that allows backups of a system while in use. |
|||
'''NTFS''' ('''New Technology File System'''<ref name="ntfs_abbr" />) is a [[Proprietary software|proprietary]] [[file system]] developed by [[Microsoft]].<ref name="ntfs_abbr">{{cite web | url=http://msdn.microsoft.com/en-us/library/cc230448.aspx | title=1.1 Glossary | work=[MS-EFSR]: Encrypting File System Remote (EFSRPC) Protocol | publisher=Microsoft | date=14 November 2013 }}</ref> Starting with [[Windows NT 3.1]], it is the default file system of [[Windows NT]] family.<ref name="Custer, Helen">{{cite book | last=Custer | first=Helen | title=Inside the Windows NT File System | year=1994 | publisher=[[Microsoft Press]] | isbn=978-1-55615-660-1 }}</ref> |
|||
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.<ref name="Custer, Helen">{{cite book |last=Custer |first=Helen |url=https://archive.org/details/insidewindowsntf00cust |title=Inside the Windows NT File System |publisher=[[Microsoft Press]] |year=1994 |isbn=978-1-55615-660-1}}</ref> NTFS read/write support is available on [[Linux]] and [[Berkeley Software Distribution|BSD]] using [[NTFS3]] in [[Linux kernel|Linux]] and [[NTFS-3G]] in [[BSD]].<ref>{{Cite web|title=NTFS3 — The Linux Kernel documentation|url=https://www.kernel.org/doc/html/latest/filesystems/ntfs3.html|access-date=2021-12-02|website=www.kernel.org}}</ref><ref>{{Cite web|title=ntfs-3g|url=https://www.freebsd.org/cgi/man.cgi?query=ntfs-3g&format=html|access-date=2021-12-02|website=www.freebsd.org}}</ref> |
|||
NTFS has several technical improvements over [[File Allocation Table|FAT]] and HPFS ([[High Performance File System]]), the file systems that it superseded, such as improved support for [[metadata (computing)|metadata]], and the use of advanced data structures to improve performance, reliability, and disk space utilization, plus additional extensions, such as security [[access control list]]s (ACL) and [[journaling file system|file system journaling]]. |
|||
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.<ref name="karresand2019" /> |
|||
== History == |
== History == |
||
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 [[High Performance File System|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 [[High Performance File System|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.<ref>{{cite web |url= https://www.karlstechnology.com/blog/history-of-ntfs/ |title= Overview and History of NTFS |publisher= The PC Guide |last=Kozierok |first=Charles |date= 14 February 2018 |access-date=May 30, 2019}}</ref> The original NTFS developers were [[Tom Miller (computer programmer)|Tom Miller]], Gary Kimura, Brian Andrew, and David Goebel.<ref>{{cite book |last= Custer |first= Helen |title= Inside the Windows NT File System |year= 1994 |publisher= [[Microsoft Press]] |isbn= 978-1-55615-660-1 |page= vii |url= https://archive.org/details/insidewindowsntf00cust}}</ref> |
|||
Probably as a result of this common ancestry, HPFS and NTFS use the same [[disk partitioning|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. |
|||
== Developers == |
|||
=== Versions === |
|||
NTFS developers include:<ref>{{ cite book |last= Custer |first= Helen |title= Inside the Windows NT File System |year= 1994 | publisher= [[Microsoft Press]] |isbn= 978-1-55615-660-1 |page=vii}}</ref> |
|||
Microsoft has released five versions of NTFS: |
|||
* [[Tom Miller (computer programmer)|Tom Miller]] |
|||
{| class="wikitable" |
|||
* [[Gary Kimura]] |
|||
! NTFS version number |
|||
* Brian Andrew |
|||
! First operating system |
|||
* David Goebel |
|||
! Release date |
|||
! New features |
|||
! Remarks |
|||
|- |
|||
|{{rh}}| 1.0 |
|||
| [[Windows NT 3.1]] |
|||
| 1993<ref name="Custer, Helen" /> |
|||
| 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.<ref>{{cite web|url=http://support.microsoft.com/kb/q129102/|title=Recovering Windows NT After a Boot Failure on an NTFS Drive|date=November 1, 2006|publisher=Microsoft}}</ref> |
|||
|- |
|||
|{{rh}}| 1.1 |
|||
| [[Windows NT 3.5]] |
|||
| 1994 |
|||
| Named streams and [[access control list]]s<ref name="insidewin2kntfs">{{cite web |url=https://learn.microsoft.com/en-us/previous-versions/ms995846(v=msdn.10) |title=Inside Win2K NTFS, Part 1 |last=Russinovich |first=Mark |author-link=Mark Russinovich |website=[[MSDN]] |date=30 June 2006 |publisher=[[Microsoft]] |access-date=2008-04-18}}</ref> |
|||
| NTFS compression support was added in [[Windows NT 3.51]] |
|||
|- |
|||
|{{rh}}| 1.2 |
|||
| [[Windows NT 4.0]] |
|||
| 1996 |
|||
| [[Security descriptor]]s |
|||
| Commonly called NTFS 4.0 after the OS release |
|||
|- |
|||
|{{rh}}| 3.0 |
|||
| [[Windows 2000]] |
|||
| 2000 |
|||
| Disk quotas, file-level encryption in a form of [[Encrypting File System]], [[sparse file]]s, [[NTFS reparse point|reparse points]], [[USN Journal|update sequence number (USN) journaling]], distributed link tracking, the <code>$Extend</code> 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.<ref>{{cite web |url=http://www.microsoft.com/ntserver/nts/exec/overview/NT4SP4whatnew.asp |title=What's New in Windows NT 4.0 Service Pack 4? |date=12 January 1999 |website=Microsoft.com |access-date=17 August 2018 |url-status=dead |archive-url=https://web.archive.org/web/19990117055557/http://www.microsoft.com/ntserver/nts/exec/overview/NT4SP4whatnew.asp |archive-date=17 January 1999}}</ref> |
|||
|- |
|||
|{{rh}}| 3.1 |
|||
| [[Windows XP]] |
|||
| October 2001 |
|||
| Expanded the [[#Master File Table|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 {{code|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).<ref>{{cite web |archive-url=https://web.archive.org/web/20061116110405/http://support.microsoft.com/kb/310749 |url=http://support.microsoft.com/kb/310749 |title=New Capabilities and Features of the NTFS 3.1 File System |publisher=Microsoft |date=1 December 2007 |archive-date=Nov 16, 2006}}</ref><ref>{{cite web |url=https://www.ntfs.com/ntfs_basics.htm |title=NTFS Overview |publisher=LSoft Technologies Inc.}}</ref> |
|||
== Versions == |
|||
Although subsequent versions of Windows added new file system-related features, they did not change NTFS itself. For example, [[Windows Vista]] implemented [[NTFS symbolic link]]s, [[Transactional NTFS]], partition shrinking, and self-healing.<ref>{{cite web |url=http://download.microsoft.com/download/5/b/9/5b97017b-e28a-4bae-ba48-174cf47d23cd/STO123_WH06.ppt |title=Storage improvements in Windows Vista and Windows Server 2008 |publisher=Microsoft |access-date=2007-09-04 |format=PowerPoint |pages=14–20 |last=Loveall |first=John |year=2006}}</ref> 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. |
|||
Microsoft has released five versions of NTFS: |
|||
== Scalability == |
|||
* '''v1.0''': Released with [[Windows NT 3.1]] in 1993.<ref name="Custer, Helen" /> v1.0 is incompatible with v1.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.<ref>{{ cite web | url=http://support.microsoft.com/kb/q129102/ | title=Recovering Windows NT After a Boot Failure on an NTFS Drive | publisher=Microsoft | date=November 1, 2006 }}</ref> |
|||
NTFS is optimized for 4 [[kilobyte|KB]]{{efn|name=units}} [[Data cluster|clusters]], but supports a maximum cluster size of 2{{nbsp}}[[megabyte|MB]]{{efn|name=units}}. (Earlier implementations support up to 64{{nbsp}}KB)<ref name="MS-FSA_id_1">{{cite web |url= https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fsa/4e3695bd-7574-4f24-a223-b4679c065b63#Appendix_A_1 |title= Appendix A: Product Behavior |work= [MS-FSA]: File System Algorithms |publisher= Microsoft|date= 2018-09-12 |access-date= 2018-10-01 |quote= NTFS uses a default cluster size of 4 KB, a maximum cluster size of 64 KB on Windows 10 v1703 operating system and Windows Server 2016 and prior, and 2 MB on Windows 10 v1709 operating system and Windows Server 2019 and later, and a minimum cluster size of 512 bytes.}}</ref> The maximum NTFS volume size that the specification can support is {{nowrap|2<sup>64</sup> − 1}} clusters, but not all implementations achieve this theoretical maximum, as discussed below. |
|||
* '''v1.2''': Released with [[Windows NT 3.51]] in 1995. Supports compressed files, named streams and [[access control list]]s<ref name="insidewin2kntfs" /> |
|||
* '''v3.0''': Released with [[Windows 2000]].<ref name="Inside Win2K NTFS, Part 1">{{cite web | url=http://msdn.microsoft.com/en-us/library/ms995846.aspx | title=Inside Win2K NTFS, Part 1 | publisher=Microsoft | date=January 26, 2011 }}</ref> Supports disk quotas, [[Encrypting File System]], [[sparse file]]s, reparse points, update sequence number (USN) journaling, the $Extend folder and its files. Reorganized [[security descriptor]]s so that multiple files using the same security setting can share the same descriptor.<ref name=insidewin2kntfs /> |
|||
* '''v3.1''': Released with [[Windows XP]] in autumn 2001 (and subsequently used also for Windows Vista and Windows 7). Expanded the [[#Master File Table|Master File Table]] (MFT) entries with redundant MFT record number (useful for recovering damaged MFT files). |
|||
The maximum NTFS volume size implemented in Windows XP Professional is {{nowrap|2<sup>32</sup> − 1}} clusters, partly due to partition table limitations. For example, using 64{{nbsp}}KB clusters, the maximum size Windows XP NTFS volume is 256{{nbsp}}[[terabyte|TB]] minus 64{{nbsp}}[[kilobyte|KB]]. Using the default cluster size of 4{{nbsp}}KB, the maximum NTFS volume size is 16{{nbsp}}TB minus 4{{nbsp}}KB. Both of these are vastly higher than the 128{{nbsp}}[[gigabyte|GB]]{{efn|name=units}} limit in [[Windows XP#Service Pack 1|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,<ref>{{cite web |title=Windows support for hard disks that are larger than 2 TB |website=[[Microsoft Learn]] |date=2013-06-26 |url=https://learn.microsoft.com/en-us/troubleshoot/windows-server/backup-and-storage/support-for-hard-disks-exceeding-2-tb |access-date=2024-08-08}}</ref><ref>{{cite web |title=Default cluster size for NTFS, FAT, and exFAT |url=https://support.microsoft.com/en-us/topic/default-cluster-size-for-ntfs-fat-and-exfat-9772e6f1-e31a-00d7-e18f-73169155af95|website=Microsoft Support|archive-url=https://web.archive.org/web/20240309213220/https://support.microsoft.com/en-us/topic/default-cluster-size-for-ntfs-fat-and-exfat-9772e6f1-e31a-00d7-e18f-73169155af95|archive-date=2024-03-09|url-status=dead}}</ref> 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{{Efn|Can also be 32-bit, provided that the firmware and operating system loader are size-matched.}} support.<ref>{{cite web|url=http://www.rodsbooks.com/gdisk/booting.html|title=Booting from GPT|website=Rodsbooks.com|access-date=22 September 2018}}</ref> GPT data disks are supported on systems with BIOS. |
|||
The NTFS.sys version number (e.g. v5.0 in Windows 2000) should not be confused with the NTFS format version number (v3.1 since Windows XP).<ref>{{ cite web | url=http://support.microsoft.com/kb/310749 | title=New Capabilities and Features of the NTFS 3.1 File System | publisher=Microsoft | date=December 1, 2007 }}</ref> |
|||
The NTFS maximum theoretical limit on the size of individual files is 16{{nbsp}}[[Exabyte|EB]]{{efn|name=units}}<ref>{{Cite web|title=NTFS vs FAT vs exFAT - NTFS.com|url=https://www.ntfs.com/ntfs_vs_fat.htm|access-date=2021-01-19|website=www.ntfs.com}}</ref> ({{nowrap|16 × 1024<sup>6</sup>}} or {{nowrap|2<sup>64</sup> bytes}}) minus 1{{nbsp}}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{{nbsp}}PB{{efn|name=units}} minus 2{{nbsp}}MB or 9,007,199,252,643,840 bytes.<ref name="MS-FSA_id_1"/> |
|||
[[Windows Vista]] implemented [[Transactional NTFS]], [[NTFS symbolic link]]s, partition shrinking and self-healing.<ref>{{ cite web |url=http://download.microsoft.com/download/5/b/9/5b97017b-e28a-4bae-ba48-174cf47d23cd/STO123_WH06.ppt |title=Storage improvements in Windows Vista and Windows Server 2008 |publisher=Microsoft |accessdate=2007-09-04 |format=PowerPoint |pages=14–20 |last=Loveall |first=John |year=2006}}</ref> All except NTFS symbolic links are operating system's features. 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.<ref>{{ cite web |url=http://blogs.technet.com/filecab/archive/2006/07/14/441829.aspx | title=How restore points and other recovery features in Windows Vista are affected when you dual-boot with Windows XP | author=cfsbloggers | date=July 14, 2006 | work=The Filing Cabinet | accessdate=2007-03-21 }}</ref> |
|||
== |
== Interoperability == |
||
NTFS v3.0 includes several new features over its predecessors: sparse file support, disk usage quotas, reparse points, distributed link tracking, and file-level encryption, also known as the [[Encrypting File System]] (EFS). |
|||
=== |
=== Windows === |
||
While the different NTFS versions are for the most part fully [[forward compatibility|forward]]- and [[backward compatibility|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 "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.<ref name="techBlog2007">{{cite web |author=cfsbloggers |date=July 14, 2006 |title=How restore points and other recovery features in Windows Vista are affected when dual-booting with Windows XP |url=http://blogs.technet.com/filecab/archive/2006/07/14/441829.aspx |url-status=dead |archive-url=https://web.archive.org/web/20060718011852/http://blogs.technet.com/filecab/archive/2006/07/14/441829.aspx |archive-date=2006-07-18 |access-date=2007-03-21 |work=The Filing Cabinet}}</ref> A Windows command-line utility called [[convert (command)|convert.exe]] can convert supporting file systems to NTFS, including [[High Performance File System|HPFS]] (only on Windows NT 3.1, 3.5, and 3.51), [[File Allocation Table|FAT16]] and FAT32 (on Windows 2000 and later).<ref>{{cite web |url= https://www.karlstechnology.com/blog/convert-fat-disks-to-ntfs/ |title= How to Convert FAT Disks to NTFS |date= 18 December 2017 |publisher= Microsoft |access-date=May 30, 2019}}</ref><ref>{{cite web |url=https://www.eduhk.hk/ocio/content/faq-how-convert-fat32-file-system-ntfs-windows-xp |title=FAQ: How to use Convert.exe to convert a partition to the NTFS file system |access-date=2010-12-26 |date=2007-02-12 |website=The Educationsl University of Hong Kong |archive-url=https://web.archive.org/web/20231206011046/https://www.eduhk.hk/ocio/content/faq-how-convert-fat32-file-system-ntfs-windows-xp |archive-date=2023-12-06 |url-status=dead}}</ref> |
|||
In theory, the maximum NTFS volume size is 2<sup>64</sup>−1 clusters. However, the maximum NTFS volume size as implemented in Windows XP Professional is 2<sup>32</sup>−1 clusters partly due to partition table limitations. For example, using 64 kB clusters, the maximum Windows XP NTFS volume size is 256 [[tebibyte|TB]]s minus 64 [[kibibyte|KB]]s. 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 [[gibibyte|GB]] limit lifted in [[Windows XP#Service Pack 1|Windows XP SP1]].) Because partition tables on master boot record (MBR) disks only support partition sizes up to 2 TB, dynamic or [[GUID Partition Table|GPT]] volumes must be used to create NTFS volumes over 2 TB. Booting from a GPT volume to a Windows environment requires a system with [[Unified Extensible Firmware Interface|UEFI]] and 64-bit support.<ref>http://www.rodsbooks.com/gdisk/booting.html</ref> |
|||
=== FreeBSD === |
|||
The maximum theoretical file size on NTFS is 16 [[exabyte|EB]] ({{nowrap|16 × 1024<sup>6</sup> or 2<sup>64</sup> bytes}}) minus 1 kB or 18,446,744,073,709,550,592 bytes. With [[Windows 8]] and [[Windows Server 2012]], the maximum file size implemented is 256 TB minus 64 KB or 281,474,976,645,120 bytes.<ref name="MS-FSA" /> |
|||
[[FreeBSD]] 3.2 released in May 1999 included read-only NTFS support written by Semen Ustimenko.<ref>{{cite web | url=https://www.freebsd.org/releases/3.2R/notes.html | title=FreeBSD 3.2 Release Notes | date=17 May 1999 | access-date=2020-06-15 }}</ref><ref name=OpenBSDman /> This implementation was ported to [[NetBSD]] by Christos Zoulas and Jaromir Dolecek and released with NetBSD 1.5 in December 2000.<ref>{{cite web | url=https://www.netbsd.org/releases/formal-1.5/NetBSD-1.5.html | title=Announcing NetBSD 1.5 | date=6 December 2000 | access-date=2020-06-15 }}</ref> 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|lc=y|pre=version 4.9 released|2011|05|01|post=.}}<ref>{{cite web|url=http://openbsd.com/49.html|title=OpenBSD 4.9|website=Openbsd.com|access-date=22 September 2018}}</ref><ref name=OpenBSDman>{{cite web | url=https://man.openbsd.org/mount_ntfs.8 | title=mount_ntfs - OpenBSD manual pages | access-date=2020-06-15 }}</ref> |
|||
=== Linux === |
|||
NTFS supports a maximum cluster size of 64 kB.<ref>{{ cite web | url = http://msdn.microsoft.com/en-us/library/ff469400%28v=prot.20%29.aspx#id2 | title = [MS-FSA]: File System Algorithms. Appendix A: Product Behavior | publisher = Microsoft | accessdate = 2012-01-10 }}</ref> |
|||
[[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;<ref name="LinuxNTFSCredits">{{cite web |title=NTFS Credits and History |url=https://flatcap.org/linux-ntfs/misc.html |url-status=dead |archive-url=https://web.archive.org/web/20210924232137/https://flatcap.org/linux-ntfs/misc.html |archive-date=2021-09-24 |accessdate=2021-09-24 |work=Linux-NTFS Project}}</ref> 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.<ref>{{cite web | url=https://lwn.net/2002/0502/kernel.php3 | title=Kernel development | date=2 May 2002 | work=lwn.net | accessdate=2021-09-05 }}</ref><ref>{{cite web | url=https://cdn.kernel.org/pub/linux/kernel/v2.5/ChangeLog-2.5.11 | title=Release notes for v2.5.11 | date=29 April 2002 | accessdate=2021-09-05 }}</ref><ref name=LinuxNTFSCredits /> 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.<ref>{{cite web | url=https://kernelnewbies.org/Linux_2_6_15 | title=2.6.15 changelog | date=3 January 2006 | work=Linux project | accessdate=2021-09-05 }}</ref> 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.<ref>{{Cite web|url=https://www.theregister.com/2021/09/06/github_merges_useless_garbage_says/|title=GitHub merges 'useless garbage' says Linus Torvalds as new NTFS support added to Linux kernel 5.15|date=2021-09-06|access-date=2021-09-07|website=The Register|last=Anderson|first=Tim}}</ref> |
|||
[[NTFS-3G]] is a free [[GNU General Public License|GPL]]-licensed [[Filesystem in Userspace|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]],<ref>{{cite web |url=http://undeadly.org/cgi?action=article&sid=20131108082749&mode=expanded&count=2 |title=OpenBSD adds fuse(4) support for adding file systems in userland |publisher=[[OpenBSD Journal]] |date=2013-11-08 |access-date=2013-11-08}}</ref> Solaris, [[QNX]], and [[Haiku (operating system)|Haiku]]<ref>{{cite web |url=http://www.ntfs-3g.org/|title=NTFS-3G Stable Read/Write Driver |date=2009-07-25}}</ref> 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.<ref>{{cite web |url=http://www.tuxera.com/products/tuxera-ntfs-for-mac/ |title=Tuxera NTFS for Mac |date=August 30, 2011 |access-date=September 20, 2011 |publisher=Tuxera}}</ref> |
|||
[[Captive NTFS]], a 'wrapping' driver that uses Windows' own driver {{mono|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.<ref>{{cite web | url=http://www.jankratochvil.net/project/captive/ | title=Jan Kratochvil: Captive: The first free NTFS read/write filesystem for GNU/Linux | access-date=2020-06-15 }}</ref> |
|||
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 === |
|||
[[Mac OS X Panther|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 Snow Leopard|Mac OS X 10.6]].<ref>{{cite web | url=https://www.tuxera.com/company/our-story/ | title=About Tuxera | access-date=2020-06-15}}</ref> 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 panic]]s.<ref>{{cite web |url=http://hints.macworld.com/article.php?story=20090913140023382 |title=10.6: Enable native NTFS read/write support |date=1 October 2009 |access-date=5 September 2021 |archive-url=https://web.archive.org/web/20210905122854/http://hints.macworld.com/article.php?story=20090913140023382 |archive-date=5 September 2021 |url-status=dead}}</ref> |
|||
[[Paragon Software Group]] sells a read-write driver named ''NTFS for Mac'',<ref>{{cite web |url=https://www.paragon-software.com/home/ntfs-mac/ |title=Microsoft NTFS for Mac |access-date=August 8, 2024 |publisher=Paragon Software Group}}</ref> which is also included on some models of [[Seagate Technology|Seagate]] hard drives.<ref>{{Cite web|url=http://www.seagate.com/ww/v/index.jsp?locale=en-US&name=goflex-software&vgnextoid=11c1fab114b48210VgnVCM1000001a48090aRCRD|archive-url=https://web.archive.org/web/20110210152004/http://www.seagate.com/ww/v/index.jsp?locale=en-US&name=goflex-software&vgnextoid=11c1fab114b48210VgnVCM1000001a48090aRCRD |url-status=dead |title=The Leader in Mass Data Storage Solutions | Seagate US|archive-date=February 10, 2011|website=Seagate.com}}</ref> |
|||
=== OS/2 === |
|||
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.<ref>{{cite web|url=https://ecsoft2.org/ntfs-plugin-netdrive|access-date=2020-09-09|website=ecsoft2.org|title=NTFS plugin for NetDrive}}</ref><ref>{{cite web|url=https://www.arcanoae.com/shop/netdrive-for-os2/|title=NetDrive for OS/2|access-date=2020-09-09|website=arcanoae.com}}</ref> |
|||
=== DOS === |
|||
There is a free-for-personal-use read/write driver for [[MS-DOS]] by [[Avira]] called "NTFS4DOS".<ref>{{cite web |url=http://www.free-av.com/en/tools/11/avira_ntfs4dos_personal.html |title=Avira NTFS4DOS Personal |access-date=2009-07-25 |url-status=dead |archive-url=https://web.archive.org/web/20100619161828/http://www.free-av.com/en/tools/11/avira_ntfs4dos_personal.html |archive-date=June 19, 2010}}</ref><ref>{{cite web |url=http://www.softpedia.com/progDownload/Avira-NTFS4DOS-Personal-Download-104314.html |title=Download Avira NTFS4DOS Personal 1.9 |access-date=22 September 2018 |url-status=dead |archive-date=10 November 2013 |archive-url=https://web.archive.org/web/20131110224951/http://www.softpedia.com/progDownload/Avira-NTFS4DOS-Personal-Download-104314.html }}</ref> |
|||
[[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 == |
|||
NTFS uses [[access control list]]s and user-level encryption to help secure user data. |
|||
=== Access control lists (ACLs) === |
|||
[[File:NTPermissions.png|thumb|right|200px|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 list]]s (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 {{code|C:\Program Files}} folder may be read and executed by all users but modified only by a user holding administrative privileges.<ref name=":0">{{cite web |url= https://technet.microsoft.com/en-us/library/cc781716%28v=ws.10%29.aspx|title= How Security Descriptors and Access Control Lists Work|access-date= 4 September 2015|website= [[Microsoft TechNet|TechNet]]|publisher= [[Microsoft]]}}</ref> 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.<ref name=":0"/> |
|||
=== Encryption === |
|||
{{Main|Encrypting File System}} |
|||
[[Encrypting File System]] (EFS) provides user-transparent encryption of any file or folder on an NTFS volume.<ref>{{cite web |url=https://technet.microsoft.com/en-us/magazine/2007.02.securitywatch.aspx |title=Security Watch Deploying EFS: Part 1 |first=John |last=Morello |work=Technet Magazine |publisher=[[Microsoft]] |date=February 2007 |access-date=2009-01-25}}</ref> EFS works in conjunction with the EFS service, Microsoft's [[Cryptographic Application Programming Interface|CryptoAPI]] and the EFS File System Run-Time Library (FSRTL). EFS works by encrypting a file with a bulk [[symmetric key algorithm|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 algorithm|asymmetric key]] cipher is used. The symmetric key that is used to encrypt the file is then encrypted with a [[public key cryptography|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.<ref>{{cite web |title=How EFS Works|url=https://technet.microsoft.com/library/Cc962103|work=Windows 2000 Resource Kit|date=18 July 2012 |publisher=[[Microsoft]]|access-date=25 February 2014}}</ref> 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; 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 == |
|||
=== Journaling === |
=== Journaling === |
||
NTFS is a [[journaling file system]] and uses the NTFS Log ($LogFile) to record metadata changes to the volume. It is |
NTFS is a [[journaling file system]] and uses the NTFS Log ({{mono|$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 [[#Master File Table|MFT]] records such as moves of some variable-length attributes stored in MFT records and attribute lists, and indices for directories and [[security descriptor]]s. |
||
The ({{mono|$LogFile}}) format has evolved through several versions: |
|||
{| class="wikitable" |
|||
!Windows Version |
|||
!{{mono|$LogFile}} format version |
|||
|- |
|||
|{{rh}}|[[Windows NT 4.0]] |
|||
|rowspan="5"|1.1 |
|||
|- |
|||
|{{rh}}|[[Windows 2000]] |
|||
|- |
|||
|{{rh}}|[[Windows XP]] |
|||
|- |
|||
|{{rh}}|[[Windows Vista]] |
|||
|- |
|||
|{{rh}}|[[Windows 7]] |
|||
|- |
|||
|{{rh}}|[[Windows 8]] |
|||
|rowspan="3"|2.0 |
|||
|- |
|||
|{{rh}}|[[Windows 8.1]] |
|||
|- |
|||
|{{rh}}|[[Windows 10]] |
|||
|} |
|||
The incompatibility of the {{mono|$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 {{mono|$LogFile}}. Backward compatibility is provided by downgrading the {{mono|$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 {{mono|$LogFile}}s of any active file systems are not downgraded to version 1.1. The inability to process version 2.0 of the {{mono|$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 {{mono|$LogFile}} to the newer version. The problem can also be dealt with by disabling Hybrid Boot.<ref>{{Cite web|url=https://learn.microsoft.com/en-us/archive/technet-wiki/15645.windows-8-volume-compatibility-considerations-with-prior-versions-of-windows|title=Windows 8 volume compatibility considerations with prior versions of Windows|date=17 January 2024 |access-date=2024-08-08}}</ref> |
|||
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.<ref>{{ |
The [[USN Journal]] (Update Sequence Number Journal) is a system management feature that records (in {{mono|$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.<ref>{{cite web|url=https://learn.microsoft.com/en-us/windows/win32/fileio/change-journals|title=Change Journals|date=7 January 2021 |publisher=[[Microsoft Docs]]|access-date=2023-08-12}}</ref> This journal can be enabled or disabled on non-system volumes.<ref>{{cite web|url=https://learn.microsoft.com/en-us/windows/win32/fileio/creating-modifying-and-deleting-a-change-journal|title=Creating, Modifying, and Deleting a Change Journal (Windows)|date=7 January 2021 |publisher=[[Microsoft Docs]]|access-date=2023-08-12}}</ref> |
||
=== Hard links === |
=== Hard links === |
||
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 [[#Master File Table|MFT]]. |
|||
Hard links were originally included to support the [[POSIX]] subsystem in Windows NT.<ref>{{cite web|title=Chapter 29 – POSIX Compatibility|url=https://technet.microsoft.com/en-us/library/cc768080.aspx|work=MS Windows NT Workstation 4.0 Resource Guide|publisher=[[Microsoft]]|access-date=21 October 2013|year=1995}}</ref> |
|||
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) you will also receive this cached information, in addition to the name and inode. However, you 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.<ref>{{cite web|title=Hard Links and Junctions|url=http://msdn.microsoft.com/en-us/library/aa365006%28VS.85%29.aspx|work=[[MSDN]]|publisher=[[Microsoft]]|access-date=21 October 2013|date=12 October 2013}}</ref> 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. You can always obtain up-to-date data using GetFileInformationByHandle (which is the true equivalent of POSIX stat 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. |
|||
Hard links allows different file names to refer to the same file contents. |
|||
Windows uses hard links to support [[8.3 filename|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. |
|||
[[Hard link]]s are similar to [[NTFS#Directory junctions|directory junctions]], but refer to files instead. Hard links may link to files in the same volume only because each volume has its own [[#Master File Table|MFT]]. Hard links have their own file metadata, so a change in file size or attributes under one hard link may not update the others until they are opened.<ref>{{ cite web|title=Hard Links and Junctions|url=http://msdn.microsoft.com/en-us/library/aa365006%28VS.85%29.aspx|work=[[MSDN]]|publisher=[[Microsoft]]|accessdate=21 October 2013|date=12 October 2013}}</ref> |
|||
The NTFS file system has a limit of 1024 [[hard link]]s on a file.<ref>{{cite web |title=MSDN – CreateHardLink function|url=https://msdn.microsoft.com/en-us/library/aa363860%28v=vs.85%29.aspx|access-date=14 January 2016}}</ref> |
|||
=== Alternate data stream (ADS) === |
|||
Windows uses hard links to support [[8.3 filename|Short (8.3) filenames]] in NTFS. Operating system support is needed because there are legacy applications that can work only with 8.3 filenames. 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. |
|||
{{main|Fork (file system)}} |
|||
Alternate data streams allow more than one [[stream (computing)#Other uses|data stream]] to be associated with a filename (a [[fork (file system)|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<ref>{{cite web|url=https://learn.microsoft.com/en-us/sysinternals/downloads/streams|title=Streams - Sysinternals|website=[[Microsoft Docs]]|date=23 March 2021 |access-date=12 August 2023}}</ref> 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.<ref>{{cite web|title=FileSystem Provider|url=https://technet.microsoft.com/en-us/library/hh847764(v=wps.620).aspx|publisher=Microsoft|access-date=23 January 2015|date=9 August 2012|url-status=dead|archive-url=https://web.archive.org/web/20150123140513/https://technet.microsoft.com/en-us/library/hh847764(v=wps.620).aspx|archive-date=23 January 2015}}</ref> |
|||
=== Alternate data streams (ADS) === |
|||
[[Fork (filesystem)|Alternate data streams]] allow more than one data stream to be associated with a filename, using the format "filename:streamname" (e.g., "text.txt:extrastream"). |
|||
A small ADS named <code>Zone.Identifier</code> 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.<ref>{{cite book |title= Windows Internals |edition= 5th |last1= Russinovich |first1= Mark E. |author-link= Mark Russinovich |last2= Solomon |first2= David A. |last3= Ionescu |first3= Alex |publisher= Microsoft Press |year= 2009 |chapter= File Systems |page= 921 |quote= One component in Windows that uses multiple data streams is the Attachment Execution Service[...] depending on which zone the file was downloaded from [...] Windows Explorer might warn the user |isbn= 978-0-7356-2530-3}}</ref> 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''".<ref>{{Cite web |last=Boyd |first=Christopher |title=Malformed signature trick can bypass Mark of the Web |url=https://www.malwarebytes.com/blog/news/2022/10/malware-authors-use-malformed-signature-trick-to-bypass-mark-of-the-web |access-date=2023-05-15 |website=Malwarebytes |date=26 October 2022 |language=en}}</ref><ref>{{Cite web |last=DHB-MSFT |title=Macros from the internet are blocked by default in Office - Deploy Office |url=https://learn.microsoft.com/en-us/deployoffice/security/internet-macros-blocked |access-date=2023-05-15 |website=learn.microsoft.com |date=28 February 2023 |language=en-us}}</ref> Without deep modifications to the source code, all [[Chromium (browser)|Chromium]] (e.g. [[Google Chrome]]) and [[Firefox]]-based web browsers also write the <code>Zone.Identifier</code> stream to downloaded files. As of Windows 10, the contents of the <code>Zone.Identifer</code> stream are structured like an [[INI file]] (i.e. a [[key-value store]]) that includes the keys <code>HostIpAddress</code>, <code>HostUrl</code>, and <code>ReferrerUrl</code>. To some extent, these are implementation-defined fields, but they typically contain the domain name and exact URL of the original online download location, potentially offering a deeply esoteric method of tracking browsing history with concomitant privacy risks.<ref>https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms537183(v=vs.85)?redirectedfrom=MSDN</ref> If the downloaded file is executable (e.g. an installer), the <code>Zone</code> ADS can be used for [[reflection (programming)|reflection]], enabling the program to identify where it was downloaded from, which may occasionally be used for [[telemetry]] and/or security purposes, whereby a program can attempt to verify that it was downloaded from an official source (assuming the stream has not been removed or [[Spoofing (anti-piracy measure)|spoof]]ed) and can transmit the information back over the internet (an example of this in action is [[BiglyBT]]'s installer). |
|||
[[Malware]] has used alternate data streams to hide code.<ref>{{cite web |url=https://www.auscert.org.au/render.html?it=7967 |title=Malware utilising Alternate Data Streams? |website=AusCERT Web Log |date=21 August 2007 |archive-url=https://web.archive.org/web/20110223051226/https://www.auscert.org.au/render.html?it=7967 |archive-date=2011-02-23 |url-status=dead}}</ref> 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 <code>Zone.Identifier</code> 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.<ref>https://github.com/fafalone/ZoneStripper</ref> |
|||
Alternate streams are not listed in Windows Explorer, and their size is not included in the file's size. They are ignored when the file is copied or moved to another file system without ADS support, attached to an e-mail, or uploaded to a website. Thus, using alternate streams for critical data may cause problems. Microsoft provides a tool called Streams<ref>[http://technet.microsoft.com/en-us/sysinternals/bb897440.aspx Sysinternals Streams v1.56]</ref> to view streams on a selected volume. Starting with [[Windows PowerShell]] 3.0, it is possible to manage ADS natively with seven cmdlets: Add-Content, Clear-Content, Get-Content, Get-Item, Out-String, Remove-Item, Set-Content.<ref>{{cite web|title=FileSystem Provider|url=https://technet.microsoft.com/en-us/library/hh847764(v=wps.620).aspx|publisher=Microsoft|accessdate=23 January 2015|date=9 August 2012}}</ref> |
|||
NTFS Streams were introduced in [[Windows NT 3.1]], to enable Services for Macintosh (SFM) to store [[resource fork]]s. 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. |
|||
[[Malware]] has used alternate data streams to hide code.<ref>[https://www.auscert.org.au/render.html?it=7967 Malware utilising Alternate Data Streams?], AusCERT Web Log, 21 August 2007</ref> As a result, malware scanners and other special tools now check for alternate data streams. |
|||
=== File compression === |
=== File compression === |
||
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 [[data compression|compressed]] using LZNT1 algorithm (a variant of [[LZ77]]).<ref>{{cite web |url=http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/file_compression_and_decompression.asp |title=File Compression and Decompression |publisher=MSDN Platform SDK: File Systems |access-date=2005-08-18}}</ref> 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.<ref>{{cite web |url= http://support.microsoft.com/kb/314878 |title= The Default Cluster Size for the NTFS and FAT File Systems |publisher= Microsoft |date= January 31, 2002 |access-date= 2012-01-10}}</ref> Data is compressed in 16-cluster chunks (up to 64 KB in size); if the compression reduces 64{{nbsp}}KB of data to 60{{nbsp}}KB or less, NTFS treats the unneeded 4{{nbsp}}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{{nbsp}}KB to 64{{nbsp}}KB or more, depending on compressibility. Files smaller than approximately 900 bytes are stored within the directory entry of the [[#Master File Table|MFT]].<ref>{{cite web |url=https://technet.microsoft.com/en-us/library/cc781134%28WS.10%29.aspx |title=How NTFS Works |date=2003-03-28 |access-date= 2011-10-24}}</ref> |
|||
==== Advantages ==== |
|||
Flash memory, such as [[SSD]] drives do not have the head movement delays of [[hard disk drives]], so fragmentation has only small effects. Users of fast [[multi-core processor]]s will find improvements in application speed by compressing their applications and data as well as a reduction in space used.<ref>{{cite web | url=http://www.tomshardware.com/reviews/ssd-ntfs-compression,3073-11.html | title=Should You Compress Data On Your SSD? | work=Tom's Hardware | publisher=Bestofmedia Group | first=Manuel | last=Masiero | date=2011-12-01 | accessdate = 2013-04-05 }}</ref> Note that SSDs with Sandforce controllers already compress data. However, since less data is transferred, there is a reduction in I/Os. |
|||
Users of fast [[multi-core processor]]s 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.<ref>{{cite web |url=http://www.tomshardware.com/reviews/ssd-ntfs-compression,3073-11.html |title=Should You Compress Data On Your SSD? |work=Tom's Hardware |publisher=Bestofmedia Group |first=Manuel |last=Masiero |date=2011-12-01 |access-date= 2013-04-05}}</ref> |
|||
According to research by Microsoft's NTFS Development team, 50–60{{nbsp}}[[Gigabyte|GB]] is a reasonable maximum size for a compressed file on an NTFS volume with a 4{{nbsp}}KB (default) cluster (block) size. This reasonable maximum size decreases sharply for volumes with smaller cluster sizes.<ref name="understanding-ntfs-compression" /> |
|||
The best use of compression is for files that are repetitive, seldom written, usually accessed sequentially, and not themselves compressed. Log files are an ideal example. |
|||
==== Disadvantages ==== |
|||
Compressing system files needed at boot time, like drivers, NTLDR, winload.exe, or BOOTMGR may prevent the system from booting correctly, as compression filters are not available then.<ref>{{cite web | url=http://technet.microsoft.com/en-us/library/cc977213.aspx | title=Disk Concepts and Troubleshooting | publisher=Microsoft | accessdate=2012-03-26}}</ref> However, in later editions of Windows, compression of important system files is disallowed. |
|||
Large compressible files become highly fragmented since every chunk smaller than 64{{nbsp}}KB becomes a fragment.<ref name="understanding-ntfs-compression">{{cite web |url=http://blogs.msdn.com/b/ntdebugging/archive/2008/05/20/understanding-ntfs-compression.aspx |title=Understanding NTFS Compression |work=Ntdebugging Blog |publisher=[[Microsoft]] |access-date=2011-03-16 |first=Dennis |last=Middleton |archive-url=https://web.archive.org/web/20110629043102/http://blogs.msdn.com/b/ntdebugging/archive/2008/05/20/understanding-ntfs-compression.aspx |archive-date=29 June 2011 |url-status=dead}}</ref><ref>{{cite web|url=https://www.forensicfocus.com/articles/shrinking-the-gap-carving-ntfs-compressed-files/|title=Shrinking the gap: carving NTFS-compressed files|access-date=2011-05-29}}</ref> Flash memory, such as [[SSD]] drives do not have the head movement delays and high [[Hard disk drive performance characteristics#Access time|access time]] of mechanical [[hard disk drives]], so fragmentation has only a smaller penalty. |
|||
If system files that are needed at boot time (such as drivers, NTLDR, winload.exe, or BOOTMGR) are compressed, the system may fail to boot correctly, because decompression filters are not yet loaded.<ref>{{cite web |url=https://technet.microsoft.com/en-us/library/cc977213.aspx |title=Disk Concepts and Troubleshooting |date=11 September 2008 |publisher=Microsoft |access-date=2012-03-26}}</ref>{{failed verification|date=May 2022}} Later editions of Windows{{which|date=January 2016}} do not allow important system files to be compressed. |
|||
Files may be compressed or decompressed individually (via changing the advanced attributes) for a drive, directory, or directory tree, becoming a default for the files inside. |
|||
=== System compression === |
|||
Although read–write access to compressed files is mostly<ref>{{cite web | url=http://msdn.microsoft.com/en-us/library/ms190257.aspx | title=Read-Only Filegroups and Compression | work=SQL Server 2008 Books Online |publisher=[[Microsoft]] |date=November 2009 | accessdate=2010-04-20}}</ref> [[Network transparency|transparent]], Microsoft recommends avoiding compression on server systems and/or network shares holding roaming profiles because it puts a considerable load on the processor.<ref>"[http://support.microsoft.com/default.aspx?scid=kb;en-us;Q251186 Best practices for NTFS compression in Windows]." ''Microsoft Knowledge Base.'' Retrieved on 2005-08-18.</ref> Since many fragments are created for compressible files, [[defragmentation]] may take longer. |
|||
{{anchor|CompactOS algorithms|CompactOS compression|CompactOS|WIMBoot}} |
|||
Since [[Windows 10]], Microsoft has introduced new file compression scheme based on the XPRESS algorithm with 4K/8K/16K block size<ref name=ms-xca>{{cite web | url=https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-xca/a8b7cb0a-92a6-4187-a23b-5e14273b96f8 | title=[MS-XCA]: Xpress Compression Algorithm | date=31 January 2023 }}</ref> and the [[LZX]] algorithm;<ref name=wmilib-compression>{{cite web |url=https://wimlib.net/compression.html |title=wimlib: the open source Windows Imaging (WIM) library - Compression algorithm}}</ref> both are variants of [[LZ77]] updated with [[Huffman encoding|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.<ref name=compactos>{{cite web |title=Compact OS, single-instancing, and image optimization |url=https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/compact-os |publisher=Microsoft |access-date=1 October 2019 |language=en-us}}</ref> CompactOS is not an extension of NTFS file compression and does not use the 'compressed' attribute; instead, it sets a [[NTFS reparse point#System compression|reparse point]] on each compressed file with a WOF (Windows Overlay Filter) tag,<ref name=oldnewthing-wof>{{cite web |author=Raymond Chen |url=https://devblogs.microsoft.com/oldnewthing/20190618-00/?p=102597 |title=What is WofCompressedData? Does WOF mean that Windows is a dog? |website=Microsoft DevBlogs| date=18 June 2019 }}</ref> but the actual data is stored in an alternate data stream named "WofCompressedData", which is decompressed on-the-fly by a WOF [[Installable File System|filesystem filter]] driver, and the main file is an empty [[sparse file]].<ref name=oldnewthing-wof/> This design is meant purely for read-only access, so any writes to compressed files result in an automatic decompression.<ref name=oldnewthing-wof/><ref>{{cite web |last=Biggers |first=Eric |title= NTFS-3G plugin for reading "system compressed" files |url=https://github.com/ebiggers/ntfs-3g-system-compression |website=GitHub |accessdate=1 October 2019 |date=29 April 2019}}</ref><ref>{{cite web |title=Re: [ntfs-3g-devel] Experimental support for Windows 10 "System Compressed" files |url=https://sourceforge.net/p/ntfs-3g/mailman/message/34481588/ |website=SourceForge.net |accessdate=1 October 2019}}</ref> |
|||
CompactOS compression is intended for [[OEM]]s who prepare OS images with the {{code|/compact}} flag of the [[DISM|{{code|DISM}} tool]] in [[Windows Assessment and Deployment Kit|Windows ADK]],<ref>{{cite web | url=https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/what-is-dism | title=DISM Overview | date=15 December 2021 }}</ref> but it can also be manually turned on per file with the {{code|/exe}} flag of the {{code|compact}} command.<ref name=compact-reference>{{cite web | url=https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/compact | title=Compact | date=3 February 2023 }}</ref> CompactOS algorithm avoids [[Fragmentation (computing)|file fragmentation]] by writing compressed data in contiguously allocated chunks, unlike core NTFS compression.{{Citation needed|date=October 2020}} |
|||
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 [[Windows Imaging Format|compressed WIM image]] on a separate hidden [[disk partition]].<ref name=wimboot>{{cite web |url=https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-8.1-and-8/dn594399(v=win.10) |title=Windows Image File Boot (WIMBoot) Overview|date=10 March 2015 }}</ref> Similarly to CompactOS, Windows system directories only contain [[sparse file]]s 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.<ref name=oldnewthing-wof/> |
|||
=== Sparse files === |
=== Sparse files === |
||
[[File:Sparse file (en).svg|thumb|A sparse file: Empty bytes don't need to be saved, thus they can be represented by [[metadata]].]] |
[[File:Sparse file (en).svg|thumb|A sparse file: Empty bytes don't need to be saved, thus they can be represented by [[metadata]].]] |
||
[[File:One Petabyte of Files (Windows 10 Professional).png|thumb|One [[petabyte]] (1,125,899,906,842,624 bytes) of sparse files, 0 bytes on disk.]] |
|||
[[Sparse file]]s 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.<ref>{{ |
[[Sparse file]]s 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.<ref>{{cite web|title=Sparse Files|url=http://msdn.microsoft.com/en-us/library/windows/desktop/aa365564%28v=vs.85%29.aspx|work=[[MSDN]]|publisher=[[Microsoft]]|access-date=21 October 2013|date=12 October 2013}}</ref> 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.<ref>{{ |
Database applications, for instance, may use sparse files.<ref>{{cite web|last=Kandoth|first=Suresh B.|title=Sparse File Errors: 1450 or 665 due to file fragmentation: Fixes and Workarounds|url=http://blogs.msdn.com/b/psssql/archive/2009/03/04/sparse-file-errors-1450-or-665-due-to-file-fragmentation-fixes-and-workarounds.aspx|work=CSS SQL Server Engineers|publisher=[[Microsoft]]|access-date=21 October 2013|date=4 March 2009|archive-url=https://web.archive.org/web/20131021122654/http://blogs.msdn.com/b/psssql/archive/2009/03/04/sparse-file-errors-1450-or-665-due-to-file-fragmentation-fixes-and-workarounds.aspx|archive-date=21 October 2013|url-status=dead}}</ref> As with compressed files, the actual sizes of sparse files are not taken into account when determining quota limits.<ref>{{cite web|title=Sparse Files and Disk Quotas|url=http://msdn.microsoft.com/en-us/library/aa365565.aspx|work=[[MSDN Library]]|publisher=[[Microsoft]]|access-date=21 October 2013|date=12 October 2013}}</ref> |
||
=== Volume Shadow Copy === |
=== Volume Shadow Copy === |
||
The [[Shadow Copy|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.<ref name="techBlog2007" /> |
|||
The [[Shadow Copy|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. On heavily loaded systems, Microsoft recommends setting up a shadow copy volume on a separate disk.<ref>{{ cite web | url=http://technet.microsoft.com/en-us/library/cc728305.aspx | title=Designing a Shadow Copy Strategy | work=[[Microsoft TechNet#Library|TechNet Library]] |publisher=[[Microsoft]] | accessdate=2008-01-15 |date=28 March 2003}}</ref> |
|||
=== Transactions === |
=== Transactions === |
||
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.<ref>{{cite web|url=http://msdn2.microsoft.com/en-us/library/aa363764.aspx|title=Transactional NTFS|work=[[MSDN]]|publisher=[[Microsoft]]|access-date=2007-02-02|archive-url=https://web.archive.org/web/20070221050736/http://msdn2.microsoft.com/en-us/library/aa363764.aspx|archive-date=2007-02-21|url-status=dead}}</ref> |
|||
As of Windows Vista, applications can use [[Transactional NTFS]] (TxF) to group changes to files together into a transaction. The transaction will guarantee that all changes happen, or none of them do, and it will guarantee that applications outside the transaction will not see the changes until they are committed.<ref>{{ cite web|url=http://msdn2.microsoft.com/en-us/library/aa363764.aspx|title=Transactional NTFS|work=[[MSDN]]|publisher=[[Microsoft]]|accessdate=2007-02-02}}</ref> |
|||
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 [[Common Log File System|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). |
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 [[Common Log File System|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 [[Distributed Transaction Coordinator|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 |
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 [[Distributed Transaction Coordinator|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 |
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".<ref name=NTFS-TxF>{{cite web |title=Transactional NTFS (TxF)|url=https://learn.microsoft.com/en-us/windows/win32/fileio/transactional-ntfs-portal|website=[[Microsoft Docs]]|date=20 July 2022 |publisher=Microsoft|access-date=12 August 2023|ref=42}}</ref> |
||
=== Encryption === |
|||
{{Main|Encrypting File System}} |
|||
[[Encrypting File System]] (EFS) provides strong<ref>{{ cite web | url=http://technet.microsoft.com/en-us/magazine/2007.02.securitywatch.aspx | title=Security Watch Deploying EFS: Part 1 | first=John | last=Morello | work=Technet Magazine | publisher=[[Microsoft]] | date=February 2007 | accessdate=2009-01-25 }}</ref> and user-transparent encryption of any file or folder on an NTFS volume. EFS works in conjunction with the EFS service, Microsoft's [[Cryptographic Application Programming Interface|CryptoAPI]] and the EFS File System Run-Time Library (FSRTL). |
|||
EFS works by encrypting a file with a bulk [[symmetric key algorithm|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 algorithm|asymmetric key]] cipher is used. The symmetric key that is used to encrypt the file is then encrypted with a [[public key cryptography|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 file header. 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.<ref>{{cite web|title=How EFS Works|url=http://technet.microsoft.com/library/Cc962103|work=Windows 2000 Resource Kit|publisher=[[Microsoft]]|accessdate=25 February 2014}}</ref> 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; 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. |
|||
=== Quotas === |
=== Quotas === |
||
[[Disk quota]]s 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|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. |
|||
[[Disk quota]]s 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 === |
=== Reparse points === |
||
{{Main|NTFS reparse point}} |
{{Main|NTFS reparse point}} |
||
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 [[NTFS symbolic link|symbolic link]]s, [[NTFS junction point|directory junction point]]s and [[NTFS volume mount point|volume mount point]]s. When the [[Object Manager (Windows)|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. |
|||
== Limitations == |
|||
=== Resizing === |
=== Resizing === |
||
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 [[pagefile#Windows NT|page file]], the index of [[Windows Search]], and any [[#Volume Shadow Copy|Shadow Copy]] used by [[System Restore]]. Various third-party tools are capable of resizing NTFS partitions. |
|||
=== OneDrive === |
|||
Starting with [[Windows Vista]] Microsoft added the built-in ability to shrink or expand a partition, but this capability is limited because it will not relocate page file fragments or files that have been marked as unmovable. So shrinking will often require relocating or disabling any [[Pagefile#Windows NT|page file]], the index of [[Windows Search]], and any [[#Volume Shadow Copy|Shadow Copy]] used by [[System Restore]]. Various third-party tools are capable of resizing NTFS partitions. |
|||
Since 2017, Microsoft requires the OneDrive file structure to reside on an NTFS disk.<ref>{{cite web |url=https://support.microsoft.com/en-us/office/unable-to-open-content-synced-in-a-onedrive-folder-on-an-external-drive-d38a7d5e-c099-4b72-8d84-3f62f2efc929 |title=Unable to open content synced in a OneDrive folder on an external drive |work=Microsoft Support |access-date=2021-04-03}}</ref> 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.<ref name=ntfs-3g>{{cite web |last1=André |first1=Jean-Pierre |title=NTFS-3G: Junction Points, Symbolic Links and Reparse Points |url=https://jp-andre.pagesperso-orange.fr/junctions.html |website=jp-andre.pagesperso-orange.fr |date=March 1, 2019 |archive-url=https://web.archive.org/web/20220828054508/https://jp-andre.pagesperso-orange.fr/junctions.html |archive-date=Aug 28, 2022 |url-status=dead}}</ref> |
|||
== |
== Structure == |
||
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. |
|||
[[File:NTPermissions.png|thumb|right|150px|NTFS filesystem permissions on a [[Windows Vista]] system]] |
|||
Internally, NTFS uses [[B |
Internally, NTFS uses [[B-tree]]s to index file system data. A [[journaling file system|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.<ref>{{cite web |title=Chapter 18 – Choosing a File System|url=https://technet.microsoft.com/library/cc750355.aspx|work=MS Windows NT Workstation 4.0 Resource Guide|date=20 February 2014 |publisher=[[Microsoft]]|access-date=25 February 2014}}</ref> |
||
NTFS allows any sequence of 16-bit values for name encoding (file names, stream names |
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 [[Integer (computer science)#Short integer|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 <code>[[#Master File Table|$MFT]]</code>, <code>$MFTMirr</code>, <code>$LogFile</code>, <code>$Volume</code>, <code>$AttrDef</code>, <code>.</code> (dot), <code>$Bitmap</code>, <code>$Boot</code>, <code>$BadClus</code>, <code>$Secure</code>, <code>$UpCase</code>, and <code>$Extend</code>.<ref name="How NTFS Works"/> <code>.</code> (dot) and <code>$Extend</code> 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.<ref>{{cite web |title=Naming Files, Paths, and Namespaces|url=http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx#naming_conventions|work=[[MSDN]]|publisher=[[Microsoft]]|access-date=25 February 2014|at=Naming Conventions}}</ref> |
||
=== {{Anchor|PBS}} Partition Boot Sector === |
=== {{Anchor|PBS}} Partition Boot Sector (PBS) === |
||
{{clear}} |
|||
{| class="wikitable sortable" |
{| class="wikitable sortable plainrowheaders" |
||
|+ NTFS boot sector contents<ref>{{cite web|url=http://www.ntfs.com/ntfs-partition-boot-sector.htm|title=NTFS. Partition Boot Sector|website=Ntfs.com |access-date=22 September 2018}}</ref><ref>{{cite web|url=https://technet.microsoft.com/en-us/library/cc976796.aspx|title=Boot Sector|website=Technet.microsoft.com |at=Table 1.13 BPB and Extended BPB Fields on NTFS Volumes |date=September 11, 2008 |access-date=22 September 2018}}</ref> (All values except strings are stored in [[endianness|little endian]] order.) |
|||
|+ NTFS Boot Sector contents |
|||
! scope="col" | Byte offset |
|||
! Byte Offset !! Field length !! Typical Value !! Field Name !! Purpose |
|||
! scope="col" | Field length |
|||
! scope="col" | Typical value |
|||
! colspan="2" |Field name |
|||
! scope="col" | Purpose |
|||
|- |
|- |
||
| 0x00 |
! scope="row" | 0x00 |
||
| 3 bytes |
| 3 bytes |
||
| 0xEB5290 |
| 0xEB5290 |
||
| colspan="2" |x86 [[JMP (x86 instruction)|JMP]] and [[NOP (code)#Machine_language_instructions|NOP]] instructions |
|||
| JMP instruction |
|||
| Causes execution to continue after the data structures in this boot sector. |
| Causes execution to continue after the data structures in this boot sector. |
||
|- |
|- |
||
| 0x03 |
! scope="row" | 0x03 |
||
| 8 bytes |
| 8 bytes |
||
| |
| "<code>NTFS    </code>"<br /><small>Word "NTFS" followed by four trailing spaces (0x20)</small> |
||
| OEM ID |
| colspan="2" |OEM ID |
||
| This is the magic |
| This is the magic number that indicates this is an NTFS file system. |
||
|- |
|- |
||
| 0x0B |
! scope="row" | 0x0B |
||
| 2 bytes |
|style='background: #ADD8E6'| 2 bytes |
||
|style='background: #ADD8E6'| 0x0200 |
|||
| 0x0002 |
|||
| rowspan="11" style="background: #ADD8E6" | BPB |
|||
| Bytes per sector |
|||
|style='background: #ADD8E6'| Bytes per sector |
|||
| How many bytes are in a sector? 0x0002 = 512 bytes |
|||
|style='background: #ADD8E6'| The number of bytes in a disk sector. |
|||
|- |
|- |
||
| 0x0D |
! scope="row" | 0x0D |
||
| 1 byte |
|style='background: #ADD8E6'| 1 byte |
||
|style='background: #ADD8E6'| 0x08 |
|||
| 0x08 |
|||
| Sectors Per Cluster |
|style='background: #ADD8E6'| Sectors Per Cluster |
||
|style='background: #ADD8E6'| 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. |
|||
| How many sectors are in a cluster? |
|||
|- |
|||
| 0x0E |
|||
| 2 bytes |
|||
| 0x0000 |
|||
| Reserved Sectors |
|||
| How much space is reserved by the OS. Not specified as to where in the reference cited. |
|||
|- |
|- |
||
! scope="row" | 0x0E |
|||
| 0x10 |
|||
| |
|style='background: #ADD8E6'| 2 bytes |
||
|style='background: #ADD8E6'| 0x0000 |
|||
| 0x000000 |
|||
|style='background: #ADD8E6'| Reserved Sectors, unused |
|||
| Unused |
|||
|style='background: #ADD8E6'| |
|||
| This field is always 0 |
|||
|- |
|- |
||
! scope="row" | 0x10 |
|||
| 0x13 |
|||
| |
|style='background: #ADD8E6'| 3 bytes |
||
|style='background: #ADD8E6'| 0x000000 |
|||
| 0x0000 |
|||
|style='background: #ADD8E6'| Unused |
|||
| Unused by NTFS |
|||
| This field is always 0 |
|style='background: #ADD8E6'| This field is always 0 |
||
|- |
|- |
||
! scope="row" | 0x13 |
|||
| 0x15 |
|||
|style='background: #ADD8E6'| 2 bytes |
|||
| 1 byte |
|||
|style='background: #ADD8E6'| 0x0000 |
|||
| 0xF8 |
|||
|style='background: #ADD8E6'| Unused by NTFS |
|||
| Media Descriptor |
|||
|style='background: #ADD8E6'| This field is always 0 |
|||
| Not specified in reference cited. |
|||
|- |
|- |
||
! scope="row" | 0x15 |
|||
| 0x16 |
|||
|style='background: #ADD8E6'| 1 byte |
|||
| 2 bytes |
|||
|style='background: #ADD8E6'| 0xF8 |
|||
| 0x0000 |
|||
|style='background: #ADD8E6'| Media Descriptor |
|||
| Unused |
|||
|style='background: #ADD8E6'| The type of drive. 0xF8 is used to denote a hard drive (in contrast to the several sizes of floppy). |
|||
| This field is always 0 |
|||
|- |
|- |
||
! scope="row" | 0x16 |
|||
| 0x18 |
|||
| 2 bytes |
|style='background: #ADD8E6'| 2 bytes |
||
|style='background: #ADD8E6'| 0x0000 |
|||
| 0x3F00 |
|||
|style='background: #ADD8E6'| Unused |
|||
| Sectors Per Track |
|||
|style='background: #ADD8E6'| This field is always 0 |
|||
| How many sectors are there per track? |
|||
|- |
|- |
||
! scope="row" | 0x18 |
|||
| 0x1A |
|||
| 2 bytes |
|style='background: #ADD8E6'| 2 bytes |
||
|style='background: #ADD8E6'| 0x003F |
|||
| 0xFF00 |
|||
|style='background: #ADD8E6'| Sectors Per Track |
|||
| Number Of Heads |
|||
|style='background: #ADD8E6'| The number of disk sectors in a drive track. |
|||
| How many magnetic read-write heads are there in this drive? |
|||
|- |
|- |
||
! scope="row" | 0x1A |
|||
| 0x1C |
|||
| |
|style='background: #ADD8E6'| 2 bytes |
||
|style='background: #ADD8E6'| 0x00FF |
|||
| 0x3F000000 |
|||
|style='background: #ADD8E6'| Number Of Heads |
|||
| Hidden Sectors |
|||
|style='background: #ADD8E6'| The number of heads on the drive. |
|||
| How many hidden sectors are there? Location not specified in reference cited. |
|||
|- |
|- |
||
! scope="row" | 0x1C |
|||
| 0x20 |
|||
| 4 bytes |
|style='background: #ADD8E6'| 4 bytes |
||
|style='background: #ADD8E6'| 0x0000003F |
|||
| 0x00000000 |
|||
|style='background: #ADD8E6'| Hidden Sectors |
|||
| Unused |
|||
|style='background: #ADD8E6'| The number of sectors preceding the partition. |
|||
| Not used by NTFS |
|||
|- |
|- |
||
! scope="row" | 0x20 |
|||
| 0x24 |
|||
| 4 bytes |
|style='background: #ADD8E6'| 4 bytes |
||
|style='background: #ADD8E6'| 0x00000000 |
|||
| 0x80008000 |
|||
| Unused |
|style='background: #ADD8E6'| Unused |
||
| Not used by NTFS |
|style='background: #ADD8E6'| Not used by NTFS |
||
|- |
|- |
||
! scope="row" | 0x24 |
|||
| 0x28 |
|||
| |
|style='background: #ADD8FF'| 4 bytes |
||
|style='background: #ADD8FF'| 0x00800080 |
|||
| 0x4AF57F0000000000 |
|||
| rowspan="10" style="background: #ADD8FF" | EBPB |
|||
| Total sectors |
|||
|style='background: #ADD8FF'| Unused |
|||
| How many sectors are in this partition? |
|||
|style='background: #ADD8FF'| Not used by NTFS |
|||
|- |
|- |
||
! scope="row" | 0x28 |
|||
| 0x30 |
|||
| 8 bytes |
|style='background: #ADD8FF'| 8 bytes |
||
|style='background: #ADD8FF'| 0x00000000007FF54A |
|||
| 0x0400000000000000 |
|||
|style='background: #ADD8FF'| Total sectors |
|||
| $MFT cluster number |
|||
|style='background: #ADD8FF'| The partition size in sectors. |
|||
| Which cluster contains the $MFT? |
|||
|- |
|- |
||
! scope="row" | 0x30 |
|||
| 0x38 |
|||
| 8 bytes |
|style='background: #ADD8FF'| 8 bytes |
||
|style='background: #ADD8FF'| 0x0000000000000004 |
|||
| 0x54FF070000000000 |
|||
| $ |
|style='background: #ADD8FF'| $MFT cluster number |
||
| |
|style='background: #ADD8FF'| The cluster that contains the Master File Table |
||
|- |
|- |
||
! scope="row" | 0x38 |
|||
| 0x40 |
|||
| |
|style='background: #ADD8FF'| 8 bytes |
||
|style='background: #ADD8FF'| 0x000000000007FF54 |
|||
| 0xF6000000 |
|||
|style='background: #ADD8FF'| $MFTMirr cluster number |
|||
| Clusters Per File Record Segment |
|||
|style='background: #ADD8FF'| The cluster that contains a backup of the Master File Table |
|||
| How many clusters per file record segment? |
|||
|- |
|- |
||
! scope="row" | 0x40 |
|||
| 0x44 |
|||
| 1 byte |
|style='background: #ADD8FF'| 1 byte |
||
|style='background: #ADD8FF'| 0xF6 |
|||
| 0x01 |
|||
| Clusters Per |
|style='background: #ADD8FF'| Bytes or Clusters Per File Record Segment |
||
|style='background: #ADD8FF'| 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 → 2<sup>10</sup> = 1024). |
|||
| How many clusters per index buffer? |
|||
|- |
|- |
||
! scope="row" | 0x41 |
|||
| 0x45 |
|||
| 3 bytes |
|style='background: #ADD8FF'| 3 bytes |
||
| 0x000000 |
|style='background: #ADD8FF'| 0x000000 |
||
| Unused |
|style='background: #ADD8FF'| Unused |
||
| This field is not used by NTFS |
|style='background: #ADD8FF'| This field is not used by NTFS |
||
|- |
|- |
||
! scope="row" | 0x44 |
|||
| 0x48 |
|||
|style='background: #ADD8FF'| 1 byte |
|||
| 8 bytes |
|||
|style='background: #ADD8FF'| 0x01 |
|||
| 0x14A51B74C91B741C |
|||
|style='background: #ADD8FF'| Bytes or Clusters Per Index Buffer |
|||
| Volume Serial Number |
|||
|style='background: #ADD8FF'| 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." |
|||
| A unique random number assigned to this partition, to keep things organized. |
|||
|- |
|- |
||
! scope="row" | 0x45 |
|||
| 0x50 |
|||
| |
|style='background: #ADD8FF'| 3 bytes |
||
|style='background: #ADD8FF'| 0x000000 |
|||
| 0x00000000 |
|||
|style='background: #ADD8FF'| Unused |
|||
| Checksum |
|||
|style='background: #ADD8FF'| This field is not used by NTFS |
|||
| A checksum of the previous values. Algorithm not described in cited article. |
|||
|- |
|- |
||
! scope="row" | 0x48 |
|||
| 0x54 |
|||
|style='background: #ADD8FF'| 8 bytes |
|||
|style='background: #ADD8FF'| 0x1C741BC9741BA514 |
|||
|style='background: #ADD8FF'| Volume Serial Number |
|||
|style='background: #ADD8FF'| A unique random number assigned to this partition, to keep things organized. |
|||
|- |
|||
! scope="row" | 0x50 |
|||
|style='background: #ADD8FF'| 4 bytes |
|||
|style='background: #ADD8FF'| 0x00000000 |
|||
|style='background: #ADD8FF'| Checksum, unused |
|||
|style='background: #ADD8FF'| Supposedly a checksum. |
|||
|- |
|||
! scope="row" | 0x54 |
|||
| 426 bytes |
| 426 bytes |
||
| |
| |
||
| Bootstrap Code |
| colspan="2" |Bootstrap Code |
||
| The code that loads the rest of the operating system. |
| The code that loads the rest of the operating system. This is pointed to by the first 3 bytes of this sector. |
||
|- |
|- |
||
| 0x01FE |
! scope="row" | 0x01FE |
||
| 2 bytes |
| 2 bytes |
||
| |
| 0xAA55 |
||
| End-of-sector Marker |
| colspan="2" |End-of-sector Marker |
||
| This flag indicates that this is a valid boot sector. |
| This flag indicates that this is a valid boot sector. |
||
|} |
|} |
||
<ref>[http://www.ntfs.com/ntfs-partition-boot-sector.htm NTFS Partition Boot Sector] Information on structure of the boot sector.</ref> |
|||
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) and the number of bytes per sector (2 bytes found at 0x0b). This value is the byte offset to the $MFT, which is described below. |
|||
This boot partition format is roughly based upon the earlier [[File Allocation Table|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. |
|||
=== {{Anchor|MFT}} Master File Table === |
|||
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 ([[Logical block addressing|LBA]]) to the $MFT, which is described below. |
|||
In NTFS, all file, directory and [[NTFS#Metafiles|metafile]] data—file name, creation date, access permissions (by the use of [[access control list]]s), 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]] software. This also enables fast file search software such as [[Everything (software)|Everything]] or [[Ultrasearch]] to locate named local files and folders included in the MFT very fast, without requiring any other index. |
|||
=== {{Anchor|MFT}} Master File Table === <!--'Master File Table' redirects here--> |
|||
The MFT structure supports algorithms which minimize [[file system fragmentation|disk fragmentation]].<ref>{{ cite web | url=http://msdn.microsoft.com/en-us/library/windows/desktop/aa365230(v=vs.85).aspx | title=Master File Table | date=July 2, 2012 | publisher=[[Microsoft Developer Network|MSDN]] }}</ref> A directory entry consists of a filename and a "file ID", 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. |
|||
In NTFS, all file, directory and [[#Metafiles|metafile]] data—file name, creation date, access permissions (by the use of [[access control list]]s), and size—are stored as metadata in the '''Master File Table'''<!--boldface per WP:R#PLA--> ('''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 [[file system fragmentation|disk fragmentation]].<ref>{{cite web |url=http://msdn.microsoft.com/en-us/library/windows/desktop/aa365230(v=vs.85).aspx |title=Master File Table |date=July 2, 2012 |publisher=[[Microsoft Developer Network|MSDN]]}}</ref> 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. |
|||
Two copies of the MFT are stored in case of corruption. If the first record is corrupted, NTFS reads the second record to find the MFT mirror file. Locations for both files are stored in the boot sector.<ref>[http://ntfs.com/ntfs-mft.htm NTFS Master File Table (MFT)]. Information on structure of MFT file.</ref> |
|||
A partial copy of the MFT, called the MFT mirror, is stored to be used in case of corruption.<ref>{{Cite web|date=2009-06-05|title=Forensics: What is the MFT Mirror?|url=https://whereismydata.wordpress.com/2009/06/05/forensics-what-is-the-mft-mirror/|access-date=2021-07-30|website=Where is Your Data?|language=en}}</ref> 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.<ref>{{cite web|url=http://ntfs.com/ntfs-mft.htm|title=NTFS Master File Table (MFT)|website=Ntfs.com|access-date=22 September 2018}}</ref> |
|||
For protection, in [[Windows 7]], if you attempt to open the MFT via an Administrator [[Command Prompt]], the system will [[BSoD]] with an error code of 0x24 (NTFS_FILE_SYSTEM). In [[Windows 8]], running the same command will bring up an Open File dialogue, but all programs will show [[Access Denied]] errors. The command to "open" the MFT is <code>cd /</code> and then <code>start $mft</code>. Both commands must be run at the same time. |
|||
=== Metafiles === |
=== Metafiles === |
||
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.<ref>{{cite web |url= http://www.cse.scu.edu/~tschwarz/coen252_07Fall/Lectures/NTFS.html |title= COEN 252 Computer Forensics NTFS |publisher= Faculty of Organization and Informatics University of Zagreb |last= Schwarz |first= Thomas |access-date=May 30, 2019|archive-url=https://web.archive.org/web/20210227190756/http://www.cse.scu.edu/~tschwarz/coen252_07Fall/Lectures/NTFS.html|archive-date=2021-02-27|url-status=dead}}</ref> 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. |
|||
{| class="wikitable sortable plainrowheaders" |
|||
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. 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) |
|||
! scope="col" | Segment number |
|||
{| class="wikitable sortable" |
|||
! scope="col" | File name |
|||
|+ List of NTFS metafiles |
|||
! |
! scope="col" | Purpose |
||
|- |
|- |
||
! scope="row" | 0 |
|||
| 0 |
|||
| <code>$MFT</code> |
| <code>$MFT</code> |
||
| Describes all files on the volume, including file names, timestamps, stream names, and lists of cluster numbers where data streams reside, indexes, [[security identifier]]s, and file attributes like "read only", "compressed", "encrypted", etc. |
| Describes all files on the volume, including file names, timestamps, stream names, and lists of cluster numbers where data streams reside, indexes, [[security identifier]]s, and file attributes like "read only", "compressed", "encrypted", etc. |
||
|- |
|- |
||
! scope="row" | 1 |
|||
| 1 |
|||
| <code>$MFTMirr</code> |
| <code>$MFTMirr</code> |
||
| Duplicate of the first vital entries of $MFT, usually 4 entries (4 [[ |
| Duplicate of the first vital entries of {{mono|$MFT}}, usually 4 entries (4 [[kilobyte]]s). |
||
|- |
|- |
||
! scope="row" | 2 |
|||
| 2 |
|||
| <code>$LogFile</code> |
| <code>$LogFile</code> |
||
| Contains transaction log of file system metadata changes. |
| Contains transaction log of file system metadata changes. |
||
|- |
|- |
||
! scope="row" | 3 |
|||
| 3 |
|||
| <code>$Volume</code> |
| <code>$Volume</code> |
||
| 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). |
| Contains information about the volume, namely the volume object identifier, [[volume label]], file system version, and volume flags (mounted, chkdsk requested, requested {{mono|$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 {{mono|$OBJECT_ID}} record; the volume label is stored in a {{mono|$VOLUME_NAME}} record, and the remaining volume data is in a {{mono|$VOLUME_INFORMATION}} record. Note: volume serial number is stored in file {{mono|$Boot}} (below). |
||
|- |
|- |
||
! scope="row" | 4 |
|||
| 4 |
|||
| <code>$AttrDef</code> |
| <code>$AttrDef</code> |
||
| A table of MFT attributes that associates numeric identifiers with names. |
| A table of MFT attributes that associates numeric identifiers with names. |
||
|- |
|- |
||
! scope="row" | 5 |
|||
| 5 |
|||
| <code>.</code> |
| <code>.</code> |
||
| [[Root directory]]. Directory data is stored in $INDEX_ROOT and $INDEX_ALLOCATION attributes both named $I30. |
| [[Root directory]]. Directory data is stored in {{mono|$INDEX_ROOT}} and {{mono|$INDEX_ALLOCATION}} attributes both named {{mono|$I30}}. |
||
|- |
|- |
||
! scope="row" | 6 |
|||
| 6 |
|||
| <code>$Bitmap</code> |
| <code>$Bitmap</code> |
||
| An array of bit entries: each bit indicates whether its corresponding cluster is used (allocated) or free (available for allocation). |
| An array of bit entries: each bit indicates whether its corresponding cluster is used (allocated) or free (available for allocation). |
||
|- |
|- |
||
! scope="row" | 7 |
|||
| 7 |
|||
| <code>$Boot</code> |
| <code>$Boot</code> |
||
| [[Volume boot record]]. This file is always located at the first clusters on the volume. It contains [[bootstrap code]] (see [[NTLDR]]/[[ |
| [[Volume boot record]] (VBR). This file is always located at the first clusters on the volume. It contains [[Bootstrapping#Computing|bootstrap code]] (see [[NTLDR]]/[[Windows Boot Manager|BOOTMGR]]) and a [[BIOS parameter block]] including a [[volume serial number]] and cluster numbers of {{mono|$MFT}} and {{mono|$MFTMirr}}. |
||
|- |
|- |
||
! scope="row" | 8 |
|||
| 8 |
|||
| <code>$BadClus</code> |
| <code>$BadClus</code> |
||
| A file that contains all the clusters marked as having [[bad sector]]s. 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. |
| A file that contains all the clusters marked as having [[bad sector]]s. 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 {{mono|$Bad}} and contains all clusters on the volume not in the first stream. |
||
|- |
|- |
||
! scope="row" | 9 |
|||
| 9 |
|||
| <code>$Secure</code> |
| <code>$Secure</code> |
||
| [[Access control list]] database that reduces overhead having many identical ACLs stored with each file, by uniquely storing these ACLs in this database |
| [[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: {{mono|$SII}} ''(Standard_Information ID)'' and {{mono|$SDH}} ''([[Security Descriptor]] Hash)'', which index the stream named {{mono|$SDS}} containing actual ACL table).<ref name="insidewin2kntfs"/> |
||
|- |
|- |
||
| 10 |
! scope="row" | 10 |
||
| <code>$UpCase</code> |
| <code>$UpCase</code> |
||
| A table of unicode uppercase characters for ensuring case-insensitivity in Win32 and DOS namespaces. |
| A table of unicode uppercase characters for ensuring case-insensitivity in Win32 and DOS namespaces. |
||
|- |
|- |
||
| 11 |
! scope="row" | 11 |
||
| <code>$Extend</code> |
| <code>$Extend</code> |
||
| A |
| A file system directory containing various optional extensions, such as {{mono|$Quota}}, {{mono|$ObjId}}, {{mono|$Reparse}} or {{mono|$UsnJrnl}}. |
||
|- |
|- |
||
| 12–23 |
! scope="row" | 12–23 |
||
| colspan=2 | |
| colspan=2 |Reserved for {{mono|$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 |
! scope="row" | 24 |
||
| <code>$Extend\$Quota</code> |
| <code>$Extend\$Quota</code> |
||
| Holds disk quota information. Contains two index roots, named $O and $Q. |
| Holds disk quota information. Contains two index roots, named {{mono|$O}} and {{mono|$Q}}. |
||
|- |
|- |
||
| 25 |
! scope="row" | 25 |
||
| <code>$Extend\$ObjId</code> |
| <code>$Extend\$ObjId</code> |
||
| Holds [[#Distributed Link Tracking (DLT)|link tracking]] information. Contains an index root and allocation named $O. |
| Holds [[#Distributed Link Tracking (DLT)|link tracking]] information. Contains an index root and allocation named {{mono|$O}}. |
||
|- |
|- |
||
| 26 |
! scope="row" | 26 |
||
| <code>$Extend\$Reparse</code> |
| <code>$Extend\$Reparse</code> |
||
| Holds [[reparse point]] data (such as [[symbolic link]]s). Contains an index root and allocation named $R. |
| Holds [[reparse point]] data (such as [[symbolic link]]s). Contains an index root and allocation named {{mono|$R}}. |
||
|- |
|- |
||
! scope="row" | 27– |
|||
| 27— |
|||
| colspan=2 | |
| colspan=2 |Beginning of regular file entries. |
||
|} |
|} |
||
These metafiles are treated specially by Windows and are difficult to directly view: special purpose-built tools are needed. |
These metafiles are treated specially by Windows, handled directly by the <code>NTFS.SYS</code> driver and are difficult to directly view: special purpose-built tools are needed.{{efn|Since Windows XP, it is very difficult to view a listing of these files: they exist in the root directory's index, but the Win32 interface filters them out. In NT 4.0, the command line <code>dir</code> command would list the metafiles in the root directory if <code>/a</code> were specified. In Windows 2000, {{code|2=dosbatch|dir /a}} stopped working, but {{code|2=dosbatch|dir /a \$MFT}} worked.}} 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: {{code|nfi.exe c:\$MFT}}<ref name="support.microsoft.com">{{cite web |title= OEM Support Tools Phase 3 Service Release 2 Availability |url= http://support.microsoft.com/kb/253066/ |publisher= Microsoft Corporation |date= 2007-02-21 |quote= Windows NT File System (NTFS) File Sector Information Utility ... A tool used to dump information about an NTFS volume |access-date= 2010-06-16|archive-url= https://web.archive.org/web/20150223112102/http://support.microsoft.com/kb/253066/en-us |archive-date=2015-02-23}}</ref> Another way to bypass the restriction is to use [[7-Zip]]'s file manager and go to the low-level NTFS path <code>\\.\X:\</code> (where <code>X:\</code> resembles any drive/partition). Here, 3 new folders will appear: <code>$EXTEND</code>, <code>[DELETED]</code> (a pseudo-folder that 7-Zip uses to attach files deleted from the file system to view), and <code>[SYSTEM]</code> (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 Card]]s, etc.) inside Windows, but doing this on the active partition requires offline access (namely [[WinRE]]). |
||
=== Attribute lists, attributes, and streams === |
=== Attribute lists, attributes, and streams === |
||
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 {{mono|$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. |
|||
For each file (or directory) described in the MFT record, there's 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. |
|||
According to {{mono|$AttrDef}}, some attributes can be either resident or non-resident. The {{mono|$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. |
* 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 |
* 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. |
* 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 $STANDARD_INFORMATION attribute that is stored as a fixed-size record and |
** This is the case for the {{mono|$STANDARD_INFORMATION}} attribute that is stored as a fixed-size record and contains the [[timestamp]]s and other basic single-bit attributes (compatible with those managed by [[File Allocation Table|FAT]] in DOS or [[Windows 9x]]). |
||
* Some attribute types cannot have a name and must remain anonymous. |
* 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 |
** 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 |
** 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 descriptor]]s 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 |
* The default data stream of a regular file is a stream of type {{mono|$DATA}} but with an anonymous name, and the ADSs are similar but must be named. |
||
* On the |
* On the other hand, the default data stream of directories has a distinct type, but are not anonymous: they have an attribute name ("{{mono|$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".<ref name="support.microsoft.com"/> |
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".<ref name="support.microsoft.com"/> |
||
Line 419: | Line 541: | ||
=== Resident vs. non-resident attributes === |
=== Resident vs. non-resident attributes === |
||
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.<ref>{{cite web|url=http://blogs.technet.com/b/askcore/archive/2009/10/16/the-four-stages-of-ntfs-file-growth.aspx|title=The Four Stages of NTFS File Growth|access-date=22 September 2018|archive-url=https://web.archive.org/web/20180923052803/https://blogs.technet.microsoft.com/askcore/2009/10/16/the-four-stages-of-ntfs-file-growth/|archive-date=23 September 2018|url-status=dead}}</ref> 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. |
|||
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.<ref>[http://blogs.technet.com/b/askcore/archive/2009/10/16/the-four-stages-of-ntfs-file-growth.aspx blogs.technet.com: Jeff Hughes, The Four Stages of NTFS File Growth (2009)]</ref> 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. |
* 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. |
* 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. |
* 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 |
* 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 {{mono|$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 {{mono|$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 descriptor]]s), 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. |
* When there are too many attributes for a file (including ADS's, extended attributes, or [[security descriptor]]s), 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 1 |
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 {{val|1|ul=KB}} MFT record can store about 100 such data runs. However, as the {{mono|$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 {{val|10|ul=GB}}.<ref>{{cite web |url=https://support.microsoft.com/en-us/topic/a-heavily-fragmented-file-in-an-ntfs-volume-may-not-grow-beyond-a-certain-size-da1c0dfd-a5a1-90b4-4bf7-b65b13ef9d35 |title=A heavily fragmented file in an NTFS volume may not grow beyond a certain size |access-date=2021-05-19 |url-status=live |archive-url=https://web.archive.org/web/20210506185845/https://support.microsoft.com/en-us/topic/a-heavily-fragmented-file-in-an-ntfs-volume-may-not-grow-beyond-a-certain-size-da1c0dfd-a5a1-90b4-4bf7-b65b13ef9d35 |archive-date=2021-05-06}}</ref> |
||
The NTFS |
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 |
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 {{val|74.5|u=GB}} partition NTFS formats with 19,543,064 clusters of {{val|4|u=KB}}. Subtracting system files (a {{val|64|ul=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 === |
=== Opportunistic locks === |
||
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.<ref>{{cite web |url=http://msdn.microsoft.com/en-us/library/cc308442.aspx |title=How Oplocks function in the Windows Environment: Overview |access-date=2018-12-19 |url-status=dead |archive-url=https://web.archive.org/web/20100823125612/http://msdn.microsoft.com/en-us/library/cc308442.aspx |archive-date=2010-08-23}}</ref> Oplocks apply to the given open stream of a file and do not affect oplocks on a different stream. |
|||
Opportunistic locks (oplocks) allow clients to alter their buffering strategy for a given file or stream in order to increase performance and reduce network use.<ref>http://msdn.microsoft.com/en-us/library/cc308442.aspx</ref> 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. |
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: |
Windows supports four different types of oplocks: |
||
* Level 2 (or shared) oplock: multiple readers, no writers (i.e. read caching). |
* 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). |
* Level 1 (or exclusive) oplock: exclusive access with arbitrary buffering (i.e. read and write caching). |
||
Line 447: | Line 565: | ||
* 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) |
* 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.<ref> |
Opportunistic locks have been enhanced in Windows 7 and Windows Server 2008 R2 with per-client oplock keys.<ref>{{cite web|url=https://technet.microsoft.com/en-us/library/ff383236(WS.10).aspx|title=What's New in NTFS|website=Technet.microsoft.com|date=2 July 2012 |access-date=22 September 2018}}</ref> |
||
=== Time === |
=== Time === |
||
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|reason=UTC seems unlikely, as it relies on leap seconds, which Windows is known not to do|date=February 2020}} |
|||
For historical reasons, the versions of Windows that do not support NTFS all keep time internally as local zone time, and therefore so do all file systems – other than NTFS – that are supported by current versions of Windows. This means that when files are copied or moved between NTFS and non-NTFS 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.<ref>{{cite web |url=https://www.codeproject.com/Articles/1144/Beating-the-Daylight-Savings-Time-Bug-and-Getting |title=Beating the Daylight Saving Time bug and getting correct file modification times |first=Jonathan |last=Gilligan |date=28 May 2001 |website=The Code Project}}</ref> |
|||
Windows NT and its descendants keep internal timestamps as [[UTC]] and make the appropriate conversions for display purposes. Therefore, NTFS timestamps are in UTC. |
|||
For historical reasons, the versions of Windows that do not support NTFS all keep time internally as local zone time, and therefore so do all file systems other than NTFS that are supported by current versions of Windows. This means that when files are copied or moved between NTFS and non-NTFS 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.<ref>"[http://www.codeproject.com/datetime/dstbugs.asp Beating the Daylight Savings Time bug and getting correct file modification times]" ''The Code Project''</ref> |
|||
== Interoperability == |
|||
While the different NTFS versions are for the most part fully [[forward compatibility|forward]]- and [[backward compatibility|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 "Previous Versions" (a.k.a. [[Volume Shadow Copy]]) on an operating system that does not support it will result in the contents of those previous versions being lost.<ref>{{ cite web | url=http://blogs.technet.com/filecab/archive/2006/07/14/441829.aspx | title=How restore points and other recovery features in Windows Vista are affected when dual-booting with Windows XP | author=cfsbloggers |date=July 14, 2006 | work=The Filing Cabinet | accessdate=2007-03-21 }}</ref> A Windows command-line utility called [[Convert (command)|convert.exe]] can convert supporting file systems to NTFS, including [[High Performance File System|HPFS]] (only on Windows NT 3.1, 3.5, and 3.51), [[File Allocation Table|FAT16]] and FAT32 (on Windows 2000 and later).<ref>{{ cite web |url=http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/convertfat.mspx |title=How to Convert FAT Disks to NTFS |accessdate=2007-08-27 |date=2001-10-25 |publisher=Microsoft Corporation}}</ref><ref>{{ cite web |url=http://support.microsoft.com/kb/214579 |title=How to use Convert.exe to convert a partition to the NTFS file system |accessdate=2010-12-26 |date=2007-02-12 |publisher=Microsoft Corporation}}</ref> |
|||
[[Mac OS X Panther|Mac OS X 10.3]] and later include read-only support for NTFS-formatted partitions. The [[GNU General Public License|GPL]]-licensed [[NTFS-3G]] also works on Mac OS X through [[Filesystem in Userspace|FUSE]] and allows reading and writing to NTFS partitions. A performance enhanced commercial version, called ''[[Tuxera]] NTFS for Mac'',<ref>{{ cite web |url=http://www.tuxera.com/products/tuxera-ntfs-for-mac/ |title=Tuxera NTFS for Mac |date=August 30, 2011 |accessdate=September 20, 2011 |publisher=Tuxera}}</ref> is also available from the NTFS-3G developers. [[Paragon Software Group]] sells a read-write driver named ''NTFS for Mac OS X'',<ref>{{ cite web |url=http://www.paragon-software.com/home/ntfs-mac/release.html |title=NTFS for Mac OS X, communication channel between Mac OS X and Windows |date= |accessdate=September 20, 2011 |publisher=Paragon Software Group}}</ref> which is also included on some models of [[Seagate Technology|Seagate]] hard drives.<ref>[http://www.seagate.com/ww/v/index.jsp?locale=en-US&name=goflex-software&vgnextoid=11c1fab114b48210VgnVCM1000001a48090aRCRD Seagate Read/Write NTFS driver for Mac OS X]</ref> Native NTFS write support has been discovered in [[Mac OS X Snow Leopard|Mac OS X 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 panic]]s, probably the reason why write support has not been enabled or advertised.<ref>{{ cite web |url=http://smokingapples.com/software/tutorials/snow-leopards-hidden-ntfs-readwrite-support/ |title=Snow Leopard's hidden NTFS read/write support |author=Alvares, Milind |date=October 2, 2009 |accessdate=18 September 2010}}</ref> |
|||
[[Linux kernel]] versions 2.2.0 and later include the ability to read NTFS partitions; kernel versions 2.6.0 and later contain a driver written by Anton Altaparmakov ([[University of Cambridge]]) and Richard Russon which supports file read, overwrite and resize. Three [[userspace]] drivers (NTFSMount, [[NTFS-3G]] and [[Captive NTFS]], a 'wrapping' driver that uses Windows' own driver, <tt>ntfs.sys</tt>) exist for NTFS support. They are built on the [[Filesystem in Userspace]] (FUSE), a Linux kernel module tasked with bridging userspace and kernel code to save and retrieve data. All three are licensed under the terms of the [[GNU General Public License]] (GPL). Due to the complexity of internal NTFS structures, both the built-in 2.6.14 kernel driver and the FUSE drivers disallow changes to the volume that are considered unsafe, to avoid corruption. Two proprietary solutions also exist: |
|||
* Tuxera NTFS — A high-performance read/write commercial kernel driver, mainly targeted for embedded devices from [[Tuxera]], which also develops [[NTFS-3G]]; |
|||
* NTFS for Linux — A commercial driver with full read/write support from [[Paragon Software Group]]. |
|||
[[eComStation]], and [[FreeBSD]] offer read-only NTFS support (there is a beta NTFS driver that allows write/delete for eComStation, but is generally considered unsafe). A free third-party tool for [[BeOS]], which was based on NTFS-3G, allows full NTFS read and write. [[NTFS-3G]] also works on Mac OS X, FreeBSD, NetBSD, Solaris, [[QNX]] and [[Haiku (operating system)|Haiku]], in addition to Linux, through [[Filesystem in Userspace|FUSE]].<ref>{{ cite web|url=http://www.ntfs-3g.org/|title=NTFS-3G Stable Read/Write Driver|date=2009-07-25}}</ref> A free for personal use read/write driver for [[MS-DOS]] called "NTFS4DOS" also exists.<ref>{{Wayback|url=http://www.free-av.com/en/tools/11/avira_ntfs4dos_personal.html|title=Avira NTFS4DOS Personal|date=20100619161828}}</ref><ref>[http://www.softpedia.com/progDownload/Avira-NTFS4DOS-Personal-Download-104314.html Download of NTFS4DOS.EXE NTFS driver for DOS at Softpedia.com]</ref> [[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. [[OpenBSD]] offer native read-only NTFS support by default on i386 and amd64 platforms as of version 4.9 released 1 May 2011.<ref>http://openbsd.com/49.html</ref> Read/write support through [[NTFS-3G]] are possible in OpenBSD -current as of 1 November 2013 (first release is OpenBSD 5.5 on 1 May 2014) as [[OpenBSD]] henceforth has its own [[Filesystem in Userspace|FUSE]] implementation <ref>{{ cite web|url=http://undeadly.org/cgi?action=article&sid=20131108082749&mode=expanded&count=2 |title=OpenBSD adds fuse(4) support for adding file systems in userland |publisher=[[OpenBSD Journal]] |date=2013-11-08 |accessdate=2013-11-08}}</ref> and [[NTFS-3G]] is available from [[Ports collection|ports]].<ref>{{cite web |url= http://ports.su/sysutils/ntfs-3g |title= ntfs_3g-2014.2.15 – FUSE NTFS driver with read/write support |work= [[OpenBSD ports]] |date= 2014-01-05 |accessdate= 2015-02-14 }}</ref> |
|||
== See also == |
|||
==See also== |
|||
* [[Comparison of file systems]] |
* [[Comparison of file systems]] |
||
* [[NTFSDOS]] |
* [[NTFSDOS]] |
||
* [[ntfsresize]] |
* [[ntfsresize]] |
||
* [[WinFS]] (a canceled Microsoft filesystem) |
|||
* [[ReFS]], a newer Microsoft filesystem |
|||
== |
==Notes== |
||
{{Notelist}} |
|||
==References== |
|||
{{reflist|30em}} |
|||
{{Reflist}} |
|||
== |
==Further reading== |
||
{{Refbegin}} |
|||
* {{cite journal |last1=Bolosky |first1=William J. |last2=Corbin |first2=Scott |last3=Goebel |first3=David |last4=Douceur |first4=John R. |url=https://www.microsoft.com/en-us/research/publication/single-instance-storage-in-windows-2000/ |title=Single Instance Storage in Windows 2000 |journal=Proceedings of 4th USENIX Windows Systems Symposium |date=January 2000}} |
|||
* {{cite book |last= Custer |first= Helen |title= Inside the Windows NT File System |year= 1994 |publisher= [[Microsoft Press]] |isbn= 978-1-55615-660-1 |url= https://archive.org/details/insidewindowsntf00cust }} |
|||
* {{cite book |last= Nagar |first= Rajeev |year= 1997 |title= Windows NT File System Internals: A Developer's Guide |publisher= [[O'Reilly Media|O'Reilly]] |isbn= 978-1-56592-249-5 |url= https://archive.org/details/windowsntfilesys00naga }} |
|||
* {{Cite web |url=https://technet.microsoft.com/en-us/library/cc758691(WS.10).aspx |title= NTFS Technical Reference |work=[[Microsoft TechNet]] |publisher=[[Microsoft]] |date=28 March 2003}} |
|||
{{Refend}} |
|||
==External links== |
|||
{{refbegin}} |
|||
* [https://www.kernel.org/doc/html/latest/filesystems/ntfs3.html NTFS3] |
|||
* {{cite journal|last1=Bolosky |first1=William J. |last2=Corbin |first2=Scott |last3=Goebel |first3=David |last4=Douceur |first4=John R. |url=http://research.microsoft.com/pubs/74261/WSS2000.pdf|title=Single Instance Storage in Windows 2000|publisher=Microsoft|format=PDF|date=2 December 2008}} |
|||
* [https://www.paragon-software.com/home/ntfs3-driver-faq/ NTFS3 source code] |
|||
* {{cite book |last= Custer |first= Helen |title= Inside the Windows NT File System |year= 1994 | publisher= [[Microsoft Press]] |isbn= 978-1-55615-660-1}} |
|||
* {{cite book |last=Nagar |first= Rajeev |year=1997 |title= Windows NT File System Internals: A Developer's Guide |publisher= [[O'Reilly Media|O'Reilly]] |isbn= 978-1-56592-249-5 }} |
|||
{{refend}} |
|||
{{Microsoft Windows components}} |
|||
== External links == |
|||
{{File systems}} |
|||
* [http://technet.microsoft.com/en-us/library/cc758691(WS.10).aspx Microsoft: NTFS Technical Reference] |
|||
* [http://technet.microsoft.com/en-us/library/cc788058(WS.10).aspx Microsoft: Fsutil file] (documentation for line command useful for manipulating or creating files in an NTFS volume from Windows) |
|||
* [http://www.ntfs.com/ LSoft Technologies: NTFS.com] (documentation and resources) |
|||
{{Windows Components}} |
|||
{{Filesystem}} |
|||
[[Category:1993 software]] |
|||
[[Category:Compression file systems]] |
[[Category:Compression file systems]] |
||
[[Category:File systems supported by the Linux kernel]] |
|||
[[Category:Windows disk file systems]] |
[[Category:Windows disk file systems]] |
||
[[Category:1993 software]] |
Latest revision as of 20:41, 27 November 2024
Developer(s) | Microsoft |
---|---|
Full name | NT File System[2] |
Introduced | July 27, 1993Windows NT 3.1 | with
Partition IDs | 0x07 (MBR) EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (GPT) |
Structures | |
Directory contents | B-tree variant[3][4] |
File allocation | Bitmap |
Bad blocks | $BadClus (MFT Record) |
Limits | |
Max volume size | 264 clusters − 1 cluster (format); 256 TB[a] − 64 KB[a] (Windows 10 version 1703, Windows Server 2016 or earlier implementation)[5] 8 PB[a] − 2 MB[a] (Windows 10 version 1709, Windows Server 2019 or later implementation)[6] |
Max file size | 16 EB[a] − 1 KB (format); 16 TB − 64 KB (Windows 7, Windows Server 2008 R2 or earlier implementation)[5] 256 TB − 64 KB (Windows 8, Windows Server 2012 or later implementation)[7] 8 PB − 2 MB (Windows 10 version 1709, Windows Server 2019 or later implementation)[6] |
Max no. of files | 4,294,967,295 (232−1)[5] |
Max filename length | 255 UTF-16 code units[8] |
Allowed filename characters | |
Features | |
Dates recorded | Creation, modification, POSIX change, access |
Date range | 1 January 1601 – 14 Sept 30828 (File times are 64-bit positive signed numbers[9] counting 100-nanosecond intervals (ten million per second) since 1601, which is more than 32,000 years) |
Date resolution | 100 ns |
Forks | Yes (see § Alternate data stream (ADS) below) |
Attributes | Read-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 deduplication | Yes (Windows Server 2012)[10] |
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.[11][12][2]
It was developed to overcome scalability, security and other limitations with FAT.[13] 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.[14] NTFS read/write support is available on Linux and BSD using NTFS3 in Linux and NTFS-3G in BSD.[15][16]
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]
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.[17] The original NTFS developers were Tom Miller, Gary Kimura, Brian Andrew, and David Goebel.[18]
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[14] | 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.[19] |
1.1 | Windows NT 3.5 | 1994 | Named streams and access control lists[20] | 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.[21] |
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).[22][23]
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.[24] 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)[6] 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,[25][26] 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[b] support.[27] GPT data disks are supported on systems with BIOS.
The NTFS maximum theoretical limit on the size of individual files is 16 EB[a][28] (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.[6]
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 "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.[29] 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).[30][31]
FreeBSD
[edit]FreeBSD 3.2 released in May 1999 included read-only NTFS support written by Semen Ustimenko.[32][33] This implementation was ported to NetBSD by Christos Zoulas and Jaromir Dolecek and released with NetBSD 1.5 in December 2000.[34] 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.[update][35][33]
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;[36] 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.[37][38][36] 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.[39] 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.[40]
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,[41] Solaris, QNX, and Haiku[42] 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.[43]
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.[44]
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.[45] 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.[46]
Paragon Software Group sells a read-write driver named NTFS for Mac,[47] which is also included on some models of Seagate hard drives.[48]
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.[49][50]
DOS
[edit]There is a free-for-personal-use read/write driver for MS-DOS by Avira called "NTFS4DOS".[51][52]
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]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.[53] 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.[53]
Encryption
[edit]Encrypting File System (EFS) provides user-transparent encryption of any file or folder on an NTFS volume.[54] 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.[55] 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; 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 |
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.[56]
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.[57] This journal can be enabled or disabled on non-system volumes.[58]
Hard links
[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.[59]
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) you will also receive this cached information, in addition to the name and inode. However, you 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.[60] 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. You can always obtain up-to-date data using GetFileInformationByHandle (which is the true equivalent of POSIX stat 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 1024 hard links on a file.[61]
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[62] 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.[63]
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.[64] 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".[65][66] Without deep modifications to the source code, all Chromium (e.g. Google Chrome) and Firefox-based web browsers also write the Zone.Identifier
stream to downloaded files. As of Windows 10, the contents of the Zone.Identifer
stream are structured like an INI file (i.e. a key-value store) that includes the keys HostIpAddress
, HostUrl
, and ReferrerUrl
. To some extent, these are implementation-defined fields, but they typically contain the domain name and exact URL of the original online download location, potentially offering a deeply esoteric method of tracking browsing history with concomitant privacy risks.[67] If the downloaded file is executable (e.g. an installer), the Zone
ADS can be used for reflection, enabling the program to identify where it was downloaded from, which may occasionally be used for telemetry and/or security purposes, whereby a program can attempt to verify that it was downloaded from an official source (assuming the stream has not been removed or spoofed) and can transmit the information back over the internet (an example of this in action is BiglyBT's installer).
Malware has used alternate data streams to hide code.[68] 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.[69]
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).[70] 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.[71] 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.[72]
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.[73]
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.[74]
Disadvantages
[edit]Large compressible files become highly fragmented since every chunk smaller than 64 KB becomes a fragment.[74][75] 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.
If system files that are needed at boot time (such as drivers, NTLDR, winload.exe, or BOOTMGR) are compressed, the system may fail to boot correctly, because decompression filters are not yet loaded.[76][failed verification] Later editions of Windows[which?] 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[77] and the LZX algorithm;[78] 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.[79] 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,[80] 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.[80] This design is meant purely for read-only access, so any writes to compressed files result in an automatic decompression.[80][81][82]
CompactOS compression is intended for OEMs who prepare OS images with the /compact
flag of the DISM
tool in Windows ADK,[83] but it can also be manually turned on per file with the /exe
flag of the compact
command.[84] 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.[85] 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.[80]
Sparse files
[edit]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.[86] 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.[87] As with compressed files, the actual sizes of sparse files are not taken into account when determining quota limits.[88]
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.[29]
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.[89]
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".[90]
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.
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.[91] 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.[92]
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.[93]
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
.[5] .
(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.[94]
Partition Boot Sector (PBS)
[edit]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.[97] 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.[98] 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.[99]
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.[100] 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.
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).[20] |
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.[c] 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
[101] 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".[101]
Windows system calls may handle alternate data streams.[5] Depending on the operating system, utility and remote file system, a file transfer might silently strip data streams.[5] 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.[5]
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.[102] 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 1 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.[103]
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.[104] 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.[105]
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 do all file systems – other than NTFS – that are supported by current versions of Windows. This means that when files are copied or moved between NTFS and non-NTFS 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.[106]
See also
[edit]- Comparison of file systems
- NTFSDOS
- ntfsresize
- WinFS (a canceled Microsoft filesystem)
- ReFS, a newer Microsoft filesystem
Notes
[edit]- ^ a b c d e f g h i j 1 byte = 8 bits
1 KB = 1,024 bytes
1 MB = 1,048,576 bytes
1 GB = 1,073,741,824 bytes
1 TB = 1,099,511,627,776 bytes
1 PB = 1,125,899,906,842,624 bytes
1 EB = 1,152,921,504,606,846,976 bytes - ^ Can also be 32-bit, provided that the firmware and operating system loader are size-matched.
- ^ Since Windows XP, it is very difficult to view a listing of these files: they exist in the root directory's index, but the Win32 interface filters them out. In NT 4.0, the command line
dir
command would list the metafiles in the root directory if/a
were specified. In Windows 2000,dir /a
stopped working, butdir /a \$MFT
worked.
References
[edit]- ^ a b Karresand, Martin; Axelsson, Stefan; Dyrkolbotn, Geir Olav (2019-07-01). "Using NTFS Cluster Allocation Behavior to Find the Location of User Data". Digital Investigation. 29: –51–S60. doi:10.1016/j.diin.2019.04.018. hdl:11250/2631756. ISSN 1742-2876. S2CID 199004263.
- ^ a b "Glossary". [MS-EFSR]: Encrypting File System Remote (EFSRPC) Protocol. Microsoft. 14 November 2013.
- ^ "How NTFS Works". TechNet. Microsoft. 8 October 2009. Retrieved 2 December 2017.
- ^ "B*Trees - NTFS Directory Trees - Concept - NTFS Documentation". flatcap.org. Archived from the original on 2019-05-13. Retrieved 2019-05-13.
- ^ a b c d e f g "How NTFS Works". Windows Server 2003 Technical Reference. 2003-03-28. Retrieved 2011-09-12.
- ^ a b c d "Appendix A: Product Behavior". [MS-FSA]: File System Algorithms. Microsoft. 2018-09-12. Retrieved 2018-10-01.
NTFS uses a default cluster size of 4 KB, a maximum cluster size of 64 KB on Windows 10 v1703 operating system and Windows Server 2016 and prior, and 2 MB on Windows 10 v1709 operating system and Windows Server 2019 and later, and a minimum cluster size of 512 bytes.
- ^ "Appendix A: Product Behavior". [MS-FSA]: File System Algorithms. Microsoft. 14 November 2013. Retrieved 2012-09-21.
- ^ a b Russon, Richard; Fledel, Yuval. "NTFS Documentation" (PDF). Archived (PDF) from the original on 2022-10-09. Retrieved 2011-06-26.
- ^ "SYSTEMTIME structure (minwinbase.h)". Microsoft. October 5, 2021. Retrieved January 7, 2024.
- ^ Rick Vanover (14 September 2011). "Windows Server 8 data deduplication". Archived from the original on 2016-07-18. Retrieved 2011-12-02.
- ^ Sammes, Tony; Jenkinson, Brian, eds. (2007), "The New Technology File System", Forensic Computing, London: Springer, pp. 215–275, doi:10.1007/978-1-84628-732-9_6, ISBN 978-1-84628-732-9, retrieved 2024-08-14
- ^ Weiss, David (2022-08-01). "What Is NTFS and How Does It Work?". Datto. Retrieved 2024-08-14.
- ^ "New Technology File System - an overview | ScienceDirect Topics". www.sciencedirect.com. Retrieved 2024-08-14.
- ^ a b Custer, Helen (1994). Inside the Windows NT File System. Microsoft Press. ISBN 978-1-55615-660-1.
- ^ "NTFS3 — The Linux Kernel documentation". www.kernel.org. Retrieved 2021-12-02.
- ^ "ntfs-3g". www.freebsd.org. Retrieved 2021-12-02.
- ^ Kozierok, Charles (14 February 2018). "Overview and History of NTFS". The PC Guide. Retrieved May 30, 2019.
- ^ Custer, Helen (1994). Inside the Windows NT File System. Microsoft Press. p. vii. ISBN 978-1-55615-660-1.
- ^ "Recovering Windows NT After a Boot Failure on an NTFS Drive". Microsoft. November 1, 2006.
- ^ a b Russinovich, Mark (30 June 2006). "Inside Win2K NTFS, Part 1". MSDN. Microsoft. Retrieved 2008-04-18.
- ^ "What's New in Windows NT 4.0 Service Pack 4?". Microsoft.com. 12 January 1999. Archived from the original on 17 January 1999. Retrieved 17 August 2018.
- ^ "New Capabilities and Features of the NTFS 3.1 File System". Microsoft. 1 December 2007. Archived from the original on Nov 16, 2006.
- ^ "NTFS Overview". LSoft Technologies Inc.
- ^ Loveall, John (2006). "Storage improvements in Windows Vista and Windows Server 2008" (PowerPoint). Microsoft. pp. 14–20. Retrieved 2007-09-04.
- ^ "Windows support for hard disks that are larger than 2 TB". Microsoft Learn. 2013-06-26. Retrieved 2024-08-08.
- ^ "Default cluster size for NTFS, FAT, and exFAT". Microsoft Support. Archived from the original on 2024-03-09.
- ^ "Booting from GPT". Rodsbooks.com. Retrieved 22 September 2018.
- ^ "NTFS vs FAT vs exFAT - NTFS.com". www.ntfs.com. Retrieved 2021-01-19.
- ^ a b cfsbloggers (July 14, 2006). "How restore points and other recovery features in Windows Vista are affected when dual-booting with Windows XP". The Filing Cabinet. Archived from the original on 2006-07-18. Retrieved 2007-03-21.
- ^ "How to Convert FAT Disks to NTFS". Microsoft. 18 December 2017. Retrieved May 30, 2019.
- ^ "FAQ: How to use Convert.exe to convert a partition to the NTFS file system". The Educationsl University of Hong Kong. 2007-02-12. Archived from the original on 2023-12-06. Retrieved 2010-12-26.
- ^ "FreeBSD 3.2 Release Notes". 17 May 1999. Retrieved 2020-06-15.
- ^ a b "mount_ntfs - OpenBSD manual pages". Retrieved 2020-06-15.
- ^ "Announcing NetBSD 1.5". 6 December 2000. Retrieved 2020-06-15.
- ^ "OpenBSD 4.9". Openbsd.com. Retrieved 22 September 2018.
- ^ a b "NTFS Credits and History". Linux-NTFS Project. Archived from the original on 2021-09-24. Retrieved 2021-09-24.
- ^ "Kernel development". lwn.net. 2 May 2002. Retrieved 2021-09-05.
- ^ "Release notes for v2.5.11". 29 April 2002. Retrieved 2021-09-05.
- ^ "2.6.15 changelog". Linux project. 3 January 2006. Retrieved 2021-09-05.
- ^ Anderson, Tim (2021-09-06). "GitHub merges 'useless garbage' says Linus Torvalds as new NTFS support added to Linux kernel 5.15". The Register. Retrieved 2021-09-07.
- ^ "OpenBSD adds fuse(4) support for adding file systems in userland". OpenBSD Journal. 2013-11-08. Retrieved 2013-11-08.
- ^ "NTFS-3G Stable Read/Write Driver". 2009-07-25.
- ^ "Tuxera NTFS for Mac". Tuxera. August 30, 2011. Retrieved September 20, 2011.
- ^ "Jan Kratochvil: Captive: The first free NTFS read/write filesystem for GNU/Linux". Retrieved 2020-06-15.
- ^ "About Tuxera". Retrieved 2020-06-15.
- ^ "10.6: Enable native NTFS read/write support". 1 October 2009. Archived from the original on 5 September 2021. Retrieved 5 September 2021.
- ^ "Microsoft NTFS for Mac". Paragon Software Group. Retrieved August 8, 2024.
- ^ "The Leader in Mass Data Storage Solutions | Seagate US". Seagate.com. Archived from the original on February 10, 2011.
- ^ "NTFS plugin for NetDrive". ecsoft2.org. Retrieved 2020-09-09.
- ^ "NetDrive for OS/2". arcanoae.com. Retrieved 2020-09-09.
- ^ "Avira NTFS4DOS Personal". Archived from the original on June 19, 2010. Retrieved 2009-07-25.
- ^ "Download Avira NTFS4DOS Personal 1.9". Archived from the original on 10 November 2013. Retrieved 22 September 2018.
- ^ a b "How Security Descriptors and Access Control Lists Work". TechNet. Microsoft. Retrieved 4 September 2015.
- ^ Morello, John (February 2007). "Security Watch Deploying EFS: Part 1". Technet Magazine. Microsoft. Retrieved 2009-01-25.
- ^ "How EFS Works". Windows 2000 Resource Kit. Microsoft. 18 July 2012. Retrieved 25 February 2014.
- ^ "Windows 8 volume compatibility considerations with prior versions of Windows". 17 January 2024. Retrieved 2024-08-08.
- ^ "Change Journals". Microsoft Docs. 7 January 2021. Retrieved 2023-08-12.
- ^ "Creating, Modifying, and Deleting a Change Journal (Windows)". Microsoft Docs. 7 January 2021. Retrieved 2023-08-12.
- ^ "Chapter 29 – POSIX Compatibility". MS Windows NT Workstation 4.0 Resource Guide. Microsoft. 1995. Retrieved 21 October 2013.
- ^ "Hard Links and Junctions". MSDN. Microsoft. 12 October 2013. Retrieved 21 October 2013.
- ^ "MSDN – CreateHardLink function". Retrieved 14 January 2016.
- ^ "Streams - Sysinternals". Microsoft Docs. 23 March 2021. Retrieved 12 August 2023.
- ^ "FileSystem Provider". Microsoft. 9 August 2012. Archived from the original on 23 January 2015. Retrieved 23 January 2015.
- ^ Russinovich, Mark E.; Solomon, David A.; Ionescu, Alex (2009). "File Systems". Windows Internals (5th ed.). Microsoft Press. p. 921. ISBN 978-0-7356-2530-3.
One component in Windows that uses multiple data streams is the Attachment Execution Service[...] depending on which zone the file was downloaded from [...] Windows Explorer might warn the user
- ^ Boyd, Christopher (26 October 2022). "Malformed signature trick can bypass Mark of the Web". Malwarebytes. Retrieved 2023-05-15.
- ^ DHB-MSFT (28 February 2023). "Macros from the internet are blocked by default in Office - Deploy Office". learn.microsoft.com. Retrieved 2023-05-15.
- ^ https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms537183(v=vs.85)?redirectedfrom=MSDN
- ^ "Malware utilising Alternate Data Streams?". AusCERT Web Log. 21 August 2007. Archived from the original on 2011-02-23.
- ^ https://github.com/fafalone/ZoneStripper
- ^ "File Compression and Decompression". MSDN Platform SDK: File Systems. Retrieved 2005-08-18.
- ^ "The Default Cluster Size for the NTFS and FAT File Systems". Microsoft. January 31, 2002. Retrieved 2012-01-10.
- ^ "How NTFS Works". 2003-03-28. Retrieved 2011-10-24.
- ^ Masiero, Manuel (2011-12-01). "Should You Compress Data On Your SSD?". Tom's Hardware. Bestofmedia Group. Retrieved 2013-04-05.
- ^ a b Middleton, Dennis. "Understanding NTFS Compression". Ntdebugging Blog. Microsoft. Archived from the original on 29 June 2011. Retrieved 2011-03-16.
- ^ "Shrinking the gap: carving NTFS-compressed files". Retrieved 2011-05-29.
- ^ "Disk Concepts and Troubleshooting". Microsoft. 11 September 2008. Retrieved 2012-03-26.
- ^ "[MS-XCA]: Xpress Compression Algorithm". 31 January 2023.
- ^ "wimlib: the open source Windows Imaging (WIM) library - Compression algorithm".
- ^ "Compact OS, single-instancing, and image optimization". Microsoft. Retrieved 1 October 2019.
- ^ a b c d Raymond Chen (18 June 2019). "What is WofCompressedData? Does WOF mean that Windows is a dog?". Microsoft DevBlogs.
- ^ Biggers, Eric (29 April 2019). "NTFS-3G plugin for reading "system compressed" files". GitHub. Retrieved 1 October 2019.
- ^ "Re: [ntfs-3g-devel] Experimental support for Windows 10 "System Compressed" files". SourceForge.net. Retrieved 1 October 2019.
- ^ "DISM Overview". 15 December 2021.
- ^ "Compact". 3 February 2023.
- ^ "Windows Image File Boot (WIMBoot) Overview". 10 March 2015.
- ^ "Sparse Files". MSDN. Microsoft. 12 October 2013. Retrieved 21 October 2013.
- ^ Kandoth, Suresh B. (4 March 2009). "Sparse File Errors: 1450 or 665 due to file fragmentation: Fixes and Workarounds". CSS SQL Server Engineers. Microsoft. Archived from the original on 21 October 2013. Retrieved 21 October 2013.
- ^ "Sparse Files and Disk Quotas". MSDN Library. Microsoft. 12 October 2013. Retrieved 21 October 2013.
- ^ "Transactional NTFS". MSDN. Microsoft. Archived from the original on 2007-02-21. Retrieved 2007-02-02.
- ^ "Transactional NTFS (TxF)". Microsoft Docs. Microsoft. 20 July 2022. Retrieved 12 August 2023.
- ^ "Unable to open content synced in a OneDrive folder on an external drive". Microsoft Support. Retrieved 2021-04-03.
- ^ André, Jean-Pierre (March 1, 2019). "NTFS-3G: Junction Points, Symbolic Links and Reparse Points". jp-andre.pagesperso-orange.fr. Archived from the original on Aug 28, 2022.
- ^ "Chapter 18 – Choosing a File System". MS Windows NT Workstation 4.0 Resource Guide. Microsoft. 20 February 2014. Retrieved 25 February 2014.
- ^ "Naming Files, Paths, and Namespaces". MSDN. Microsoft. Naming Conventions. Retrieved 25 February 2014.
- ^ "NTFS. Partition Boot Sector". Ntfs.com. Retrieved 22 September 2018.
- ^ "Boot Sector". Technet.microsoft.com. September 11, 2008. Table 1.13 BPB and Extended BPB Fields on NTFS Volumes. Retrieved 22 September 2018.
- ^ "Master File Table". MSDN. July 2, 2012.
- ^ "Forensics: What is the MFT Mirror?". Where is Your Data?. 2009-06-05. Retrieved 2021-07-30.
- ^ "NTFS Master File Table (MFT)". Ntfs.com. Retrieved 22 September 2018.
- ^ Schwarz, Thomas. "COEN 252 Computer Forensics NTFS". Faculty of Organization and Informatics University of Zagreb. Archived from the original on 2021-02-27. Retrieved May 30, 2019.
- ^ a b "OEM Support Tools Phase 3 Service Release 2 Availability". Microsoft Corporation. 2007-02-21. Archived from the original on 2015-02-23. Retrieved 2010-06-16.
Windows NT File System (NTFS) File Sector Information Utility ... A tool used to dump information about an NTFS volume
- ^ "The Four Stages of NTFS File Growth". Archived from the original on 23 September 2018. Retrieved 22 September 2018.
- ^ "A heavily fragmented file in an NTFS volume may not grow beyond a certain size". Archived from the original on 2021-05-06. Retrieved 2021-05-19.
- ^ "How Oplocks function in the Windows Environment: Overview". Archived from the original on 2010-08-23. Retrieved 2018-12-19.
- ^ "What's New in NTFS". Technet.microsoft.com. 2 July 2012. Retrieved 22 September 2018.
- ^ Gilligan, Jonathan (28 May 2001). "Beating the Daylight Saving Time bug and getting correct file modification times". The Code Project.
Further reading
[edit]- Bolosky, William J.; Corbin, Scott; Goebel, David; Douceur, John R. (January 2000). "Single Instance Storage in Windows 2000". Proceedings of 4th USENIX Windows Systems Symposium.
- Custer, Helen (1994). Inside the Windows NT File System. Microsoft Press. ISBN 978-1-55615-660-1.
- Nagar, Rajeev (1997). Windows NT File System Internals: A Developer's Guide. O'Reilly. ISBN 978-1-56592-249-5.
- "NTFS Technical Reference". Microsoft TechNet. Microsoft. 28 March 2003.