尿酸高要注意什么饮食| 念珠菌和霉菌有什么区别| 库克是什么| 胃肠感冒吃什么食物比较好| 两特两重指的是什么| 肛裂是什么感觉| 舅舅和外甥女是什么关系| 前列腺炎是什么原因引起的| 空孕囊是什么原因造成的| 卡宾男装属于什么档次| 半夏微凉是什么意思| 蜂窝数据什么意思| 夜间尿多是什么原因| 肾结石什么原因引起的| 吃什么对肺部好| 肺部感染吃什么药效果好| 肿瘤手术后吃什么好| 豆浆喝多了有什么副作用| 一九九二年属什么生肖| 阳历7月15日是什么星座| 八格牙路是什么意思| 枕大池增大什么意思| 狐狸和乌鸦告诉我们什么道理| 二次元文化是什么意思| 头发掉的厉害是什么原因| 晚上吃什么水果减肥效果最好| 经行是什么意思| 牛肉粉是什么调料| 雪燕是什么| l代表什么| 脚掌发红是什么原因| amk是什么品牌| 鸡蛋和面粉可以做什么好吃的| 妇炎康片主要治什么妇科病| 女人梦见烧纸什么预兆| 羊字五行属什么| 3月15是什么星座| essence是什么意思| 6是什么意思| 碱性磷酸酶偏低是什么原因| 月经不规律吃什么药调理| 白头发多吃什么食物能变黑| 鼻子红是什么原因| 胯骨在什么位置| 胃息肉是什么原因造成的| 为什么叫白俄罗斯| 吗啡是什么| c14和c13有什么区别| 郑恺的父母是做什么的| 纺织业属于什么行业| 荷叶搭配什么一起喝减肥效果好| 甘油三酯偏高吃什么药| 梦到乌龟是什么意思| 晚上搬家有什么说法| 颈动脉斑块看什么科| 乔迁之喜送什么| 地主代表什么生肖| 浪琴名匠系列什么档次| 鸾俦是什么意思| 姜汁可乐有什么功效与作用| 不割包皮有什么影响吗| 早上吃什么| 什么是pi| 名流是什么意思| 手麻是什么引起的| 左肺下叶钙化灶是什么意思| 乳腺病人吃什么好| 五行白色属什么| 红虫是什么的幼虫| 悬壶济世是什么意思| 助力车是什么车| 795是什么意思| 姓许的女孩取什么名字好听| 梦见自己的手机丢了是什么意思| 脑供血不足吃什么药好| 常吃南瓜子有什么好处和坏处| 胃不好早餐吃什么好| c14阳性是什么意思| 相忘于江湖是什么意思| 脸上长粉刺是什么原因引起的| 麦冬是什么| 澳门是什么花| 月经量多吃什么药调理| 切片是什么意思| 老是头疼是什么原因| 高代表什么生肖| 胎儿头围偏大什么原因| 冰菜是什么菜| 用什么消肿最快| 为什么会得水痘| 蒙古族不吃什么肉| 辜负什么意思| 女生两个月没来月经是什么原因| 夏天适合吃什么菜| 淋巴细胞偏低是什么原因| 册封是什么意思| 行经是什么意思| 弱视什么意思| 曦字五行属什么| 兵戎相见是什么意思| 小人痣代表什么意思| 脚底板黄是什么原因| 梦见血是什么意思| 尿液检查白细胞高是什么原因| 新白娘子传奇许仙为什么用女的演| 风湿关节炎吃什么药| 广式腊肠炒什么菜好吃| 本科二批是什么意思| 什么叫钙化灶| 大便很黄是什么原因| 医学影像技术是什么| iwc手表是什么档次| 喝什么醒酒| 两个人一个且念什么| 什么时候闰五月| 8月23是什么星座| 九月十七日是什么星座| 感冒吃什么好| 拔掉智齿有什么影响| 人流手术前需要注意什么| 喉咙痛是什么原因引起的| 铁观音什么季节喝最好| 三番四次是什么生肖| 念珠菌是什么病| 刺史相当于现在的什么官| 神经衰弱是什么意思| 油炸食品用什么油最好| 不以为然什么意思| ca199偏高是什么意思| 小孩改姓需要什么手续| 十二生肖代表什么花| 思想包袱是什么意思| 什么是气溶胶| 什么的大娘| 什么是鬼压床| 督察是什么级别| 澳门回归是什么时候| 阴虱是什么| 红眼病滴什么眼药水| 尿道炎吃什么消炎药| 隐翅虫咬了用什么药膏| 养兰花用什么土最好| 白茶是什么茶| 工具人什么意思| 高血压吃什么助勃药好| 什么是肝硬化| 什么最解渴| 为什么同房不怀孕原因| 女为念什么| 什么球不能踢脑筋急转弯| 北京古代叫什么| 有心火是什么症状| 女人右手中指有痣代表什么| 黄山四绝是什么| 结婚十周年是什么婚| 六月十四号是什么星座| 海洋里面有什么动物| 50肩是什么意思| 梦见生小孩是什么征兆| cue什么意思| 农历五月二十四是什么日子| 空字五行属什么| 1月11是什么星座| 头胀痛吃什么药| 女人三十如狼四十如虎什么意思| 二型血糖高吃什么药好| 两肋胀满闷胀是什么病| 二甲双胍缓释片什么时候吃最好| 丝瓜不能和什么食物一起吃| 韭黄是什么| 火山为什么会喷发| 小儿肠胃炎吃什么药| 小揪揪什么意思| 四点半是什么时辰| 华为最新款手机是什么型号| 獐子是什么动物| 梦到熊是什么意思| 曲奇是什么意思| 文书是什么| 咖啡加奶有什么坏处和好处| 共济会是什么| 中性粒细胞比率偏低是什么意思| 横行霸道的意思是什么| 阿莫西林治什么病| 金黄色葡萄球菌是什么| 咳嗽有黄痰是什么原因| 腰椎穿刺是检查什么的| 贪狼是什么意思| 玉米须煮水喝有什么好处| 胃不好的人适合吃什么水果| 本来无一物何处惹尘埃是什么意思| 含蓄什么意思| 什么是基因检测| 看望病人送什么东西| 占卜什么意思| 医保自费是什么意思| 痔疮是什么病| 精梳棉是什么面料| 青海有什么特产| 炎性改变是什么意思| 皮肤长痘痘是什么原因| 口气臭吃什么能改善| 腺样体面容是什么意思| 金钱能买来什么但买不来什么| 乙肝两对半145阳性是什么意思| 马齿笕有什么功效| 摆渡人什么意思| 背后长痘是什么原因| 草果是什么| 住院医师是什么意思| 吃叶酸有什么好处| 人得了猫藓用什么药膏| 紧张手抖是什么原因| 定亲是什么意思| 内退是什么意思| 人中龙凤下一句是什么| 为什么脸上会长痘痘| 化疗后吃什么补身体| 梦见自己坐车是什么意思| 冠心病什么症状| 山楂干泡水喝有什么功效| 12点到1点是什么时辰| 插入是什么感觉| 一什么蜻蜓| 姜汁可乐有什么功效与作用| 孕早期不能吃什么| 夏至要吃什么| 动物的耳朵有什么作用| 考护士证需要什么条件| 岁月蹉跎什么意思| 牙周康又叫什么名字| 人乳头瘤病毒感染是什么意思| 补办医保卡需要什么资料| 护士一般什么学历| 乙状结肠腺瘤是什么病| 高血压头晕吃什么药| 46属什么| 圆周率是什么意思| 腌肉放什么调料| 世界上最小的国家是什么| 腿肿是什么病的前兆| 注意力不集中是什么原因| 柏拉图式恋爱是什么意思| 妈妈的爷爷叫什么| 白虎是什么| 木屐是什么意思| 五十年是什么婚| 钙过量会有什么症状| 糖化血红蛋白是查什么的| 5月14日什么星座| 甜菜根在中国叫什么| 血小板低有什么危害| naco3是什么| 秋水伊人是什么意思| 卒中是什么意思| 皮试是什么| 传宗接代是什么意思| 掉头发吃什么维生素| 骨质疏松有什么症状| 急支糖浆是什么梗| 曲高和寡什么意思| 55年出生属什么| 球蛋白偏低是什么原因| 靓女是什么意思| 百度Jump to content

西夏是什么民族

From Wikipedia, the free encyclopedia
NT File System[1]
Developer(s)Microsoft
Full nameNT File System[2]
IntroducedJuly 27, 1993; 32 years ago (2025-08-14) with Windows NT 3.1
Partition IDs0x07 (MBR)
EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (GPT)
Structures
Directory contentsB-tree variant[3][4]
File allocationBitmap
Bad blocks$BadClus (MFT Record)
Limits
Max volume size264 clusters ? 1 cluster (format);
256 TB[a] ? 64 KB[a] (Windows 10 version 1703, Windows Server 2016 or earlier implementation)[3]
8 PB[a] ? 2 MB[a] (Windows 10 version 1709, Windows Server 2019 or later implementation)[5]
Max file size16 EB[a] ? 1 KB (format);
16 TB ? 64 KB (Windows 7, Windows Server 2008 R2 or earlier implementation)[3]
256 TB ? 64 KB (Windows 8, Windows Server 2012 or later implementation)[6]
8 PB ? 2 MB (Windows 10 version 1709, Windows Server 2019 or later implementation)[5]
Max no. of files4,294,967,295 (232?1)[3]
Max filename length255 UTF-16 code units[7]
Allowed filename
characters
  • In Win32 namespace: any UTF-16 code unit (case-insensitive) except /\:*"?<>| as well as NUL[7]
  • In POSIX namespace: any UTF-16 code unit (case-sensitive) except / as well as NUL
Features
Dates recordedCreation, modification, POSIX change, access
Date range1 January 1601 – 14 Sept 30828 or 28 May 60056 (File times are 64-bit numbers counting 100-nanosecond intervals (ten million per second) from 1601)[b]
Date resolution100 ns
ForksYes (see § Alternate data stream (ADS) below)
AttributesRead-only, hidden, system, archive, not content indexed, off-line, temporary, compressed, encrypted
File system
permissions
ACLs
Transparent
compression
Per-file, LZ77 (Windows NT 3.51 onward)
Transparent
encryption
Per-file,
DESX (Windows 2000 onward),
Triple DES (Windows XP onward),
AES (Windows XP Service Pack 1, Windows Server 2003 onward)
Data deduplicationYes (Windows Server 2012)[8]
Other
Supported
operating systems
Windows NT 3.1 and later
Mac OS X 10.3 and later (read-only)
Linux kernel version 2.6 and later
Linux kernel versions 2.2–2.4 (read-only)
FreeBSD
NetBSD
OpenBSD (read-only)
ChromeOS
Solaris
ReactOS (read-only)
百度 【品牌资讯】环球网荣获第六届中国财经峰会“杰出品牌形象奖”2017-07-2110:30(环球网7月21日讯)7月19日,环球网在以中国经济新图景:转型与变革为主题的第六届财经峰会上,荣获2017杰出品牌形象奖。

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

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

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

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

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

History

[edit]

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

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

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

Versions

[edit]

Microsoft has released five versions of NTFS:

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

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

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

Scalability

[edit]

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

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

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

Interoperability

[edit]

Windows

[edit]

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

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

FreeBSD

[edit]

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

Linux

[edit]

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

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

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

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

macOS

[edit]

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

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

OS/2

[edit]

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

DOS

[edit]

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

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

Security

[edit]

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

Access control lists (ACLs)

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

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

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

Encryption

[edit]

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

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

Features

[edit]

Journaling

[edit]

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

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

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

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

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

[edit]

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

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

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

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

Alternate data stream (ADS)

[edit]

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

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

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

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

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

File compression

[edit]

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

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

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

Advantages

[edit]

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

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

Disadvantages

[edit]

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

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.[74][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[75] and the LZX algorithm;[76] both are variants of LZ77 updated with Huffman entropy coding and range coding, which LZNT1 lacked. These compression algorithms were taken from Windows Imaging Format (WIM file).

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

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

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

Sparse files

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

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

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

Volume Shadow Copy

[edit]

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

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

Transactions

[edit]

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

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

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

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

Quotas

[edit]

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

Reparse points

[edit]

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

Date and time

[edit]

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

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

[7]

Limitations

[edit]

Resizing

[edit]

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

OneDrive

[edit]

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

Structure

[edit]

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

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

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

Partition Boot Sector (PBS)

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

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

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

Master File Table

[edit]

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

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

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

Metafiles

[edit]

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

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

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

Attribute lists, attributes, and streams

[edit]

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

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

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

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

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

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

Resident vs. non-resident attributes

[edit]

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

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

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

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

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

Opportunistic locks

[edit]

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

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

Windows supports four different types of oplocks:

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

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

Time

[edit]

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

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

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

See also

[edit]

Notes

[edit]
  1. ^ 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
  2. ^ a b ntfs-3g interprets it as signed integer while ntfs3 as unsigned, though the latter seems more probable given that the signed value will either roll over into well Before Christ in the year 30828 if negative values are allowed, or become a de-facto 63-bit unsigned integer if only positive values are allowed, wasting the space for one bit. Given that NTFS is proprietary and largely only known through reverse-engineering, Microsoft has not publicly stated which is intended. ntfsdoc.pdf doesn't specify it either. But it won't make a difference until the year 30828 anyway.
  3. ^ Can also be 32-bit, provided that the firmware and operating system loader are size-matched.
  4. ^ 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, but dir /a \$MFT worked.

References

[edit]
  1. ^ a b Karresand, Martin; Axelsson, Stefan; Dyrkolbotn, Geir Olav (2025-08-14). "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.
  2. ^ a b "Glossary". [MS-EFSR]: Encrypting File System Remote (EFSRPC) Protocol. Microsoft. 14 November 2013.
  3. ^ a b c d e f g h i "How NTFS Works". Windows Server 2003 Technical Reference. Microsoft. 8 October 2009. Retrieved 25 January 2025.
  4. ^ "B*Trees – NTFS Directory Trees – Concept – NTFS Documentation". flatcap.org. Archived from the original on 2025-08-14. Retrieved 2025-08-14.
  5. ^ a b c d "Appendix A: Product Behavior". [MS-FSA]: File System Algorithms. Microsoft. 2025-08-14. Retrieved 2025-08-14. 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.
  6. ^ "Appendix A: Product Behavior". [MS-FSA]: File System Algorithms. Microsoft. 14 November 2013. Retrieved 2025-08-14.
  7. ^ a b c Russon, Richard; Fledel, Yuval. "NTFS Documentation" (PDF). Archived (PDF) from the original on 2025-08-14. Retrieved 2025-08-14.
  8. ^ Rick Vanover (14 September 2011). "Windows Server 8 data deduplication". Archived from the original on 2025-08-14. Retrieved 2025-08-14.
  9. ^ "The New Technology File System". Forensic Computing. 2007. pp. 215–275. doi:10.1007/978-1-84628-732-9_6. ISBN 978-1-84628-397-0.
  10. ^ Weiss, David (2025-08-14). "What Is NTFS and How Does It Work?". Datto. Retrieved 2025-08-14.
  11. ^ Hassan, Nihad Ahmad; Hijazi, Rami (2017). "Data Hiding Under Windows? OS File Structure". Data Hiding Techniques in Windows OS. pp. 97–132. doi:10.1016/B978-0-12-804449-0.00004-X. ISBN 978-0-12-804449-0.
  12. ^ a b Custer, Helen (1994). Inside the Windows NT File System. Microsoft Press. ISBN 978-1-55615-660-1.
  13. ^ "NTFS3 — The Linux Kernel documentation". www.kernel.org. Retrieved 2025-08-14.
  14. ^ "ntfs-3g". www.freebsd.org. Retrieved 2025-08-14.
  15. ^ Arch Linux - ntfs-3g 2022.10.3-1 (x86_64)
  16. ^ Kozierok, Charles (14 February 2018). "Overview and History of NTFS". The PC Guide. Retrieved May 30, 2019.
  17. ^ Custer, Helen (1994). Inside the Windows NT File System. Microsoft Press. p. vii. ISBN 978-1-55615-660-1.
  18. ^ "Recovering Windows NT After a Boot Failure on an NTFS Drive". Microsoft. November 1, 2006.
  19. ^ a b Russinovich, Mark (30 June 2006). "Inside Win2K NTFS, Part 1". Microsoft Learn. Microsoft. Retrieved 2025-08-14.
  20. ^ "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.
  21. ^ "New Capabilities and Features of the NTFS 3.1 File System". Microsoft. 1 December 2007. Archived from the original on Nov 16, 2006.
  22. ^ "NTFS Overview". LSoft Technologies Inc.
  23. ^ Loveall, John (2006). "Storage improvements in Windows Vista and Windows Server 2008" (PowerPoint). Microsoft. pp. 14–20. Retrieved 2025-08-14.
  24. ^ "Windows support for hard disks that are larger than 2 TB". Microsoft Learn. 2025-08-14. Retrieved 2025-08-14.
  25. ^ "Default cluster size for NTFS, FAT, and exFAT". Microsoft Support. Archived from the original on 2025-08-14.
  26. ^ "Booting from GPT". Rodsbooks.com. Retrieved 22 September 2018.
  27. ^ "NTFS vs FAT vs exFAT – NTFS.com". www.ntfs.com. Retrieved 2025-08-14.
  28. ^ 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 2025-08-14. Retrieved 2025-08-14.
  29. ^ "How to Convert FAT Disks to NTFS". Karl's Technology. 18 December 2017. Retrieved May 30, 2019.
  30. ^ "FAQ: How to use Convert.exe to convert a partition to the NTFS file system". The Educationsl University of Hong Kong. 2025-08-14. Archived from the original on 2025-08-14. Retrieved 2025-08-14.
  31. ^ "FreeBSD 3.2 Release Notes". 17 May 1999. Retrieved 2025-08-14.
  32. ^ a b "mount_ntfs – OpenBSD manual pages". Retrieved 2025-08-14.
  33. ^ "Announcing NetBSD 1.5". 6 December 2000. Retrieved 2025-08-14.
  34. ^ "OpenBSD 4.9". Openbsd.com. Retrieved 22 September 2018.
  35. ^ a b "NTFS Credits and History". Linux-NTFS Project. Archived from the original on 2025-08-14. Retrieved 2025-08-14.
  36. ^ "Kernel development". lwn.net. 2 May 2002. Retrieved 2025-08-14.
  37. ^ "Release notes for v2.5.11". 29 April 2002. Retrieved 2025-08-14.
  38. ^ "2.6.15 changelog". Linux project. 3 January 2006. Archived from the original on 2025-08-14. Retrieved 2025-08-14.
  39. ^ Anderson, Tim (2025-08-14). "GitHub merges 'useless garbage' says Linus Torvalds as new NTFS support added to Linux kernel 5.15". The Register. Retrieved 2025-08-14.
  40. ^ "OpenBSD adds fuse(4) support for adding file systems in userland". OpenBSD Journal. 2025-08-14. Retrieved 2025-08-14.
  41. ^ "NTFS-3G Stable Read/Write Driver". 2025-08-14.
  42. ^ "Tuxera NTFS for Mac". Tuxera. August 30, 2011. Retrieved September 20, 2011.
  43. ^ "Jan Kratochvil: Captive: The first free NTFS read/write filesystem for GNU/Linux". Retrieved 2025-08-14.
  44. ^ "About Tuxera". Retrieved 2025-08-14.
  45. ^ "10.6: Enable native NTFS read/write support". 1 October 2009. Archived from the original on 5 September 2021. Retrieved 5 September 2021.
  46. ^ "Microsoft NTFS for Mac". Paragon Software Group. Retrieved August 8, 2024.
  47. ^ "The Leader in Mass Data Storage Solutions | Seagate US". Seagate.com. Archived from the original on February 10, 2011.
  48. ^ "NTFS plugin for NetDrive". ecsoft2.org. Retrieved 2025-08-14.
  49. ^ "NetDrive for OS/2". arcanoae.com. Retrieved 2025-08-14.
  50. ^ "Avira NTFS4DOS Personal". Archived from the original on June 19, 2010. Retrieved 2025-08-14.
  51. ^ "Download Avira NTFS4DOS Personal 1.9". Archived from the original on 10 November 2013. Retrieved 22 September 2018.
  52. ^ a b "How Security Descriptors and Access Control Lists Work". Microsoft Learn. Microsoft. 8 October 2009. Retrieved 4 September 2015.
  53. ^ Morello, John (February 2007). "Security Watch Deploying EFS: Part 1". Technet Magazine. Microsoft. Retrieved 2025-08-14.
  54. ^ "How EFS Works". Windows 2000 Server Resource Kit. Microsoft. 18 July 2012. Retrieved 25 January 2025.
  55. ^ "Windows 8 volume compatibility considerations with prior versions of Windows". 17 January 2024. Retrieved 2025-08-14.
  56. ^ "Change Journals". Microsoft Learn. Microsoft. 7 January 2021. Retrieved 2025-08-14.
  57. ^ "Creating, Modifying, and Deleting a Change Journal (Windows)". Microsoft Learn. Microsoft. 7 January 2021. Retrieved 2025-08-14.
  58. ^ "Chapter 29 – POSIX Compatibility". MS Windows NT Workstation 4.0 Resource Guide. Microsoft. 1995. Retrieved 25 January 2025.
  59. ^ "Hard Links and Junctions". Microsoft Learn. Microsoft. 21 June 2024. Retrieved 25 January 2025.
  60. ^ "CreateHardLinkA function (winbase.h)". June 2023. Retrieved 25 January 2025.
  61. ^ "Streams – Sysinternals". Microsoft Learn. Microsoft. 23 March 2021. Retrieved 12 August 2023.
  62. ^ "FileSystem Provider". Microsoft. 9 August 2012. Archived from the original on 23 January 2015. Retrieved 23 January 2015.
  63. ^ 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
  64. ^ Boyd, Christopher (26 October 2022). "Malformed signature trick can bypass Mark of the Web". Malwarebytes. Retrieved 2025-08-14.
  65. ^ DHB-MSFT (28 February 2023). "Macros from the internet are blocked by default in Office – Deploy Office". Microsoft Learn. Retrieved 2025-08-14.
  66. ^ "Malware utilising Alternate Data Streams?". AusCERT Web Log. 21 August 2007. Archived from the original on 2025-08-14.
  67. ^ "Fafalone/ZoneStripper". GitHub.
  68. ^ "File Compression and Decompression". MSDN Platform SDK: File Systems. Retrieved 2025-08-14.
  69. ^ "The Default Cluster Size for the NTFS and FAT File Systems". Microsoft. January 31, 2002. Retrieved 2025-08-14.
  70. ^ Jean-Pierre André. "Data Compression". Tuxera. Archived from the original on 2025-08-14. Retrieved 25 April 2025.
  71. ^ Masiero, Manuel (2025-08-14). "Should You Compress Data On Your SSD?". Tom's Hardware. Bestofmedia Group. Retrieved 2025-08-14.
  72. ^ a b Middleton, Dennis. "Understanding NTFS Compression". Ntdebugging Blog. Microsoft. Archived from the original on 29 June 2011. Retrieved 2025-08-14.
  73. ^ "Shrinking the gap: carving NTFS-compressed files". Retrieved 2025-08-14.
  74. ^ "Disk Concepts and Troubleshooting". Microsoft. 11 September 2008. Retrieved 2025-08-14.
  75. ^ "[MS-XCA]: Xpress Compression Algorithm". 31 January 2023.
  76. ^ "wimlib: the open source Windows Imaging (WIM) library – Compression algorithm".
  77. ^ "Compact OS, single-instancing, and image optimization". Microsoft. Retrieved 1 October 2019.
  78. ^ a b c d Raymond Chen (18 June 2019). "What is WofCompressedData? Does WOF mean that Windows is a dog?". Microsoft DevBlogs.
  79. ^ Biggers, Eric (29 April 2019). "NTFS-3G plugin for reading "system compressed" files". GitHub. Retrieved 1 October 2019.
  80. ^ "Re: [ntfs-3g-devel] Experimental support for Windows 10 "System Compressed" files". SourceForge.net. Retrieved 1 October 2019.
  81. ^ "DISM Overview". 15 December 2021.
  82. ^ "Compact". 3 February 2023.
  83. ^ "Windows Image File Boot (WIMBoot) Overview". 10 March 2015.
  84. ^ "Sparse Files". Microsoft Learn. Microsoft. 7 January 2021. Retrieved 25 January 2025.
  85. ^ 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.
  86. ^ "Sparse Files and Disk Quotas". Microsoft Learn. Microsoft. 15 August 2023. Retrieved 25 January 2025.
  87. ^ "About Transactional NTFS". Microsoft Learn. Microsoft. 7 January 2021. Retrieved 2025-08-14.
  88. ^ "Transactional NTFS (TxF)". Microsoft Learn. Microsoft. 20 July 2022. Retrieved 12 August 2023.
  89. ^ Raymond Chen (2025-08-14). "Why is the Win32 epoch January 1, 1601? – The Old New Thing". Archived from the original on 2025-08-14. Retrieved 2025-08-14.
  90. ^ "Unable to open content synced in a OneDrive folder on an external drive". Microsoft Support. Retrieved 2025-08-14.
  91. ^ 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.
  92. ^ "Chapter 18 – Choosing a File System". MS Windows NT Workstation 4.0 Resource Guide. Microsoft. 20 February 2014. Retrieved 25 January 2025.
  93. ^ "Naming Files, Paths, and Namespaces". Microsoft Learn. Microsoft. 28 August 2024. Naming Conventions. Retrieved 25 January 2025.
  94. ^ "NTFS. Partition Boot Sector". Ntfs.com. Retrieved 22 September 2018.
  95. ^ "Boot Sector". Microsoft Learn. September 11, 2008. Table 1.13 BPB and Extended BPB Fields on NTFS Volumes. Retrieved 22 September 2018.
  96. ^ "Master File Table (Local File Systems)". Microsoft Learn. Microsoft. August 28, 2024.
  97. ^ "Forensics: What is the MFT Mirror?". Where is Your Data?. 2025-08-14. Retrieved 2025-08-14.
  98. ^ "NTFS Master File Table (MFT)". Ntfs.com. Retrieved 22 September 2018.
  99. ^ Schwarz, Thomas. "COEN 252 Computer Forensics NTFS". Faculty of Organization and Informatics University of Zagreb. Archived from the original on 2025-08-14. Retrieved May 30, 2019.
  100. ^ a b "OEM Support Tools Phase 3 Service Release 2 Availability". Microsoft Corporation. 2025-08-14. Archived from the original on 2025-08-14. Retrieved 2025-08-14. Windows NT File System (NTFS) File Sector Information Utility ... A tool used to dump information about an NTFS volume
  101. ^ "The Four Stages of NTFS File Growth". Archived from the original on 23 September 2018. Retrieved 22 September 2018.
  102. ^ "A heavily fragmented file in an NTFS volume may not grow beyond a certain size". Archived from the original on 2025-08-14. Retrieved 2025-08-14.
  103. ^ "How Oplocks function in the Windows Environment: Overview". Archived from the original on 2025-08-14. Retrieved 2025-08-14.
  104. ^ "What's New in NTFS". Microsoft Learn. 2 July 2012. Retrieved 25 January 2025.
  105. ^ Gilligan, Jonathan (28 May 2001). "Beating the Daylight Saving Time bug and getting correct file modification times". The Code Project.

Further reading

[edit]
[edit]
何首乌长什么样子 憩室是什么意思 9月8号是什么星座 贫血是什么 无精是什么原因造成的
九月十三是什么星座 瓜娃子是什么意思 丞相和宰相有什么区别 丝鸟读什么 北京户口有什么用
西梅不能和什么一起吃 胃出血有什么症状 什么血型最稀有 什么是甲状腺结节病 血便是什么颜色
心情烦躁吃什么药 左眼皮老跳是什么原因 疝气是什么原因引起的 什么水不能喝脑筋急转弯 自残是什么心理
北瓜是什么hcv9jop1ns6r.cn 心脏早搏吃什么药好wuhaiwuya.com ca153是什么检查项目hcv9jop2ns2r.cn 什么叫全科医生hcv8jop9ns7r.cn 1959年属什么生肖hcv9jop6ns7r.cn
血凝是什么意思hcv9jop2ns9r.cn 叹服是什么意思hcv8jop2ns7r.cn 456是什么意思hcv8jop5ns5r.cn 左下眼皮跳是什么预兆hcv9jop3ns1r.cn 男孩适合学什么专业helloaicloud.com
质量是什么hcv9jop3ns1r.cn 肠脂膜炎是什么病严重吗hcv8jop7ns1r.cn 脑梗长期吃什么药好sanhestory.com 肠梗阻是什么意思xinjiangjialails.com 什么的屏障hcv9jop6ns3r.cn
什么叫贵妃镯zhiyanzhang.com 降压药什么时间吃最好hcv7jop9ns0r.cn 有加有减先算什么hcv7jop6ns6r.cn 药吃多了会有什么后果zsyouku.com 什么情况下吃奥司他韦hcv8jop3ns6r.cn
百度