Максимальный размер файла ntfs windows xp

Максимальный размер диска: 256 терабайт. Максимальный размер файла: 256 терабайт. Максимальное количество файлов на диске: 4,294,967,295 4,294,967,295 XNUMX XNUMX. Максимальное количество файлов в одной папке: XNUMX XNUMX XNUMX XNUMX. Что такое...

Максимальный размер диска: 256 терабайт. Максимальный размер файла: 256 терабайт. Максимальное количество файлов на диске: 4,294,967,295 4,294,967,295 XNUMX XNUMX. Максимальное количество файлов в одной папке: XNUMX XNUMX XNUMX XNUMX.

Например, при использовании кластеров размером 64 КБ максимальный размер тома NTFS Windows XP составляет 256 ТБ минус 64 КБ. При использовании размера кластера по умолчанию 4 КБ максимальный размер тома NTFS составляет 16 ТБ минус 4 КБ.

Какой максимальный размер жесткого диска для Windows XP?

Ограничения емкости жестких дисков

Ограничивать Operating System
16 ТБ Windows 2000, XP, 2003 и Vista с использованием NTFS
2 ТБ Windows ME, 2000, XP, 2003 и Vista с использованием FAT32
2 ТБ Windows 2000, XP, 2003 и Vista с использованием NTFS
128 ГБ (137 ГБ) Windows 98

Какой самый большой размер файла может обрабатывать NTFS?

NTFS может поддерживать тома размером до 8 петабайт в Windows Server 2019 и новее и Windows 10 версии 1709 и новее (более старые версии поддерживают до 256 ТБ). Поддерживаемые размеры томов зависят от размера кластера и количества кластеров.

Совместима ли NTFS с Windows XP?

По умолчанию на компьютерах с Windows XP установлена ​​файловая система NTFS. Примечание. Вы можете использовать важные функции, такие как Active Directory и безопасность на основе домена, только выбрав NTFS в качестве файловой системы. Программа установки NTFS позволяет легко преобразовать ваш раздел в новую версию NTFS, даже если раньше он использовал FAT или FAT32.

Что лучше FAT32 или NTFS?

NTFS имеет большую безопасность, файловое сжатие, квоты и шифрование файлов. Если на одном компьютере установлено несколько операционных систем, лучше отформатировать некоторые тома как FAT32. … Если есть только ОС Windows, NTFS вполне подойдет. Таким образом, в компьютерной системе Windows NTFS — лучший вариант.

Поддерживает ли NTFS большие файлы?

Вы можете использовать файловую систему NTFS с операционными системами Mac OS x и Linux. … Он поддерживает большие файлы и почти не имеет реалистичного ограничения на размер раздела. Позволяет пользователю устанавливать права доступа к файлам и шифрование в качестве файловой системы с более высоким уровнем безопасности.

Какой самый большой размер нового раздела FAT32 в Windows XP?

Windows XP может монтировать и поддерживать тома FAT32 размером более 32 ГБ (с учетом других ограничений), но вы не можете создать том FAT32 размером более 32 ГБ с помощью инструмента «Формат» во время установки. Вы не можете создать файл размером более (2 ^ 32) -1 байта (это на один байт меньше 4 ГБ) в разделе FAT32.

Будет ли Windows XP распознавать жесткий диск емкостью 4 ТБ?

Чтобы использовать все 4 ТБ, вам необходимо перейти на более новую версию Windows и иметь материнскую плату, поддерживающую UEFI. Этот диск не поддерживает старые операционные системы, такие как Windows XP. Вы можете использовать этот диск в Windows XP или даже Windows 98, но вы будете ограничены первыми 2.1 ТБ.

Сколько оперативной памяти требуется системе Windows XP для работы на машине?

Для XP требуется минимум 128 МБ ОЗУ, но на самом деле у вас должно быть не менее 512 МБ. Для 7-разрядной версии Windows 32 требуется минимум 1 ГБ ОЗУ.

NTFS быстрее, чем exFAT?

Файловая система NTFS постоянно показывает лучшую эффективность и меньшее использование ресурсов ЦП и системы по сравнению с файловой системой exFAT и файловой системой FAT32, что означает, что операции копирования файлов выполняются быстрее, а для пользовательских приложений и других операций остается больше ресурсов ЦП и системы. системные задачи…

Есть ли у exFAT ограничение на размер файла?

exFAT поддерживает больший размер файла и ограничения на размер раздела, чем FAT 32. FAT 32 имеет максимальный размер файла 4 ГБ и максимальный размер раздела 8 ТБ, тогда как вы можете хранить файлы размером более 4 ГБ каждый на флэш-накопителе или SD-карте, отформатированных с помощью exFAT. Максимальный размер файла exFAT составляет 16EiB (Exbibyte).

Почему NTFS является предпочтительной файловой системой?

Производительность: NTFS допускает сжатие файлов, поэтому ваша организация может получить больше места на диске. Управление безопасным доступом: NTFS позволит вам размещать разрешения для файлов и папок, чтобы вы могли ограничить доступ к критически важным данным.

Как отформатировать USB-накопитель в Windows XP?

Войдя в систему с учетной записью администратора, подключите USB-накопитель к USB-порту. Откройте окно «Мой компьютер» (XP) или «Компьютер» (Vista / 7). Щелкните правой кнопкой мыши букву USB-накопителя Centon и выберите «Форматировать». Параметры по умолчанию подойдут.

Поддерживает ли Windows XP жесткий диск емкостью 1 ТБ?

Windows XP действительно старая и не поддерживает жесткие диски TB. Только жесткие диски ГБ. Предел, который вы можете использовать с XP, составляет 3 ГБ, если вы не хотите, чтобы два жестких диска подключились к вашему рабочему столу.

Как разбить жесткий диск на разделы в Windows XP?

Создать загрузочный раздел в Windows XP

  1. Загрузитесь в Windows XP.
  2. Нажмите кнопку Пуск.
  3. Нажмите «Выполнить».
  4. Введите compmgmt.msc, чтобы открыть Управление компьютером.
  5. Нажмите «ОК» или нажмите «Ввод».
  6. Перейдите в Управление дисками (Управление компьютером (локальное)> Хранилище> Управление дисками)
  7. Щелкните правой кнопкой мыши незанятое пространство на жестком диске и выберите «Новый раздел».
New Technology File System[1]

Developer(s) Microsoft
Full name NT File System[2]
Introduced July 1993; 29 years ago with Windows NT 3.1
Partition identifier 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 − 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. number of files 4,294,967,295 (232−1)[5]
Max. filename length 255 UTF-16 code units[8]
Allowed characters in filenames
  • In Win32 namespace: any UTF-16 code unit (case-insensitive) except /:*"?<>| as well as NUL[8]
  • In POSIX namespace: any UTF-16 code unit (case-sensitive) except / as well as NUL
  • Trailing spaces are not allowed and will be removed[9]
Features
Dates recorded Creation, modification, POSIX change, access
Date range 1 January 1601 – 28 May 60056 (File times are 63-bit numbers counting 100-nanosecond intervals (ten million per second) since 1601, which is 29,227 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)

New Technology File System (NTFS) is a proprietary journaling file system developed by Microsoft.[2][1] Starting with Windows NT 3.1, it is the default file system of the Windows NT family.[11] It superseded File Allocation Table (FAT) as the preferred filesystem on Windows and is supported in Linux and BSD as well. NTFS reading and writing support is provided using a free and open-source kernel implementation known as NTFS3 in Linux and the NTFS-3G driver in BSD.[12][13] By using the convert command, Windows can convert FAT32/16/12 into NTFS without the need to rewrite all files.[14] NTFS uses several files typically 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] Unlike FAT and High Performance File System (HPFS), NTFS supports access control lists (ACLs), filesystem encryption, transparent compression, sparse files and file system journaling. NTFS also supports shadow copy to allow backups of a system while it is running, but the functionality of the shadow copies varies between different versions of Windows.[15]

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[11] 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.51 1995 Compressed files, named streams, and access control lists[19]
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]

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.[22] 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. Because partition tables on master boot record (MBR) disks support only partition sizes up to 2 TB, multiple GUID Partition Table (GPT or «dynamic») volumes must be combined to create a single NTFS volume larger than 2 TB. 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 support.[23]

The NTFS maximum theoretical limit on the size of individual files is 16 EB[a][24] (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.[15] 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).[25][26]

FreeBSD[edit]

FreeBSD 3.2 released in May 1999 included read-only NTFS support written by Semen Ustimenko.[27][28] This implementation was ported to NetBSD by Christos Zoulas and Jaromir Dolecek and released with NetBSD 1.5 in December 2000.[29] 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.[30][28]

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;[31] 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.[32][33][31] 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.[34] 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.[35]

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,[36] Solaris, QNX, and Haiku[37] 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.[38]

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.[39]

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 with the source code found here.

Mac OS[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.[40] 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.[41]

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

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.[44][45]

DOS[edit]

There is a free-for-personal-use read/write driver for MS-DOS by Avira called «NTFS4DOS».[46][47]

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.[48] 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 he or she succeeds.[48]

Encryption[edit]

Encrypting File System (EFS) provides user-transparent encryption of any file or folder on an NTFS volume.[49] 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.[50] 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 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.[51]

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.[52] This journal can be enabled or disabled on non-system volumes.[53]

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.[54]

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.[55] 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.[56]

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»).

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. Very small ADSs (named «Zone.Identifier») are added by Internet Explorer and recently[when?] by other browsers to mark files downloaded from external sites as possibly unsafe to run; the local shell would then require user confirmation before opening them.[57] When the user indicates that they no longer want this confirmation dialog, this ADS is deleted.

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 tool called Streams[58] 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.[59]

Malware has used alternate data streams to hide code.[60] As a result, malware scanners and other special tools now check for alternate data streams.

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).[61] 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.[62] 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.[63]

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.[64]

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.[65]

Disadvantages[edit]

Large compressible files become highly fragmented since every chunk smaller than 64 KB becomes a fragment.[65][66] 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.[67][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[68] and the LZX algorithm;[69] 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.[70] 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,[71] 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.[71] This design is meant purely for read-only access, so any writes to compressed files result in an automatic decompression.[71][72][73]

CompactOS compression is intended for OEMs who prepare OS images with the /compact flag of the DISM tool in Windows ADK,[74] but it can also be manually turned on per file with the /exe flag of the compact command.[75] 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.[76] 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.[71]

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.[77] 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.[78] As with compressed files, the actual sizes of sparse files are not taken into account when determining quota limits.[79]

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.[80]

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.[81]

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».[82]

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.[83] 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.[84]

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.[85]

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.[86]

Partition Boot Sector (PBS)[edit]

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.[89] 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.[90] 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.[91]

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.[92] 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.

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.[93] 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[94] 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».[94]

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.[95] 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.[96]

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.[97] 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.[98]

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.[99]

See also[edit]

  • Comparison of file systems
  • NTFSDOS
  • ntfsresize
  • WinFS (a canceled Microsoft filesystem)
  • ReFS, a newer Microsoft filesystem

Notes[edit]

  1. ^ a b c d e f g h i 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

References[edit]

  1. ^ a b c 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. ISSN 1742-2876. S2CID 199004263. Retrieved 2021-12-01.
  2. ^ a b «Glossary». [MS-EFSR]: Encrypting File System Remote (EFSRPC) Protocol. Microsoft. 14 November 2013.
  3. ^ «How NTFS Works». TechNet. Microsoft. Retrieved 2 December 2017.
  4. ^ «B*Trees — NTFS Directory Trees — Concept — NTFS Documentation». flatcap.org. Archived from the original on 2019-05-13. Retrieved 2019-05-13.
  5. ^ a b c d e f g «How NTFS Works». Windows Server 2003 Technical Reference. 2003-03-28. Retrieved 2011-09-12.
  6. ^ 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.
  7. ^ «Appendix A: Product Behavior». [MS-FSA]: File System Algorithms. Microsoft. 14 November 2013. Retrieved 2012-09-21.
  8. ^ a b Russon, Richard; Fledel, Yuval. «NTFS Documentation» (PDF). Archived (PDF) from the original on 2022-10-09. Retrieved 2011-06-26.
  9. ^ «WineHQ Bugzilla – Bug 51808 – the issue with trailing spaces (Spaces at the end of a filename)».
  10. ^ Rick Vanover (14 September 2011). «Windows Server 8 data deduplication». Retrieved 2011-12-02.
  11. ^ a b Custer, Helen (1994). Inside the Windows NT File System. Microsoft Press. ISBN 978-1-55615-660-1.
  12. ^ «NTFS3 — The Linux Kernel documentation». www.kernel.org. Retrieved 2021-12-02.
  13. ^ «ntfs-3g». www.freebsd.org. Retrieved 2021-12-02.
  14. ^ «How to Convert a Drive from FAT32 to NTFS without Data Loss». WindowsLoop. 11 July 2021. Retrieved 8 August 2021.
  15. ^ 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. Retrieved 2007-03-21.
  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. «Inside Win2K NTFS, Part 1». MSDN. Microsoft. Retrieved 2008-04-18.
  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.
  22. ^ Loveall, John (2006). «Storage improvements in Windows Vista and Windows Server 2008» (PowerPoint). Microsoft. pp. 14–20. Retrieved 2007-09-04.
  23. ^ «Booting from GPT». Rodsbooks.com. Retrieved 22 September 2018.
  24. ^ «NTFS vs FAT vs exFAT — NTFS.com». www.ntfs.com. Retrieved 2021-01-19.
  25. ^ «How to Convert FAT Disks to NTFS». Microsoft. 18 December 2017. Retrieved May 30, 2019.
  26. ^ «How to use Convert.exe to convert a partition to the NTFS file system». Microsoft Corporation. 2007-02-12. Retrieved 2010-12-26.
  27. ^ «FreeBSD 3.2 Release Notes». 17 May 1999. Retrieved 2020-06-15.
  28. ^ a b «mount_ntfs — OpenBSD manual pages». Retrieved 2020-06-15.
  29. ^ «Announcing NetBSD 1.5». 6 December 2000. Retrieved 2020-06-15.
  30. ^ «OpenBSD 4.9». Openbsd.com. Retrieved 22 September 2018.
  31. ^ a b «NTFS Credits and History». Linux-NTFS Project. Retrieved 2021-09-05.
  32. ^ «Kernel development». lwn.net. 2 May 2002. Retrieved 2021-09-05.
  33. ^ «Release notes for v2.5.11». 29 April 2002. Retrieved 2021-09-05.
  34. ^ «2.6.15 changelog». Linux project. 3 January 2006. Retrieved 2021-09-05.
  35. ^ 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.
  36. ^ «OpenBSD adds fuse(4) support for adding file systems in userland». OpenBSD Journal. 2013-11-08. Retrieved 2013-11-08.
  37. ^ «NTFS-3G Stable Read/Write Driver». 2009-07-25.
  38. ^ «Tuxera NTFS for Mac». Tuxera. August 30, 2011. Retrieved September 20, 2011.
  39. ^ «Jan Kratochvil: Captive: The first free NTFS read/write filesystem for GNU/Linux». Retrieved 2020-06-15.
  40. ^ «About Tuxera». Retrieved 2020-06-15.
  41. ^ «10.6: Enable native NTFS read/write support». 1 October 2009. Retrieved 5 September 2021.
  42. ^ «NTFS for Mac OS X, communication channel between Mac OS X and Windows». Paragon Software Group. Retrieved September 20, 2011.
  43. ^ «The Leader in Mass Data Storage Solutions | Seagate US». Seagate.com. Archived from the original on February 10, 2011.
  44. ^ «NTFS plugin for NetDrive». ecsoft2.org. Retrieved 2020-09-09.
  45. ^ «NetDrive for OS/2». arcanoae.com. Retrieved 2020-09-09.
  46. ^ «Avira NTFS4DOS Personal». Archived from the original on June 19, 2010. Retrieved 2009-07-25.
  47. ^ «Download Avira NTFS4DOS Personal 1.9». Archived from the original on 10 November 2013. Retrieved 22 September 2018.
  48. ^ a b «How Security Descriptors and Access Control Lists Work». TechNet. Microsoft. Retrieved 4 September 2015.
  49. ^ Morello, John (February 2007). «Security Watch Deploying EFS: Part 1». Technet Magazine. Microsoft. Retrieved 2009-01-25.
  50. ^ «How EFS Works». Windows 2000 Resource Kit. Microsoft. Retrieved 25 February 2014.
  51. ^ «Windows 8 volume compatibility considerations with prior versions of Windows». Retrieved 2021-12-17.
  52. ^ «Change Journals (Windows)». MSDN. Retrieved 2010-04-16.
  53. ^ «Creating, Modifying, and Deleting a Change Journal (Windows)». MSDN. Retrieved 2010-04-16.
  54. ^ «Chapter 29 – POSIX Compatibility». MS Windows NT Workstation 4.0 Resource Guide. Microsoft. 1995. Retrieved 21 October 2013.
  55. ^ «Hard Links and Junctions». MSDN. Microsoft. 12 October 2013. Retrieved 21 October 2013.
  56. ^ «MSDN – CreateHardLink function». Retrieved 14 January 2016.
  57. ^ 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
  58. ^ «Streams — Windows Sysinternals». Technet.microsoft.com. Retrieved 22 September 2018.
  59. ^ «FileSystem Provider». Microsoft. 9 August 2012. Archived from the original on 23 January 2015. Retrieved 23 January 2015.
  60. ^ Malware utilising Alternate Data Streams? Archived 2008-07-23 at the Wayback Machine, AusCERT Web Log, 21 August 2007
  61. ^ «File Compression and Decompression». MSDN Platform SDK: File Systems. Retrieved 2005-08-18.
  62. ^ «The Default Cluster Size for the NTFS and FAT File Systems». Microsoft. January 31, 2002. Retrieved 2012-01-10.
  63. ^ «How NTFS Works». 2003-03-28. Retrieved 2011-10-24.
  64. ^ Masiero, Manuel (2011-12-01). «Should You Compress Data On Your SSD?». Tom’s Hardware. Bestofmedia Group. Retrieved 2013-04-05.
  65. ^ a b Middleton, Dennis. «Understanding NTFS Compression». Ntdebugging Blog. Microsoft. Retrieved 2011-03-16.
  66. ^ «Shrinking the gap: carving NTFS-compressed files». Retrieved 2011-05-29.
  67. ^ «Disk Concepts and Troubleshooting». Microsoft. Retrieved 2012-03-26.
  68. ^ «[MS-XCA]: Xpress Compression Algorithm».
  69. ^ wimlib: the open source Windows Imaging (WIM) library — Compression algorithm
  70. ^ «Compact OS, single-instancing, and image optimization». Microsoft. Retrieved 1 October 2019.
  71. ^ a b c d Raymond Chen.What is WofCompressedData? Does WOF mean that Windows is a dog? Microsoft DevBlogs.
  72. ^ Biggers, Eric (29 April 2019). «NTFS-3G plugin for reading «system compressed» files». GitHub. Retrieved 1 October 2019.
  73. ^ «Re: [ntfs-3g-devel] Experimental support for Windows 10 «System Compressed» files». SourceForge.net. Retrieved 1 October 2019.
  74. ^ «DISM Overview».
  75. ^ «Compact».
  76. ^ Windows Image File Boot (WIMBoot) Overview
  77. ^ «Sparse Files». MSDN. Microsoft. 12 October 2013. Retrieved 21 October 2013.
  78. ^ Kandoth, Suresh B. (4 March 2009). «Sparse File Errors: 1450 or 665 due to file fragmentation: Fixes and Workarounds». CSS SQL Server Engineers. Microsoft. Retrieved 21 October 2013.
  79. ^ «Sparse Files and Disk Quotas». MSDN Library. Microsoft. 12 October 2013. Retrieved 21 October 2013.
  80. ^ cfsbloggers (July 14, 2006). «How restore points and other recovery features in Windows Vista are affected when you dual-boot with Windows XP». The Filing Cabinet. Retrieved 2007-03-21.
  81. ^ «Transactional NTFS». MSDN. Microsoft. Retrieved 2007-02-02.
  82. ^ «Transactional NTFS (TxF)». Windows Dev Center (MSDN). Microsoft. Retrieved 24 May 2015.
  83. ^ «Unable to open content synced in a OneDrive folder on an external drive». Microsoft Support. Retrieved 2021-04-03.
  84. ^ André, Jean-Pierre (March 1, 2019). «NTFS-3G: Junction Points, Symbolic Links and Reparse Points». jp-andre.pagesperso-orange.fr.
  85. ^ «Chapter 18 – Choosing a File System». MS Windows NT Workstation 4.0 Resource Guide. Microsoft. Retrieved 25 February 2014.
  86. ^ «Naming Files, Paths, and Namespaces». MSDN. Microsoft. Naming Conventions. Retrieved 25 February 2014.
  87. ^ «NTFS. Partition Boot Sector». Ntfs.com. Retrieved 22 September 2018.
  88. ^ «Boot Sector». Technet.microsoft.com. September 11, 2008. Table 1.13 BPB and Extended BPB Fields on NTFS Volumes. Retrieved 22 September 2018.
  89. ^ «Master File Table». MSDN. July 2, 2012.
  90. ^ «Forensics: What is the MFT Mirror?». Where is Your Data?. 2009-06-05. Retrieved 2021-07-30.
  91. ^ «NTFS Master File Table (MFT)». Ntfs.com. Retrieved 22 September 2018.
  92. ^ 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.
  93. ^ 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.
  94. ^ 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
  95. ^ «The Four Stages of NTFS File Growth». Retrieved 22 September 2018.
  96. ^ «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.
  97. ^ «How Oplocks function in the Windows Environment: Overview». Archived from the original on 2010-08-23. Retrieved 2018-12-19.
  98. ^ «What’s New in NTFS». Technet.microsoft.com. Retrieved 22 September 2018.
  99. ^ «Beating the Daylight Saving Time bug and getting correct file modification times Archived 2004-11-14 at the Wayback Machine» 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.
New Technology File System[1]

Developer(s) Microsoft
Full name NT File System[2]
Introduced July 1993; 29 years ago with Windows NT 3.1
Partition identifier 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 − 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. number of files 4,294,967,295 (232−1)[5]
Max. filename length 255 UTF-16 code units[8]
Allowed characters in filenames
  • In Win32 namespace: any UTF-16 code unit (case-insensitive) except /:*"?<>| as well as NUL[8]
  • In POSIX namespace: any UTF-16 code unit (case-sensitive) except / as well as NUL
  • Trailing spaces are not allowed and will be removed[9]
Features
Dates recorded Creation, modification, POSIX change, access
Date range 1 January 1601 – 28 May 60056 (File times are 63-bit numbers counting 100-nanosecond intervals (ten million per second) since 1601, which is 29,227 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)

New Technology File System (NTFS) is a proprietary journaling file system developed by Microsoft.[2][1] Starting with Windows NT 3.1, it is the default file system of the Windows NT family.[11] It superseded File Allocation Table (FAT) as the preferred filesystem on Windows and is supported in Linux and BSD as well. NTFS reading and writing support is provided using a free and open-source kernel implementation known as NTFS3 in Linux and the NTFS-3G driver in BSD.[12][13] By using the convert command, Windows can convert FAT32/16/12 into NTFS without the need to rewrite all files.[14] NTFS uses several files typically 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] Unlike FAT and High Performance File System (HPFS), NTFS supports access control lists (ACLs), filesystem encryption, transparent compression, sparse files and file system journaling. NTFS also supports shadow copy to allow backups of a system while it is running, but the functionality of the shadow copies varies between different versions of Windows.[15]

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[11] 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.51 1995 Compressed files, named streams, and access control lists[19]
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]

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.[22] 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. Because partition tables on master boot record (MBR) disks support only partition sizes up to 2 TB, multiple GUID Partition Table (GPT or «dynamic») volumes must be combined to create a single NTFS volume larger than 2 TB. 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 support.[23]

The NTFS maximum theoretical limit on the size of individual files is 16 EB[a][24] (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.[15] 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).[25][26]

FreeBSD[edit]

FreeBSD 3.2 released in May 1999 included read-only NTFS support written by Semen Ustimenko.[27][28] This implementation was ported to NetBSD by Christos Zoulas and Jaromir Dolecek and released with NetBSD 1.5 in December 2000.[29] 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.[30][28]

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;[31] 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.[32][33][31] 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.[34] 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.[35]

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,[36] Solaris, QNX, and Haiku[37] 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.[38]

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.[39]

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 with the source code found here.

Mac OS[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.[40] 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.[41]

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

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.[44][45]

DOS[edit]

There is a free-for-personal-use read/write driver for MS-DOS by Avira called «NTFS4DOS».[46][47]

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.[48] 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 he or she succeeds.[48]

Encryption[edit]

Encrypting File System (EFS) provides user-transparent encryption of any file or folder on an NTFS volume.[49] 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.[50] 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 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.[51]

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.[52] This journal can be enabled or disabled on non-system volumes.[53]

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.[54]

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.[55] 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.[56]

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»).

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. Very small ADSs (named «Zone.Identifier») are added by Internet Explorer and recently[when?] by other browsers to mark files downloaded from external sites as possibly unsafe to run; the local shell would then require user confirmation before opening them.[57] When the user indicates that they no longer want this confirmation dialog, this ADS is deleted.

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 tool called Streams[58] 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.[59]

Malware has used alternate data streams to hide code.[60] As a result, malware scanners and other special tools now check for alternate data streams.

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).[61] 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.[62] 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.[63]

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.[64]

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.[65]

Disadvantages[edit]

Large compressible files become highly fragmented since every chunk smaller than 64 KB becomes a fragment.[65][66] 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.[67][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[68] and the LZX algorithm;[69] 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.[70] 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,[71] 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.[71] This design is meant purely for read-only access, so any writes to compressed files result in an automatic decompression.[71][72][73]

CompactOS compression is intended for OEMs who prepare OS images with the /compact flag of the DISM tool in Windows ADK,[74] but it can also be manually turned on per file with the /exe flag of the compact command.[75] 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.[76] 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.[71]

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.[77] 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.[78] As with compressed files, the actual sizes of sparse files are not taken into account when determining quota limits.[79]

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.[80]

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.[81]

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».[82]

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.[83] 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.[84]

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.[85]

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.[86]

Partition Boot Sector (PBS)[edit]

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.[89] 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.[90] 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.[91]

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.[92] 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.

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.[93] 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[94] 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».[94]

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.[95] 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.[96]

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.[97] 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.[98]

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.[99]

See also[edit]

  • Comparison of file systems
  • NTFSDOS
  • ntfsresize
  • WinFS (a canceled Microsoft filesystem)
  • ReFS, a newer Microsoft filesystem

Notes[edit]

  1. ^ a b c d e f g h i 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

References[edit]

  1. ^ a b c 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. ISSN 1742-2876. S2CID 199004263. Retrieved 2021-12-01.
  2. ^ a b «Glossary». [MS-EFSR]: Encrypting File System Remote (EFSRPC) Protocol. Microsoft. 14 November 2013.
  3. ^ «How NTFS Works». TechNet. Microsoft. Retrieved 2 December 2017.
  4. ^ «B*Trees — NTFS Directory Trees — Concept — NTFS Documentation». flatcap.org. Archived from the original on 2019-05-13. Retrieved 2019-05-13.
  5. ^ a b c d e f g «How NTFS Works». Windows Server 2003 Technical Reference. 2003-03-28. Retrieved 2011-09-12.
  6. ^ 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.
  7. ^ «Appendix A: Product Behavior». [MS-FSA]: File System Algorithms. Microsoft. 14 November 2013. Retrieved 2012-09-21.
  8. ^ a b Russon, Richard; Fledel, Yuval. «NTFS Documentation» (PDF). Archived (PDF) from the original on 2022-10-09. Retrieved 2011-06-26.
  9. ^ «WineHQ Bugzilla – Bug 51808 – the issue with trailing spaces (Spaces at the end of a filename)».
  10. ^ Rick Vanover (14 September 2011). «Windows Server 8 data deduplication». Retrieved 2011-12-02.
  11. ^ a b Custer, Helen (1994). Inside the Windows NT File System. Microsoft Press. ISBN 978-1-55615-660-1.
  12. ^ «NTFS3 — The Linux Kernel documentation». www.kernel.org. Retrieved 2021-12-02.
  13. ^ «ntfs-3g». www.freebsd.org. Retrieved 2021-12-02.
  14. ^ «How to Convert a Drive from FAT32 to NTFS without Data Loss». WindowsLoop. 11 July 2021. Retrieved 8 August 2021.
  15. ^ 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. Retrieved 2007-03-21.
  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. «Inside Win2K NTFS, Part 1». MSDN. Microsoft. Retrieved 2008-04-18.
  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.
  22. ^ Loveall, John (2006). «Storage improvements in Windows Vista and Windows Server 2008» (PowerPoint). Microsoft. pp. 14–20. Retrieved 2007-09-04.
  23. ^ «Booting from GPT». Rodsbooks.com. Retrieved 22 September 2018.
  24. ^ «NTFS vs FAT vs exFAT — NTFS.com». www.ntfs.com. Retrieved 2021-01-19.
  25. ^ «How to Convert FAT Disks to NTFS». Microsoft. 18 December 2017. Retrieved May 30, 2019.
  26. ^ «How to use Convert.exe to convert a partition to the NTFS file system». Microsoft Corporation. 2007-02-12. Retrieved 2010-12-26.
  27. ^ «FreeBSD 3.2 Release Notes». 17 May 1999. Retrieved 2020-06-15.
  28. ^ a b «mount_ntfs — OpenBSD manual pages». Retrieved 2020-06-15.
  29. ^ «Announcing NetBSD 1.5». 6 December 2000. Retrieved 2020-06-15.
  30. ^ «OpenBSD 4.9». Openbsd.com. Retrieved 22 September 2018.
  31. ^ a b «NTFS Credits and History». Linux-NTFS Project. Retrieved 2021-09-05.
  32. ^ «Kernel development». lwn.net. 2 May 2002. Retrieved 2021-09-05.
  33. ^ «Release notes for v2.5.11». 29 April 2002. Retrieved 2021-09-05.
  34. ^ «2.6.15 changelog». Linux project. 3 January 2006. Retrieved 2021-09-05.
  35. ^ 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.
  36. ^ «OpenBSD adds fuse(4) support for adding file systems in userland». OpenBSD Journal. 2013-11-08. Retrieved 2013-11-08.
  37. ^ «NTFS-3G Stable Read/Write Driver». 2009-07-25.
  38. ^ «Tuxera NTFS for Mac». Tuxera. August 30, 2011. Retrieved September 20, 2011.
  39. ^ «Jan Kratochvil: Captive: The first free NTFS read/write filesystem for GNU/Linux». Retrieved 2020-06-15.
  40. ^ «About Tuxera». Retrieved 2020-06-15.
  41. ^ «10.6: Enable native NTFS read/write support». 1 October 2009. Retrieved 5 September 2021.
  42. ^ «NTFS for Mac OS X, communication channel between Mac OS X and Windows». Paragon Software Group. Retrieved September 20, 2011.
  43. ^ «The Leader in Mass Data Storage Solutions | Seagate US». Seagate.com. Archived from the original on February 10, 2011.
  44. ^ «NTFS plugin for NetDrive». ecsoft2.org. Retrieved 2020-09-09.
  45. ^ «NetDrive for OS/2». arcanoae.com. Retrieved 2020-09-09.
  46. ^ «Avira NTFS4DOS Personal». Archived from the original on June 19, 2010. Retrieved 2009-07-25.
  47. ^ «Download Avira NTFS4DOS Personal 1.9». Archived from the original on 10 November 2013. Retrieved 22 September 2018.
  48. ^ a b «How Security Descriptors and Access Control Lists Work». TechNet. Microsoft. Retrieved 4 September 2015.
  49. ^ Morello, John (February 2007). «Security Watch Deploying EFS: Part 1». Technet Magazine. Microsoft. Retrieved 2009-01-25.
  50. ^ «How EFS Works». Windows 2000 Resource Kit. Microsoft. Retrieved 25 February 2014.
  51. ^ «Windows 8 volume compatibility considerations with prior versions of Windows». Retrieved 2021-12-17.
  52. ^ «Change Journals (Windows)». MSDN. Retrieved 2010-04-16.
  53. ^ «Creating, Modifying, and Deleting a Change Journal (Windows)». MSDN. Retrieved 2010-04-16.
  54. ^ «Chapter 29 – POSIX Compatibility». MS Windows NT Workstation 4.0 Resource Guide. Microsoft. 1995. Retrieved 21 October 2013.
  55. ^ «Hard Links and Junctions». MSDN. Microsoft. 12 October 2013. Retrieved 21 October 2013.
  56. ^ «MSDN – CreateHardLink function». Retrieved 14 January 2016.
  57. ^ 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
  58. ^ «Streams — Windows Sysinternals». Technet.microsoft.com. Retrieved 22 September 2018.
  59. ^ «FileSystem Provider». Microsoft. 9 August 2012. Archived from the original on 23 January 2015. Retrieved 23 January 2015.
  60. ^ Malware utilising Alternate Data Streams? Archived 2008-07-23 at the Wayback Machine, AusCERT Web Log, 21 August 2007
  61. ^ «File Compression and Decompression». MSDN Platform SDK: File Systems. Retrieved 2005-08-18.
  62. ^ «The Default Cluster Size for the NTFS and FAT File Systems». Microsoft. January 31, 2002. Retrieved 2012-01-10.
  63. ^ «How NTFS Works». 2003-03-28. Retrieved 2011-10-24.
  64. ^ Masiero, Manuel (2011-12-01). «Should You Compress Data On Your SSD?». Tom’s Hardware. Bestofmedia Group. Retrieved 2013-04-05.
  65. ^ a b Middleton, Dennis. «Understanding NTFS Compression». Ntdebugging Blog. Microsoft. Retrieved 2011-03-16.
  66. ^ «Shrinking the gap: carving NTFS-compressed files». Retrieved 2011-05-29.
  67. ^ «Disk Concepts and Troubleshooting». Microsoft. Retrieved 2012-03-26.
  68. ^ «[MS-XCA]: Xpress Compression Algorithm».
  69. ^ wimlib: the open source Windows Imaging (WIM) library — Compression algorithm
  70. ^ «Compact OS, single-instancing, and image optimization». Microsoft. Retrieved 1 October 2019.
  71. ^ a b c d Raymond Chen.What is WofCompressedData? Does WOF mean that Windows is a dog? Microsoft DevBlogs.
  72. ^ Biggers, Eric (29 April 2019). «NTFS-3G plugin for reading «system compressed» files». GitHub. Retrieved 1 October 2019.
  73. ^ «Re: [ntfs-3g-devel] Experimental support for Windows 10 «System Compressed» files». SourceForge.net. Retrieved 1 October 2019.
  74. ^ «DISM Overview».
  75. ^ «Compact».
  76. ^ Windows Image File Boot (WIMBoot) Overview
  77. ^ «Sparse Files». MSDN. Microsoft. 12 October 2013. Retrieved 21 October 2013.
  78. ^ Kandoth, Suresh B. (4 March 2009). «Sparse File Errors: 1450 or 665 due to file fragmentation: Fixes and Workarounds». CSS SQL Server Engineers. Microsoft. Retrieved 21 October 2013.
  79. ^ «Sparse Files and Disk Quotas». MSDN Library. Microsoft. 12 October 2013. Retrieved 21 October 2013.
  80. ^ cfsbloggers (July 14, 2006). «How restore points and other recovery features in Windows Vista are affected when you dual-boot with Windows XP». The Filing Cabinet. Retrieved 2007-03-21.
  81. ^ «Transactional NTFS». MSDN. Microsoft. Retrieved 2007-02-02.
  82. ^ «Transactional NTFS (TxF)». Windows Dev Center (MSDN). Microsoft. Retrieved 24 May 2015.
  83. ^ «Unable to open content synced in a OneDrive folder on an external drive». Microsoft Support. Retrieved 2021-04-03.
  84. ^ André, Jean-Pierre (March 1, 2019). «NTFS-3G: Junction Points, Symbolic Links and Reparse Points». jp-andre.pagesperso-orange.fr.
  85. ^ «Chapter 18 – Choosing a File System». MS Windows NT Workstation 4.0 Resource Guide. Microsoft. Retrieved 25 February 2014.
  86. ^ «Naming Files, Paths, and Namespaces». MSDN. Microsoft. Naming Conventions. Retrieved 25 February 2014.
  87. ^ «NTFS. Partition Boot Sector». Ntfs.com. Retrieved 22 September 2018.
  88. ^ «Boot Sector». Technet.microsoft.com. September 11, 2008. Table 1.13 BPB and Extended BPB Fields on NTFS Volumes. Retrieved 22 September 2018.
  89. ^ «Master File Table». MSDN. July 2, 2012.
  90. ^ «Forensics: What is the MFT Mirror?». Where is Your Data?. 2009-06-05. Retrieved 2021-07-30.
  91. ^ «NTFS Master File Table (MFT)». Ntfs.com. Retrieved 22 September 2018.
  92. ^ 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.
  93. ^ 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.
  94. ^ 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
  95. ^ «The Four Stages of NTFS File Growth». Retrieved 22 September 2018.
  96. ^ «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.
  97. ^ «How Oplocks function in the Windows Environment: Overview». Archived from the original on 2010-08-23. Retrieved 2018-12-19.
  98. ^ «What’s New in NTFS». Technet.microsoft.com. Retrieved 22 September 2018.
  99. ^ «Beating the Daylight Saving Time bug and getting correct file modification times Archived 2004-11-14 at the Wayback Machine» 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.

NTFS (аббревиатура от англ. new technology file system — «файловая система новой технологии») — стандартная файловая система для семейства операционных систем Windows NT фирмы Microsoft.

NTFS поддерживает хранение метаданных. С целью улучшения производительности, надёжности и эффективности использования дискового пространства для хранения информации о файлах в NTFS используются специализированные структуры данных. Информация о файлах хранится в главной файловой таблице — Master File Table (MFT). NTFS поддерживает разграничение доступа к данным для различных пользователей и групп пользователей (списки контроля доступа — англ. access control lists , ACL), а также позволяет назначать дисковые квоты [en] (ограничения на максимальный объём дискового пространства, занимаемый файлами тех или иных пользователей). Для повышения надёжности файловой системы в NTFS используется система журналирования USN. Для NTFS размер кластера по умолчанию составляет от 512 байт до 64 КБ в зависимости от размера тома и версии ОС [6] .

Содержание

История [ править | править код ]

Файловая система NTFS заменила файловую систему FAT, использовавшуюся в ОС MS-DOS и ОС Windows.

Файловая система NTFS разработана на основе файловой системы HPFS [7] . HPFS — аббревиатура от англ. high performance file system — высокопроизводительная файловая система, разработку которой вела фирма Microsoft совместно с фирмой IBM для операционной системы OS/2. Впоследствии разработчики из фирмы Microsoft добавили [8] в HPFS квотирование (англ.) русск. , журналируемость, разграничение доступа и аудит, назвали файловую систему NTFS. NTFS в значительной степени утратила присущую прародительнице (HPFS) весьма высокую производительность файловых операций.

Существует мнение [ источник не указан 1583 дня ] , что прямым предком NTFS является файловая система Files-11 из ОС RSX-11 и ОС OpenVMS. Сравнение файловых систем NTFS и HPFS приведено в следующей таблице.

Параметр NTFS Files-11 HPFS
Что используется для размещения файлов? Кластеры Кластеры Полосы по 8 МиБ , разбитые на секторы
Что используется для пометки кластеров, как занятых? По одной битовой карте для каждого тома По одной битовой карте для каждого тома По одной битовой карте секторов на каждую полосу
Как хранится информация о файлах и каталогах? В пространстве MFT хранится информация и о файлах, и о каталогах Почти так же, как в NTFS, но аналогичный MFT каталог называется MFD Традиционные каталоги [ прояснить ]
Поддержка контроля доступа Реализуется с помощью набора прав доступа Реализуется почти так же, как в NTFS Контроль доступа не встроен в файловую систему. Поддержка этой возможности реализуется внешними процессами
Поддержка потоков данных Для каждого файла можно создать ограниченное только ёмкостью тома множество именованных потоков. Имя потока записывается в виде «filename.ext:streamname» (имя файла с расширением, символ «:» (двоеточие), имя потока). Прямого аналога потоков нет, есть понятие версии файла. Версии именуются «filename.ext;version» аналогично синтаксису имён потоков в NTFS Потоки не поддерживаются. Имеется только 64 КиБ для хранения расширенных атрибутов.

Версии NTFS [ править | править код ]

Различают несколько версий NTFS. Номер версии драйвера файловой системы ( NTFS.sys ) не стоит в зависимости от версии самой файловой системы.

Версия NTFS Поддержка со стороны ОС Примечания
Windows
1.0 Windows NT 3.1
1.1 Windows NT 3.5
1.2 Windows NT 3.51 Встречается название в версии драйвера — «NTFS 4.0»
2.x н/д Нет официальных данных о выпуске NTFS данной версии
3.0 Windows 2000 Встречаются названия «NTFS V5.0» и «NTFS 5».
В этой версии появились дисковые квоты (англ.) русск. , шифрование файлов и папок, разрежение файлов, точки перехода (англ.) русск. , обновлён порядковый номер журналирования (USN), добавлен каталог $Extend и его файлы, внесены изменения в организацию дескрипторов безопасности (для разных файлов одинаковые настройки безопасности могут описываться одним дескриптором).
3.1 Windows XP,
Windows Server 2003,
Windows Server 2003 R2,
Windows Vista,
Windows 7,
Windows Server 2008,
Windows Server 2008 R2,
Windows 8,
Windows Server 2012 RTM
Windows 8.1
Windows 10
Windows Server 2016
Windows Server 2019
Вышла осенью 2001 года с выпуском Windows XP. Встречается название «NTFS V5.1». Добавлено сохранение резервной копии MFT.

Поддержка операционными системами [ править | править код ]

Спецификации файловой системы NTFS закрыты. Это создаёт определённые трудности при реализации её поддержки в продуктах, не принадлежащих фирме Microsoft, например, разработчикам драйверов для свободных операционных систем приходится заниматься обратной разработкой файловой системы NTFS.

В данный момент полноценная поддержка NTFS присутствует только в ОС семейства Windows NT от фирмы Microsoft. Существующие средства доступа к разделам NTFS для других ОС перечислены ниже.

MS-DOS [ править | править код ]

  • Драйвер «NTFSDOS» от Марка Руссиновича (англ. Mark Russinovich ). Стандартная версия поддерживает чтение разделов NTFS. Версия «Professional» поддерживает запись на разделы NTFS. С июля 2006 года права на утилиты Марка Руссиновича принадлежат фирме Microsoft[9] . На сайте фирмы Microsoft информации об этом продукте нет, но его без труда можно найти в сети.

Windows 9x [ править | править код ]

  • Драйвер « NTFS for Windows 98 » от Марка Руссиновича[9] . Поддерживает чтение с разделов NTFS. Для записи можно использовать драйвер DOS. На сайте фирмы Microsoft информация об этом драйвере отсутствует, но его легко можно отыскать на сторонних сайтах.
  • Драйвер «NTFS for Windows 98» от фирмы Paragon Software Group. В настоящий момент поддерживает как чтение, так и запись. Версия бесплатна для некоммерческого использования.

Linux [ править | править код ]

  • Проект «Linux-NTFS». Включает модуль ядра и набор утилит для выполнения различных операций с файловой системой NTFS (проверка целостности, восстановление удалённых файлов, изменение размера и др.). Именно этот драйвер включается в ядроLinux ещё с версии 2.2 (с тех пор он был практически полностью переписан). Модулем ядра поддерживается практически только чтение; запись возможна лишь в существующие файлы без изменения их размера. Недавно в рамках проекта появилась утилита ntfsmount , использующая FUSE и позволяющая монтироватьразделы NTFS с возможностью записи (с некоторыми ограничениями). Это был первый полностью свободный продукт, имеющий такую возможность.
  • Проект «NTFS-3G». Возник как ответвление от проекта «Linux-NTFS». Отличается более полной поддержкой записи на разделы NTFS. 21 февраля2007 года была выпущена версия 1.0, названная стабильной. Обеспечивает высокий уровень надёжности и производительности. В настоящее время проект активно развивается.
  • Проект «Captive NTFS» ([1]). Создавался как «обёртка» для использования оригинального драйвера из ОСWindows NT в ОСLinux. Запись поддерживается, но драйвер работает крайне медленно и имеет некоторые технические ограничения. На официальном сайте проекта помещено объявление о прекращении разработки.
  • Драйвер «NTFS for Linux» от фирмы Paragon Software. Драйвер поддерживает чтение и запись с NTFS. Кроме драйвера проект поставляет ряд утилит для создания файловой системы NTFS и выполнения некоторых операций с разделами NTFS. Доступен бесплатно для домашних пользователей [10] .

OpenSolaris/Solaris [ править | править код ]

  • Проект «NTFS File System Reader». Поддерживает чтение с NTFS.
  • Проект «NTFS-3G». Необходимо установить дополнительные пакеты [11] .

BeOS-совместимые операционные системы [ править | править код ]

KolibriOS [ править | править код ]

  • Драйвер, поставляемый в составе ОСKolibriOS начиная с версии 0.6.5, написан на языке ассемблера, поддерживает чтение с разделов NTFS и запуска программ.

ReactOS [ править | править код ]

Реализована поддержка NTFS «на чтение» через свободный драйвер собственного производства. Также есть экспериментальная поддержка записи, включаемая через реестр.

macOS [ править | править код ]

  • В операционной системеmacOS встроенный драйвер NTFS по умолчанию работает в режиме чтения. После выпуска версии Mac OS X 10.6 Snow Leopard была найдена возможность включения поддержки записи на NTFS [12] .
  • Драйвер «NTFS for Mac® OS X» от фирмы Paragon Software.
  • Драйвер «NTFS-3G» [13] .
  • Драйвер «MacFUSE» версии 2.0.

Сравнение файловых систем FAT и NTFS [ править | править код ]

Ограничения / возможности NTFS FAT16 и FAT32
Размеры диска в теории 2 64 байт ( 16 ЭиБ или 18 446 744 073 709 551 616 байт )

на практике 255 тб

приблизительно 2 43 байт ( 8 ТиБ )

Размер тома
теоретически — 2 64 — 1 кластер; разметка диска в стиле MBR позволяет создавать разделы, размеры которых не превышают 2 ТБ ; чтобы обойти это ограничение, необходимо использование динамических дисков или разметки GPT (используя GPT, можно создать разделы диска размером до 9.4 ЗБ ( 9.4 × 10 21 байт ); выбор стиля разметки предоставляется при инициализации (первоначальной разметке) диска, начиная с версии Windows Server 2003 SP1, Windows XP x64 Edition, Windows Server 2003 x64 Edition и все версии NT выше 6.0 [14]

При попытке создать том большего размера, том создаётся, но при форматировании в NTFS с размером кластера 64 кб выдаётся ошибка: The number of clusters exceeds 32 bits (Количество кластеров превышает 32 бита).

минимальный размер тома: 8 МиБ
минимальный рекомендуемый размер тома: 10 МиБ [15]

запись в таблице FAT на томе с файловой системой FAT32 имеет размер 4 байта , поэтому средство ScanDisk не может работать с таблицей FAT на диске FAT32, описывающей более 4 177 920 кластеров (включая два резервных). С учётом самих таблиц FAT и при максимальном размере кластера 32 кБайт размер тома может быть до 127.53 ГБ . В ОС Windows 2000 нельзя отформатировать том размером более 32 ГБайт с файловой системой FAT32. Драйвер FastFAT для ОС Windows 2000 поддерживает монтирование томов, размер которых превышает 32 ГБайт , с файловой системой FAT32 (с определёнными ограничениями), но такой том нельзя создать с помощью утилиты format

Форматирование дискет
Windows не позволяет форматировать дискеты в NTFS. Существует утилита ntfsflp от Марка Руссиновича; утилита побайтово записывает на дискету готовый бинарный образ тома NTFS; размер тома совпадает с размером дискеты
За счёт отсутствия журналирования в FAT32 уменьшается износ блоков флеш-накопителя для модулей памяти, изготовленных по flash-технологиям, что позволяет продлить их срок службы.

поддержка ссылок разных типов
NTFS поддерживает жёсткие (англ. hard links ) и символьные ссылки, соединения для каталогов (англ. junctions ), volume mount point [en]
FAT не поддерживает ссылки

Максимальный размер файла
теоретически — 2 64 байт минус 1 килобайт

практически — 2 44 байт минус 64 килобайта (

FAT16 поддерживает файлы размером не более 2 Гигабайт

FAT32 поддерживает файлы размером не более 4 Гигабайт

Стал у меня в медиаплеере (Ellion HMP-1000) глючить диск. Я купил новый на замену, подключил их оба ко внешнему SATA/USB3 контроллеру, да и запустил копироваться старый — на новый (дело было под Windows7/Ultimate). Скопировалось всё, кроме файлов >16GB размером. Тут бы я и смирился с неизбежным, предварительно погуглив тему, но меня мучает сомнение: эти самые файлы размером более 16GB были скачаны торрентом на тот самый компьютер, который отказался их потом копировать, и до сих пор там спокойно лежат, и нормально читаются.

Т.е. имеется W7/Ult x64, c диском, про который NTFSInfo говорит:
Volume size : 715402 MB
Total sectors : 1465144001
Total clusters : 183143000
Free clusters : 30313390
Free space : 118411 MB (16% of drive)
Bytes per sector : 512
Bytes per cluster : 4096
Bytes per MFT record : 1024

и на который скачался utracker’ом 17GB файл, каковой до сих пор прекрасно и целиком читается. Этот файл был скопирован по сети на медиаплеер (работает под линуксом, но фильмы держит на NTFS разделе), откуда тоже прекрасно проигрался. Будучи подключен к вышеуказанному компьютеру напрямую, через SATA/USB контроллер, диск из медиаплеера виден как
Volume size : 1902761 MB
Total sectors : 3896854919
Total clusters : 487106864
Free clusters : 62272474
Free space : 243251 MB (12% of drive)
Bytes per sector : 512
Bytes per cluster : 4096
Bytes per MFT record : 1024

и 17GB файл с него не открывается (пишет «The requested operation could not be completed due to a file system limitation»).

Собственно, вопросов два:
1. если 16GB предел в размера файла в Win7/Ult есть, то как туда скачался 17GB файл?
2. если предела нет, то почему OS не дает считать этот файл?

  • Вопрос задан более трёх лет назад
  • 13014 просмотров

1. Предел есть — это ограничение адресации журнала NTFS.
Файловая система дает возможность записывать файлы больше 16 гб при маленьком журнале, если они записываются как Append only.

2. По умолчанию файлы больше 16Гб не копируются в винде так как при сбое чтения/записи на фрагменте который больше этих самых 16Гб ОС не может контролировать целостность файловой системы из-за маленького журнала. Если с журналом все впорядке, то и максимальный размер файла будет другим.

Максимальный размер журнала и длинна указателя зависит от размера тома и свободного места на диске. Хотя вообще аддресация файлов позволяет хранить 2^64 — 1 байт файлы.

Вы можете без проблем скопировать файлы любым удобным скриптом, например на питоне.
Вообще желательно оставлять 15% свободного места в разделе, просто потому что в противном случае будет урезаться величина журнала, а это чревато уменьшнием надёжности файловой системы.

Линуксу пофиг на подобные ограничения, так как в большинстве случаев он не фрагментирует файлы и у него нет потребности раздувать журнал попусту как это делает винда, и естественно в винде теоретическая пропускная способность будет больше.

Когда вы форматируете внутренний накопитель, внешний жесткий диск, флеш накопитель, или SD карту, Windows предложит выбрать файловую систему FAT32, ExFAT и NTFS. Но в данном окне нет описания, что означает данная файловая система и какая между ними разница. По этому в сегодняшней статье попытаемся расшифровать данные названия файловых систем.

FAT32

FAT32 является старейшей файловой системой, он был введен в Windows 95, чтобы заменить FAT16.

Возраст этой файловой системы имеет преимущества и недостатки. Почти все покупаемые флеш диски вы покупаете с файловой системой FAT32, для максимальной совместимости не только с компьютерами, но и с игровыми приставками, и другими устройствами, которые поддерживают флеш накопители.

Ограничения данного возраста: размер файла больше 4Гб FAT32 не поддерживается, по этому можно забрасывать на накопитель любое количество файлов, но чтобы каждый из них был не больше 4Гб. Максимальный размер раздела в FAT32 8ТБ, но в операционных системах Windows размер создаваемого раздела в данной файловой системе не превышает 32ГБ. Хотя если создать раздел больше 32ГБ в другой системе, то Windows будет работать с накопителем.Но опять таки, если создать раздел в FAT32 больше 32ГБ, то по утверждениям Майкрософт производительность данного диска значительно падает.

В то время как эта файловая система хороша для флеш-накопителей, и других внешних накопителей, для внутренних дисков данная система не очень хороша. Ей не хватает разрешений и других функций безопасности, встроенных в более современную файловую систему NTFS. Чтобы установить современную операционную систему Windows — нужно создавать раздел только в NTFS.

Совместимость: Поддерживается всеми версиями Windows, Mac, Linux, игровыми консолями и другими устройствами с USB.

Ограничения:Максимальный размер файла 4ГБ, 8ТБ максимальный размер раздела. В Windows раздел можно создать не больше 32ГБ.

Идеально подходит: на съемных накопителях, для совместимости с большинством устройств, если вы используете файлы до 4ГБ.

NTFS

NTFS является современной файловой системой, с которой работает Windows. Все операционных системы Windows при установке форматируют раздел в NTFS. Впервые появился с Windows XP.

Данный тип файловой системы упакован с другими современными функциями. Он поддерживает файловые разрешения для обеспечения безопасности, ведения журнала изменений, который может помочь быстро восстановить ошибки, если ваш компьютер внезапно перезагрузился. Также на нем поддерживаются теневые копии для резервного копирования, шифрования, и другие нужные функции.

Для установки системы Windows ваш раздел должен быть NTFS, да и вторичные диски лучше форматировать в данной файловой системе, для нормальной работы всех приложений.

Но данная файловая система не совместима с другими операционными системами. Она будет работать со всеми версиями Windows, но Mac OS X может только читать диски в данной файловой системе, он не может писать на них. Также и Linux только читает разделы NTFS, хотя некоторые дистрибутивы включили поддержку записи. Большинство игровых консолей не поддерживают NTFS, к примеру Sony PlayStation не поддерживает данную файловую систему, да и Xbox 360 не поддерживает ее.

Совместимость: работает со всеми версиями Windows, только читается в Mac, также и Linux только читает, и не каждый дистрибутив пишет. Другие устройства — большинством не поддерживается.

Ограничения: нет ограничений в размерах файла, и в размерах раздела.

Идеально подходит: для системного диска, и других внутренних дисков, которые будут использоваться только в Windows.

ExFat

ExFat была введена Майкрософт в 2006, и по другому данную файловую систему называет FAT64. Поддержку данной файловой системы с обновлениями добавили и в Windows XP.

Данная файловая система оптимизирована для флеш-накопителей. Одним из новшеств ExFat является уменьшение количества перезаписей одного и того же сектора, что уменьшает изнашивание накопителя.

Как и NTFS, ExFat не ограничен в размерах файла и раздела. Другими словами,если ваш накопитель отформатирован в ExFat, то можно записывать на него файлы размером больше 4ГБ. Данная файловая система лучший выбор для накопителей, где вы хотите легкую файловую систему без ограничений размера файла.

ExFat также более совместим чем NTFS, если Mac поддерживал только чтение NTFS, то ExFat он полностью поддерживает, как чтение так и запись. ExFat также могут быть доступны в Linux, если установить дополнительное программное обеспечение.

В то время как с операционными системами ExFat более дружен, он часто не совместим с цифровыми камерами, да и не во всех игровых консолях поддерживают данную файловую систему. Да и другие старые устройства, могут быть ограничены поддержкой только FAT32.

Совместимость: Работает во всех версиях Windows, и в современных версиях Mac OS X, но требует дополнительное программное обеспечение на Linux. Большинство старых устройств не поддерживают данную файловую систему.

Ограничения: нет ограничений в размерах файла, и в размерах раздела.

Идеально подходит: для флеш-накопителей USB, внешних накопителей, и т.д., если вы работаете с файлами объемом больше 4ГБ, и если вы хотите уменьшить износ накопителя.

NTFS идеально подходит для внутренних дисков, а ExFat больше подходит для флеш-накопителей. Fat32 в основном используется для стареньких устройств, которые не поддерживают другие файловые системы.

На сегодня всё, если есть дополнения — пишите комментарии! Удачи Вам 🙂

NTFS

Разработчик (и) Microsoft
Полное имя Файловая система NT
Введено июль 1993 г ​​.; 27 лет назад (1993-07) с Windows NT 3.1
Идентификатор раздела 0x07 (MBR ). EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (GPT )
Structures
Содержимое каталога B-дерево вариант
Размещение файлов Bitmap
Плохие блоки $ BadClus (запись MFT)
Пределы
Макс.. размер тома 2кластеры — 1 кластер (формат);. 256 TiB — 64 KB (Windows 10 версия 1703, Windows Server 2016 или более ранняя реализация). 8 PB — 2 МБ (Windows 10 версии 1709, Windows Server 2019 или более поздняя реализация)
Макс. размер файла 16 EiB — 1 КБ (формат);. 16 ТБ — 64 KB (Windows 7, Windows Server 2008 R2 или более ранняя реализация). 256 TB — 64 KB (Windows 8, Windows Server 2012 или более поздняя реализация). 8 PB — 2 MiB (Windows 10 версии 1709, Windows Server 2019 или более поздняя реализация)
Макс. количество файлов 4,294,967,295 (2-1)
Макс. длина имени файла 255 UTF-16 единицы кода
Допустимые символы в именах файлов
  • В пространстве имен Win32 : любые UTF-16 единица кода (без учета регистра), кроме / : * "? <>|, а также NUL
  • В пространстве имен POSIX : любой UTF- 16 кодовая единица (с учетом регистра), кроме /, а также NUL
Функции
Записанные даты Создание, модификация, изменение POSIX, доступ
Диапазон дат 1 января 1601 г. — 28 мая 60056 г. (Время файла — это 64-битные числа, считающие 100-наносекундные интервалы (десять миллионов в секунду) с 1601 года, что составляет более 58000 лет)
Разрешение даты 100 нс
Форки Да (см. § Альтернативные потоки данных (ADS) ниже)
Атрибуты Только для чтения, скрытый, системный, архив, контент не проиндексирован, автономный, временный, сжатый
Разрешения файловой системы ACL
Прозрачное сжатие Для каждого файла, LZ77 (Windows NT 3.51 и далее)
Прозрачное шифрование для каждого файла,. D ESX (Windows 2000 и более поздние версии),. Triple DES (Windows XP и более поздние версии),. AES ( Пакет обновления 1 для Windows XP, Windows Server 2003 и более поздних версий)
Дедупликация данных Да (Windows Server 2012 )
Другое
Поддерживаемые операционные системы Windows NT 3.1 и новее. Mac OS X 10.3 и новее (только для чтения). ядро ​​Linux версии 2.6 и новее. ядро ​​Linux версии 2.2- 2.4 (только для чтения). ReactOS (только для чтения)

NTFS (NT File System ) является проприетарной файловая система журналов, разработанная Microsoft. Начиная с Windows NT 3.1, это файловая система по умолчанию для семейства Windows NT.

NTFS имеет несколько технических улучшений по сравнению с файловыми системами, которые она заменила — Таблица размещения файлов (FAT) и Высокопроизводительная файловая система (HPFS) — например, улучшенная поддержка метаданных и расширенных структур данных для повышения производительности, надежности и дискового пространства использование космоса. Дополнительные расширения представляют собой более сложную систему безопасности, основанную на списках управления доступом (ACL) и журналировании файловой системы..

NTFS также поддерживается в других операционных системах настольных компьютеров и серверов. Linux и BSD имеют бесплатный драйвер NTFS с открытым исходным кодом, называемый NTFS-3G, с функциями чтения и записи. macOS поставляется с поддержкой NTFS только для чтения; поддержка записи для NTFS нестабильна, поэтому по умолчанию запись файлов отключена.

Содержание

  • 1 История
  • 2 Версии
  • 3 Функции
    • 3.1 Масштабируемость
    • 3.2 Ведение журнала
    • 3.3 Жесткие ссылки
    • 3.4 Альтернативные потоки данных (ADS)
    • 3.5 Файл сжатие
      • 3.5.1 Алгоритмы CompactOS
    • 3.6 Разреженные файлы
    • 3.7 Теневое копирование тома
    • 3.8 Транзакции
    • 3.9 Безопасность
    • 3.10 Шифрование
    • 3.11 Квоты
    • 3.12 Точки повторной обработки
    • 3.13 Изменение размера
  • 4 Внутренние компоненты
    • 4.1 Загрузочный сектор раздела (VBR)
    • 4.2 Основная таблица файлов
    • 4.3 Метафайлы
    • 4.4 Списки атрибутов, атрибуты и потоки
    • 4.5 Резидентные и не- резидентные атрибуты
    • 4.6 Оппортунистические блокировки
    • 4.7 Время
  • 5 Взаимодействие
  • 6 Реализации
  • 7 См. также
  • 8 Ссылки
  • 9 Дополнительная литература

История

В середине 1980-х годов Microsoft и IBM сформировали совместный проект по созданию графической операционной системы следующего поколения; результатом были OS / 2 и HPFS. Поскольку Microsoft не соглашалась с IBM по многим важным вопросам, в конце концов они расстались; OS / 2 оставалась проектом IBM, а Microsoft работала над разработкой Windows NT и NTFS.

Файловая система HPFS для OS / 2 содержит несколько важных новых функций. Когда Microsoft создавала свою новую операционную систему, они «позаимствовали» многие из этих концепций для NTFS. Первыми разработчиками NTFS были Том Миллер, Гэри Кимура, Брайан Эндрю и Дэвид Гебель.

Вероятно, в результате этого общего происхождения HPFS и NTFS используют один и тот же раздел диска код типа идентификации (07). Использование одного и того же номера записи идентификатора раздела крайне необычно, поскольку были доступны десятки неиспользуемых кодовых номеров, а другие основные файловые системы имеют свои собственные коды. Например, в FAT их больше девяти (по одному для FAT12, FAT16, FAT32 и т. Д.). Алгоритмы, идентифицирующие файловую систему в разделе типа 07, должны выполнять дополнительные проверки, чтобы различать HPFS и NTFS.

Версии

Microsoft выпустила пять версий NTFS:

номер версии NTFS Первая операционная система Дата выпуска Новые функции Примечания
1.0 Windows NT 3.1 1993 Начальная версия NTFS 1.0 несовместима с 1.1 и новее: тома написаны Windows NT 3.5x не может быть прочитан Windows NT 3.1, пока не будет установлено обновление (доступное на установочном носителе NT 3.5x).
1.1 Windows NT 3.51 1995 Сжатые файлы, названные потоки и списки управления доступом
1.2 Windows NT 4.0 1996 Дескрипторы безопасности Обычно называются NTFS 4.0 после выпуска ОС
3.0 Windows 2000 2000 Дисковые квоты, Шифрованная файловая система, разреженные файлы, точки повторной обработки, ведение журнала обновлений порядкового номера (USN), папка $ Extendи ее файлы Совместимость также стала доступной для Windows NT 4.0 с обновлением Service Pack 4. te. После выпуска ОС обычно называется NTFS 5.0.
3.1 Windows XP октябрь 2001 Записи Master File Table (MFT) добавлены в записи с избыточным номером записи MFT ( полезен для восстановления поврежденных файлов MFT) Обычно называется NTFS 5.1 после выпуска ОС

Номер версии NTFS.sys(например, v5.0 в Windows 2000) зависит от операционной версия системы; его не следует путать с номером версии NTFS (v3.1 начиная с Windows XP).

Хотя в последующих версиях Windows были добавлены новые функции, связанные с файловой системой, они не изменили саму NTFS. Например, в Windows Vista реализованы символические ссылки NTFS, Transactional NTFS, сжатие раздела и самовосстановление. Символьные ссылки NTFS — это новая функция файловой системы; все остальные — это новые функции операционной системы, в которых используются уже существующие функции NTFS.

Возможности

NTFS v3.0 включает несколько новых функций по сравнению со своими предшественниками: поддержка разреженных файлов, квоты использования диска, точки повторной обработки, распределенное отслеживание ссылок и шифрование на уровне файлов, называемое Шифрованная файловая система (EFS).

Масштабируемость

NTFS оптимизирована для 4 KB кластеров, но поддерживает максимальный размер кластера 2 МБ. (Более ранние реализации поддерживают до 64 КБ). Максимальный размер тома NTFS, который может поддерживать спецификация, составляет 2–1 кластер, но не все реализации достигают этого теоретического максимума, как обсуждается ниже.

Максимальный размер тома NTFS, реализованный в Windows XP Professional, составляет 2–1 кластер, частично из-за ограничений таблицы разделов. Например, при использовании кластеров размером 64 КБ максимальный размер тома NTFS Windows XP составляет 256 ТБ минус 64 КБ. При использовании размера кластера по умолчанию 4 КБ максимальный размер тома NTFS составляет 16 ТБ минус 4 КБ. Оба эти значения значительно превышают ограничение в 128 ГБ в Windows XP SP1. Поскольку таблицы разделов на дисках с основной загрузочной записью (MBR) поддерживают только размеры разделов до 2 ТБ, несколько томов GUID Partition Table (GPT или «динамический») должны быть объединены для создания одного тома NTFS размером более 2 Туберкулез. Для загрузки с тома GPT в среду Windows способом, поддерживаемым Microsoft, требуется система с Unified Extensible Firmware Interface (UEFI) и поддержкой 64-разрядных версий.

Максимальный теоретический предел NTFS для размер отдельных файлов составляет 16 EiB (16 × 1024 или 2 байта) минус 1 КБ, что в сумме составляет 18 446 744 073 709 550 592 байта. В Windows 10 версии 1709 и Windows Server 2019 максимальный реализованный размер файла составляет 8 ПБ минус 2 МБ, или 9 007 199 252 643 840 байт.

Журнал

NTFS — это файловая система с журналированием, которая использует журнал NTFS ($ LogFile) для записи изменений метаданных на том. Это функция, которую FAT не предоставляет, и она критически важна для NTFS, чтобы гарантировать, что ее сложные внутренние структуры данных останутся согласованными в случае сбоев системы или перемещения данных, выполняемых дефрагментацией API, и позволяют легко откатить незафиксированные изменения этих критических структур данных при перемонтировании тома. В частности, затронутыми структурами являются битовая карта распределения томов, модификации записей MFT, такие как перемещение некоторых атрибутов переменной длины, хранящихся в записях MFT и списках атрибутов, а также индексы для каталогов и дескрипторов безопасности.

Формат ($ LogFile) претерпел несколько изменений:

версия Windows версия формата $ LogFile
Windows NT 4.0 1.1
Windows 2000 1.1
Windows XP 1.1
Windows Vista 1.1
Windows 7 1.1
Windows 8 1.1
Windows 8.1 2.0
Windows 10 2.0

Несовместимость версий $ LogFile, реализованная в Windows 8.1 и Windows 10, не позволяет Windows 8 (и более ранним версиям Windows) правильно обрабатывать $ LogFile в случае, если том NTFS остается в грязном состоянии в результате внезапного выключения или перехода в спящий режим на диск в состоянии выхода из системы (иначе: гибридная загрузка или быстрая загрузка, которая включена по умолчанию в Windows 10 ). Невозможность обработать v2.0 файла $ LogFile на грязных томах этими более ранними версиями Windows приводит к вызову утилиты восстановления диска CHKDSK при двойной загрузке Windows 10 с этими старые системы. Имеется параметр реестра Windows для предотвращения автоматического обновления $ LogFile до более новой версии.

Журнал USN (журнал обновлений порядковых номеров) — это управление системой функция, которая записывает (в $ Extend $ UsnJrnl) изменения файлов, потоков и каталогов на томе, а также их различные атрибуты и настройки безопасности. Журнал предоставляется приложениям для отслеживания изменений в объеме. Этот журнал можно включить или отключить на несистемных томах.

Жесткие ссылки

Функция жесткая ссылка позволяет различным именам файлов напрямую ссылаться на одно и то же содержимое файла. Жесткие ссылки аналогичны соединениям каталогов, но вместо этого относятся к файлам. Жесткие ссылки могут ссылаться только на файлы в одном томе, потому что каждый том имеет свой собственный MFT. Жесткие ссылки имеют собственные метаданные файлов, поэтому изменение размера файла или атрибутов одной жесткой ссылки может не обновить другие, пока они не будут открыты. Изначально жесткие ссылки были включены для поддержки подсистемы POSIX в Windows NT.

Windows использует жесткие ссылки для поддержки коротких (8.3) имен файлов в NTFS. Поддержка операционной системы необходима, потому что существуют устаревшие приложения, которые могут работать только с именами файлов 8.3. В этом случае добавляется дополнительная запись имени файла и запись каталога, но файлы 8.3 и длинное имя связываются и обновляются вместе, в отличие от обычной жесткой ссылки.

Файловая система NTFS имеет ограничение в 1024 жестких ссылок на файл.

Альтернативные потоки данных (ADS)

Альтернативные потоки данных позволяют больше чем один поток данных , связанный с именем файла (вилка ), используя формат «имя файла: имя потока» (например, «text.txt: extrastream»).

Потоки NTFS были введены в Windows NT 3.1, чтобы позволить службам для Macintosh (SFM) хранить вилки ресурсов. Хотя текущие версии Windows Server больше не включают SFM, сторонние продукты Apple Filing Protocol (AFP) (такие как GroupLogic ExtremeZ-IP ) по-прежнему используйте эту функцию файловой системы. Очень маленькие ADS (названные «Zone.Identifier») добавляются Internet Explorer, а в последнее время и другими браузерами, чтобы отмечать файлы, загруженные с внешних сайтов, как потенциально небезопасные для запуска; тогда локальная оболочка потребует подтверждения пользователя перед их открытием. Когда пользователь указывает, что он больше не хочет это диалоговое окно подтверждения, этот ADS удаляется.

Альтернативные потоки не отображаются в проводнике Windows, и их размер не входит в размер файла. Когда файл копируется или перемещается в другую файловую систему без поддержки ADS, пользователь получает предупреждение о невозможности сохранения альтернативных потоков данных. Такое предупреждение обычно не появляется, если файл прикреплен к электронному письму или загружен на веб-сайт. Таким образом, использование альтернативных потоков для критических данных может вызвать проблемы. Microsoft предоставляет инструмент под названием Streams для просмотра потоков на выбранном томе. Начиная с Windows PowerShell 3.0, можно управлять ADS изначально с помощью шести командлетов: Add-Content, Clear-Content, Get-Content, Get-Item, Remove-Item, Set-Content.

Вредоносное ПО использовало альтернативные потоки данных для сокрытия кода. В результате сканеры вредоносных программ и другие специальные инструменты теперь проверяют наличие альтернативных потоков данных.

Сжатие файлов

NTFS может сжимать файлы с использованием алгоритма LZNT1 (вариант LZ77 ). Файлы сжимаются в 16 блоков кластера. При 4 кластерах КБ файлы сжимаются блоками по 64 КБ. Алгоритмы сжатия в NTFS предназначены для поддержки кластеров размером до 4 КБ. Если размер кластера на томе NTFS превышает 4 КБ, сжатие NTFS недоступно. Если сжатие уменьшает объем данных с 64 КБ до 60 КБ или меньше, NTFS обрабатывает ненужные страницы размером 4 КБ как пустые кластеры разреженного файла — они не записываются. Это обеспечивает разумное время произвольного доступа, поскольку ОС просто должна следовать цепочке фрагментов.

Примечание: Следующий раздел относится к тестам, исследованиям и рекомендациям, выполненным и предназначенным для устройств хранения с высоким временем доступа, таких как механический жесткий диск, , где используются внутренние головки для чтения данных его необходимо физически переместить и правильно расположить, а затем подождать, пока данные на вращающихся дисках пройдут под ними. См. Ниже обновленную информацию о SSD и аналогичных устройствах с малым временем доступа.

Однако большие сжимаемые файлы становятся сильно фрагментированными, поскольку каждый кусок меньше 64 КБ становится фрагментом. Согласно исследованию группы разработчиков NTFS Microsoft, 50–60 ГБ — это разумный максимальный размер для сжатого файла на томе NTFS с размером кластера (блока) 4 КБ (по умолчанию). Этот разумный максимальный размер резко уменьшается для томов с меньшим размером кластера. Однопользовательские системы с ограниченным пространством на жестком диске могут извлечь выгоду из сжатия NTFS для небольших файлов, от 4 КБ до 64 КБ или более, в зависимости от степени сжатия. Файлы размером менее 900 байт хранятся в записи каталога флэш-памяти MFT.

, например, диски SSD не имеют задержек движения головки жестких дисков, поэтому фрагментация имеет меньший штраф. Пользователи быстрых многоядерных процессоров найдут улучшения в скорости приложений за счет сжатия своих приложений и данных, а также за счет уменьшения используемого пространства. Обратите внимание, что твердотельные накопители с контроллерами Sandforce уже сжимают данные. Однако, поскольку передается меньше данных, уменьшается количество операций ввода-вывода.

Сжатие лучше всего работает с файлами, которые имеют повторяющееся содержимое, редко записываются, обычно используются последовательно и сами не сжимаются. Файлы журнала — идеальный пример.

Если системные файлы, необходимые во время загрузки (например, драйверы, NTLDR, winload.exe или BOOTMGR), сжаты, система может не загрузиться правильно, потому что фильтры декомпрессии еще не загружены. Более поздние версии Windows не позволяют сжимать важные системные файлы.

Файлы можно сжимать или распаковывать по отдельности (путем изменения дополнительных атрибутов) для диска, каталога или дерева каталогов, становясь по умолчанию для файлов внутри.

Хотя доступ для чтения и записи к сжатым файлам прозрачен, Microsoft рекомендует избегать сжатия на серверах или общих сетевых ресурсах, содержащих перемещаемые профили, поскольку это создает значительную нагрузку на процессор.

Алгоритмы CompactOS

Начиная с Windows 10, Microsoft представила дополнительные алгоритмы, а именно XPRESS4K / 8K / 16K и LZX. Оба алгоритма основаны на LZ77 с энтропийным кодированием Хаффмана, которого не хватало в LZNT1. Эти алгоритмы были взяты из Windows Imaging Format. В основном они используются для новой функции CompactOS, которая сжимает весь системный раздел с помощью одного из этих алгоритмов. Их также можно вручную включить для каждого файла с помощью флага / exeкоманды compact. При использовании с файлами алгоритм CompactOS избегает фрагментации, записывая сжатые данные в непрерывно выделенные блоки.

Разреженные файлы

Разреженный файл: пустые байты не нужно сохранять, поэтому они могут быть представлены в виде метаданных.

Разреженные файлы — это файлы с вкраплениями пустых сегментов, для которых не используется фактическое пространство для хранения. Для приложений файл выглядит как обычный файл с пустыми областями, которые выглядят как области, заполненные нулями. Редкий файл не обязательно включает области с разреженными нулями; атрибут «разреженный файл» просто означает, что они разрешены для файла.

Приложения баз данных, например, могут использовать разреженные файлы. Как и в случае со сжатыми файлами, фактические размеры разреженных файлов не учитываются при определении пределов квот.

Теневое копирование тома

Служба теневого копирования тома (VSS) сохраняет исторические версии файлов и папок на томах NTFS путем копирования старых, недавно перезаписанных данных в теневую копию с помощью метода копирование при записи. Позже пользователь может запросить восстановление более ранней версии. Это также позволяет программам резервного копирования данных архивировать файлы, которые в настоящее время используются файловой системой. В сильно загруженных системах Microsoft рекомендует настраивать том с теневой копией на отдельном диске.

В Windows Vista также представлены постоянные теневые копии для использования с Восстановление системы и Предыдущие версии особенности. Однако постоянные теневые копии удаляются, когда более старая операционная система подключает этот том NTFS. Это происходит потому, что старая операционная система не поддерживает новый формат постоянных теневых копий.

Транзакции

Начиная с Windows Vista, приложения могут использовать Транзакционную NTFS (TxF) для объединения нескольких изменений файлов в одну транзакцию. Транзакция гарантирует, что либо все изменения произойдут, либо ни одно из них не произойдет, и что ни одно приложение за пределами транзакции не увидит изменения, пока они не будут зафиксированы.

Он использует те же методы, что и для Volume Shadow Копирование (т. Е. Копирование при записи) для обеспечения безопасного отката перезаписанных данных и журнал CLFS для отметки транзакций, которые еще не были зафиксированы, или транзакций, которые были зафиксированы, но еще не зафиксированы. применяется полностью (в случае сбоя системы во время фиксации одним из участников).

Транзакционная NTFS не ограничивает транзакции только локальным томом NTFS, но также включает другие транзакционные данные или операции в других местах, например данные, хранящиеся в отдельных томах, локальный реестр или базы данных SQL, или текущие состояния системных служб или удаленных служб. Эти транзакции координируются в масштабе всей сети со всеми участниками, использующими конкретную службу, DTC, чтобы гарантировать, что все участники получат одно и то же состояние фиксации, и для передачи изменений, которые были подтверждены любым участником (чтобы другие могут аннулировать свои локальные кеши для старых данных или откатить свои текущие незафиксированные изменения). Транзакционная NTFS позволяет, например, создавать согласованные распределенные файловые системы в масштабе всей сети, в том числе с их локальными оперативными или автономными кэшами.

Microsoft теперь не рекомендует использовать TxF: «Microsoft настоятельно рекомендует разработчикам использовать альтернативные средства», поскольку «TxF может быть недоступен в будущих версиях Microsoft Windows».

Безопасность

В NTFS каждому файлу или папке назначается дескриптор безопасности , который определяет его владельца и содержит два списка управления доступом (ACL). Первый ACL, называемый список управления дискреционным доступом (DACL), точно определяет, какие типы взаимодействий (например, чтение, запись, выполнение или удаление) разрешены или запрещены каким пользователем или группами пользователей. Например, файлы в папке C: Program Filesмогут быть прочитаны и выполнены всеми пользователями, но изменены только пользователем, имеющим административные привилегии. Windows Vista добавляет информацию об обязательном управлении доступом в списки DACL. DACL являются основным направлением Контроль учетных записей пользователей в Windows Vista и более поздних версиях.

Второй ACL, называемый системным списком управления доступом (SACL), определяет, какие взаимодействия с файлом или папкой должны проверяться и должны ли они регистрироваться в случае успешного или неудачного действия или и того, и другого. Например, аудит может быть включен для конфиденциальных файлов компании, чтобы ее менеджеры узнавали, когда кто-то пытается удалить их или сделать их копию, и удастся ли ему или ей.

Шифрование

Шифрованная файловая система (EFS) обеспечивает надежное и прозрачное для пользователя шифрование любого файла или папки на томе NTFS. EFS работает вместе со службой EFS, Microsoft CryptoAPI и библиотекой времени выполнения файловой системы EFS (FSRTL). EFS работает путем шифрования файла с помощью массового симметричного ключа (также известного как ключ шифрования файла или FEK), который используется, поскольку для шифрования и дешифрования больших объемов данных требуется относительно небольшое количество времени. чем при использовании шифра с асимметричным ключом . Симметричный ключ, который используется для шифрования файла, затем шифруется с помощью открытого ключа, связанного с пользователем, который зашифровал файл, и эти зашифрованные данные сохраняются в альтернативном потоке данных зашифрованного файла. Чтобы расшифровать файл, файловая система использует закрытый ключ пользователя для расшифровки симметричного ключа, который хранится в потоке данных. Затем он использует симметричный ключ для дешифрования файла. Поскольку это делается на уровне файловой системы, это прозрачно для пользователя. Кроме того, в случае потери пользователем доступа к своему ключу в систему EFS была встроена поддержка дополнительных ключей дешифрования, так что агент восстановления может получить доступ к файлам при необходимости. Шифрование с помощью NTFS и сжатие с помощью NTFS взаимоисключают; однако NTFS можно использовать для одного и стороннего инструмента для другого.

Поддержка EFS недоступна в версиях Windows Basic, Home и MediaCenter, и ее необходимо активировать после установки версий Windows Professional, Ultimate и Server или с помощью средств корпоративного развертывания в доменах Windows.

Квоты

Дисковые квоты были введены в NTFS v3. Они позволяют администратору компьютера с версией Windows, поддерживающей NTFS, устанавливать пороговое значение дискового пространства, которое могут использовать пользователи. Это также позволяет администраторам отслеживать, сколько дискового пространства использует каждый пользователь. Администратор может указать определенный уровень дискового пространства, который пользователь может использовать до получения предупреждения, а затем отказать пользователю в доступе, как только он достигнет своего верхнего предела пространства. Дисковые квоты не учитывают прозрачное сжатие файлов NTFS, если оно включено. Приложения, которые запрашивают количество свободного места, также будут видеть количество свободного места, оставшегося для пользователя, к которому применена квота.

Точки повторной обработки

Появившиеся в NTFS v3 точки повторной обработки NTFS используются путем связывания тега повторной обработки в атрибуте пользовательского пространства файла или каталога. Microsoft включает несколько тегов по умолчанию, включая символические ссылки, точки соединения каталогов и точки монтирования тома. Когда Диспетчер объектов анализирует поиск по имени файловой системы и обнаруживает атрибут повторной обработки, он повторно анализирует поиск по имени, передавая управляемые пользователем данные повторного анализа каждому драйверу фильтра файловой системы, загружаемому в Windows. Каждый драйвер фильтра проверяет данные повторной обработки, чтобы определить, связаны ли они с этой точкой повторной обработки, и если драйвер фильтра определяет совпадение, он перехватывает запрос файловой системы и выполняет свои специальные функции.

Изменение размера

Начиная с Windows Vista Microsoft добавила встроенную возможность сжимать или расширять раздел. Однако эта возможность не перемещает фрагменты файла подкачки или файлы, которые были помечены как неперемещаемые, поэтому для сжатия тома часто требуется перемещение или отключение любого файла страницы , индекса Windows Search, и любое теневое копирование, используемое System Restore. Различные сторонние инструменты могут изменять размер разделов NTFS.

Внутреннее устройство

Разрешения файловой системы NTFS в системе Windows Vista

Внутренне NTFS использует B-деревья для индексации данных файловой системы. Журнал файловой системы используется для гарантии целостности метаданных файловой системы, но не содержимого отдельных файлов. Известно, что системы, использующие NTFS, обладают повышенной надежностью по сравнению с файловыми системами FAT.

NTFS допускает любую последовательность 16-битных значений для кодирования имен (имена файлов, имена потоков, имена индексов и т. Д.), Кроме 0x0000. Это означает, что поддерживаются блоки кода UTF-16, но файловая система не проверяет правильность последовательности UTF-16 (допускает любую последовательность short значения, не ограниченные стандартом Unicode). В пространстве имен Win32 любые единицы кода UTF-16 нечувствительны к регистру, тогда как в пространстве имен POSIX они чувствительны к регистру. Имена файлов ограничены 255 кодовыми единицами UTF-16. Некоторые имена зарезервированы в корневом каталоге тома и не могут использоваться для файлов. Это $ MFT , $ MFTMirr, $ LogFile, $ Volume, $ AttrDef, .(точка), $ Bitmap, $ Boot, $ BadClus, $ Secure, $ UpCaseи $ Extend..(точка) и $ Extend— это каталоги; остальные — файлы. Ядро NT ограничивает полные пути до 32 767 единиц кода UTF-16. Существуют некоторые дополнительные ограничения на кодовые точки и имена файлов.

Загрузочный сектор раздела (VBR)

Этот формат загрузочного раздела примерно основан на более ранней файловой системе FAT, но поля находятся в разных местах. Некоторые из этих полей, особенно поля «секторов на дорожку», «количество головок» и «скрытых секторов» могут содержать фиктивные значения на дисках, где они либо не имеют смысла, либо не поддаются определению.

ОС сначала просматривает 8 байтов в 0x30, чтобы найти номер кластера $ MFT, затем умножает это число на количество секторов в кластере (1 байт находится в 0x0D). Это значение представляет собой смещение сектора (LBA ) относительно $ MFT, которое описано ниже.

Главная таблица файлов

В NTFS все данные файла, каталога и метафайла — имя файла, дата создания, права доступа (с использованием контроля доступа списки ), а размер — хранятся как метаданные в главной таблице файлов (MFT ). Этот абстрактный подход позволял легко добавлять функции файловой системы во время разработки Windows NT — примером является добавление полей для индексации, используемых программным обеспечением Active Directory. Это также позволяет программному обеспечению быстрого поиска файлов очень быстро находить названные локальные файлы и папки, включенные в MFT, без необходимости в каком-либо другом индексе.

Структура MFT поддерживает алгоритмы, которые минимизируют фрагментацию диска. Запись в каталоге состоит из имени файла и «идентификатора файла» (аналогично индексу с номером ), который представляет собой номер записи, представляющей файл в главной таблице файлов. Идентификатор файла также содержит счетчик повторного использования для обнаружения устаревших ссылок. Хотя это сильно напоминает W_FID Files-11, другие структуры NTFS радикально отличаются.

Две копии MFT сохраняются на случай повреждения. Если первая запись повреждена, NTFS читает вторую запись, чтобы найти файл зеркала MFT. Расположение обоих файлов хранится в загрузочном секторе.

Метафайлы

NTFS содержит несколько файлов, которые определяют и организуют файловую систему. Во всех отношениях большинство этих файлов имеют структуру, как и любой другой пользовательский файл (наиболее необычным является $ Volume), но не представляют прямого интереса для клиентов файловой системы. Эти метафайлы определяют файлы, выполняют резервное копирование критически важных данных файловой системы, буферируют изменения файловой системы, управляют распределением свободного пространства, удовлетворяют ожиданиям BIOS, отслеживают неверные единицы распределения и хранят информацию о безопасности и использовании дискового пространства. Все содержимое находится в безымянном потоке данных, если не указано иное.

Эти метафайлы обрабатываются Windows специально, обрабатываются непосредственно драйвером NTFS.SYS, и их трудно просматривать напрямую: необходимы специальные инструменты. Начиная с Windows 7 драйвер NTFS полностью запрещает доступ пользователей, что приводит к BSoD всякий раз, когда делается попытка выполнить файл метаданных. Одним из таких инструментов является nfi.exe («Утилита информации о файловом секторе NTFS»), которая свободно распространяется как часть Microsoft «OEM Support Tools». Например, для получения информации о сегменте главной таблицы файлов «$ MFT» используется следующая команда: nfi.exe c: $ MFTДругой способ обойти ограничение — использовать 7 -Zip файлового менеджера и перейдите к низкоуровневому пути NTFS \. X: (где X: соответствует любому диску / разделу). Здесь появятся 3 новые папки: $ EXTEND, [DELETED](псевдопапка, которую 7-Zip использует для прикрепления файлов, удаленных из файловой системы, для просмотра) и [SYSTEM](еще одна псевдопапка, содержащая все файлы метаданных NTFS). Этот прием можно использовать со съемными устройствами (USB флэш-накопителями, внешними жесткими дисками, SD-картами и т. Д.) Внутри Windows, но делать это на активном раздел требует автономного доступа (а именно WinRE ).

Списки атрибутов, атрибуты и потоки

Для каждого файла (или каталога), описанного в записи MFT, существует линейный репозиторий дескрипторов потоков (также именованных атрибутов), упакованных вместе в один или более записей MFT (содержащих так называемый список атрибутов) с дополнительным заполнением для заполнения фиксированного размера 1 КБ каждой записи MFT, что полностью описывает эффективные потоки, связанные с этим файлом.

Каждый атрибут имеет тип атрибута (целочисленное сопоставление фиксированного размера с определением атрибута в файле $ AttrDef), необязательное имя атрибута (например, используемое как имя для альтернативного потока данных) и значение, представленное в виде последовательности байтов. Для NTFS стандартные данные файлов, альтернативные потоки данных или данные индекса для каталогов хранятся как атрибуты.

Согласно $ AttrDef, некоторые атрибуты могут быть резидентными или нерезидентными. Атрибут $ DATA, который содержит данные файла, является таким примером. Когда атрибут является резидентным (который представлен флагом), его значение сохраняется непосредственно в записи MFT. В противном случае для данных выделяются кластеры, и информация о местоположении кластера сохраняется по мере выполнения данных в атрибуте.

  • Для каждого файла в MFT, атрибуты, идентифицированные по типу атрибута, имя атрибута должно быть уникальным. Кроме того, NTFS имеет некоторые ограничения порядка для этих атрибутов.
  • Существует предопределенный тип нулевого атрибута, используемый для обозначения конца списка атрибутов в одной записи MFT. Он должен присутствовать в качестве последнего атрибута в записи (все остальное пространство хранения, доступное после него, будет проигнорировано и просто состоит из байтов заполнения, чтобы соответствовать размеру записи в MFT).
  • Некоторые типы атрибутов требуются и должны присутствовать в каждой записи MFT, за исключением неиспользуемых записей, которые просто указаны нулевыми типами атрибутов.
    • Это относится к атрибуту $ STANDARD_INFORMATION, который хранится как запись фиксированного размера и содержит отметки времени и другие базовые однобитовые атрибуты (совместимые с атрибутами, управляемыми FAT в DOS или Windows 9x ).
  • Некоторые типы атрибутов не могут иметь имени и должны оставаться анонимными.
    • Это относится к стандартным атрибутам или для предпочтительного NTFS «имени файла» тип атрибута или тип атрибута «короткое имя файла», если он также присутствует (для совместимости с DOS-подобными приложениями см. ниже). Также возможно, чтобы файл содержал только короткое имя файла, и в этом случае он будет предпочтительный, как указано в проводнике Windows.
    • Атрибуты имени файла, хранящиеся в списке атрибутов, не делают файл сразу доступным через иерархическую файловую систему. Фактически, все имена файлов должны быть проиндексированы отдельно в по крайней мере, еще один каталог на том же томе. Он должен иметь свою собственную запись MFT и свой собственный дескрипторы безопасности и атрибуты, которые ссылаются на номер записи MFT для этого файла. Это позволяет несколько раз «жестко связать» один и тот же файл или каталог из нескольких контейнеров на одном томе, возможно, с разными именами файлов.
  • Поток данных по умолчанию для обычного файла — это поток типа $ DATA, но с анонимным именем, и ADS похожи, но должны иметь имена.
  • С другой стороны, поток данных каталогов по умолчанию имеет отдельный тип, но не анонимный: у них есть имя атрибута («$ I30» в NTFS 3+), который отражает его формат индексации.

Все атрибуты данного файла могут быть отображены с помощью nfi.exe («Утилита информации о файловом секторе NTFS»), которая свободно распространяется как часть Microsoft «OEM Support Tools».

Системные вызовы Windows могут обрабатывать альтернативные потоки данных. В зависимости от операционной системы, служебной программы и удаленной файловой системы при передаче файлов могут автоматически удаляться потоки данных. Безопасным способом копирования или перемещения файлов является использование системных вызовов BackupRead и BackupWrite, которые позволяют программам перечислять потоки, проверять, следует ли записывать каждый поток в целевой том, и сознательно пропускать нежелательные потоки.

Резидентные и нерезидентные атрибуты

Чтобы оптимизировать хранилище и уменьшить накладные расходы ввода-вывода для очень распространенного случая атрибутов с очень маленьким ассоциированным значением, NTFS предпочитает помещать значение внутри самого атрибута (если тогда размер атрибута не превышает максимального размера записи MFT) вместо использования пространства записи MFT для перечисления кластеров, содержащих данные; в этом случае атрибут не будет хранить данные напрямую, а просто сохранит карту распределения (в виде прогонов данных), указывающую на фактические данные, хранящиеся в другом месте на томе. Когда к значению можно получить доступ непосредственно из атрибута, оно называется «резидентными данными» (специалистами компьютерной криминалистики ). Количество подходящих данных сильно зависит от характеристик файла, но от 700 до 800 байт обычно используются в однопоточных файлах с короткими именами файлов и без списков контроля доступа.

  • Некоторые атрибуты (такие как предпочтительное имя файла, основные атрибуты файла) нельзя сделать нерезидентными. Для нерезидентных атрибутов их карта размещения должна соответствовать записям MFT.
  • Зашифрованные NTFS, разреженные потоки данных или сжатые потоки данных нельзя сделать резидентными.
  • Формат файла карта распределения для нерезидентных атрибутов зависит от ее способности поддерживать разреженное хранилище данных. В текущей реализации NTFS, после того, как нерезидентный поток данных был помечен и преобразован как разреженный, его нельзя изменить обратно на не разреженные данные, поэтому он не может снова стать резидентным, если эти данные не будут полностью усечены, отбрасывая разреженные данные. карта распределения полностью.
  • Когда нерезидентный атрибут настолько фрагментирован, что его эффективная карта распределения не может полностью уместиться в одной записи MFT, NTFS сохраняет атрибут в нескольких записях. Первая из них называется базовой записью, а остальные — записями расширения. NTFS создает специальный атрибут $ ATTRIBUTE_LIST для хранения информации, отображающей различные части длинного атрибута в записи MFT, что означает, что карта распределения может быть разделена на несколько записей. Сам $ ATTRIBUTE_LIST также может быть нерезидентным, но его собственная карта распределения должна соответствовать одной записи MFT.
  • Когда есть слишком много атрибутов для файла (включая ADS, расширенные атрибуты или безопасность дескрипторы ), так что они не могут вместить все в записи MFT, записи расширения также могут использоваться для хранения других атрибутов, используя тот же формат, что и в базовой записи MFT, но без ограничений по пространству одной Запись MFT.

Карта распределения хранится в виде прогонов данных со сжатым кодированием. Каждый цикл данных представляет собой непрерывную группу кластеров, в которых хранится значение атрибута. Для файлов на томе размером несколько ГБ каждая запись может быть закодирована от 5 до 7 байтов, что означает, что запись MFT размером 1 КБ может хранить около 100 таких прогонов данных. Однако, поскольку $ ATTRIBUTE_LIST также имеет ограничение по размеру, опасно иметь более 1 миллиона фрагментов одного файла на томе NTFS, что также подразумевает, что в целом не рекомендуется использовать сжатие NTFS для файла. более 10 ГБ.

Драйвер файловой системы NTFS иногда пытается переместить данные некоторых атрибутов, которые можно сделать нерезидентными, в кластеры, а также пытается переместить данные, хранящиеся в кластерах обратно к атрибуту внутри записи MFT на основе правил приоритета и предпочтительного порядка, а также ограничений по размеру.

Поскольку резидентные файлы не занимают кластеры напрямую («единицы распределения»), том NTFS может содержать больше файлов на томе, чем кластеров. Например, NTFS раздел на 74,5 ГБ форматируется с 19 543 064 кластерами по 4 КБ. Вычитание системных файлов (файл журнала размером 64 МБ, файл Bitmap размером 2442888 байт и около 25 кластеров фиксированных накладных расходов) оставляет 19 526 158 кластеров свободными для файлов и индексов. Поскольку на кластер приходится четыре записи MFT, теоретически этот том может содержать почти 4 × 19 526 158 = 78 104 632 резидентных файла.

Оппортунистические блокировки

Оппортунистические блокировки файлов (oplocks) позволяют клиентам изменять свою стратегию буферизации для данного файла или потока, чтобы повысить производительность и уменьшить использование сети. Блокировки применяются к данному открытому потоку файла и не влияют на блокировки в другом потоке.

Oplocks может использоваться для прозрачного доступа к файлам в фоновом режиме. Сетевой клиент может избегать записи информации в файл на удаленном сервере, если никакой другой процесс не обращается к данным, или он может буферизовать данные упреждающего чтения, если никакой другой процесс не записывает данные.

Windows поддерживает четыре разных типа блокировок:

  • Oplock уровня 2 (или разделяемый): несколько считывателей, без записи (например, кэширование чтения).
  • Уровень 1 (или исключительный) oplock: монопольный доступ с произвольной буферизацией (т.е. кэширование чтения и записи).
  • Пакетная блокировка (также эксклюзивная): поток открывается на сервере, но закрывается на клиентской машине (т.е. чтение, запись и кэширование обработки).
  • Неустранимая блокировка фильтра (также эксклюзивная): приложения и фильтры файловой системы могут «отступать», когда другие пытаются получить доступ к тому же потоку (например, кэширование чтения и записи) (начиная с Windows 2000)

Были установлены оппортунистические блокировки улучшено в Windows 7 и Windows Server 2008 R2 с помощью ключей дополнительной блокировки для каждого клиента.

Время

Windows NT и ее потомки сохраняют внутренние временные метки как UTC и выполняют соответствующие преобразования для демонстрационных целей; все временные метки NTFS указаны в формате UTC.

По историческим причинам все версии Windows, не поддерживающие NTFS, сохраняют внутреннее время как локальное поясное время, и, следовательно, то же самое делают все файловые системы, кроме NTFS, которые поддерживаются текущими версиями Windows. Это означает, что когда файлы копируются или перемещаются между разделами NTFS и не-NTFS, ОС должна на лету преобразовывать метки времени. Но если некоторые файлы перемещаются, когда действует летнее время (DST), а другие файлы перемещаются, когда действует стандартное время, могут возникнуть некоторые неоднозначности в преобразованиях. В результате, особенно вскоре после одного из дней, когда изменяется время локальной зоны, пользователи могут заметить, что некоторые файлы имеют временные метки с ошибкой на один час. Из-за различий в реализации DST в разных юрисдикциях это может привести к потенциальной ошибке метки времени до 4 часов в любой заданный 12 месяцев.

Совместимость

Хотя разные версии NTFS по большей части полностью вперед — и обратно совместимы, существуют технические соображения для монтирования новых томов NTFS в более старых версиях Microsoft Windows. Это влияет на двойную загрузку и внешние переносные жесткие диски. Например, попытка использовать раздел NTFS с «предыдущими версиями» (также известный как теневое копирование тома ) в операционной системе, которая его не поддерживает, приведет к потере содержимого этих предыдущих версий. Утилита командной строки Windows под названием convert.exe может преобразовывать поддерживаемые файловые системы в NTFS, включая HPFS (только в Windows NT 3.1, 3.5 и 3.51), FAT16 и FAT32 (в Windows 2000 и более поздних версиях).

Начиная с Windows 10 версии 1709, известной как Fall Creators Update, Microsoft требует, чтобы файловая структура OneDrive располагалась на диске NTFS. Это связано с тем, что тег повторной обработки для каждого файла и каталога в локальной файловой структуре OneDrive устанавливается рекурсивным образом, что делает файл или папку непригодными для использования в любой предыдущей версии Windows, с любым другим драйвером файловой системы NTFS или любой файловой системой. и утилиты резервного копирования, не обновленные для его поддержки. Неизвестно, является ли рекурсивное связывание функцией файловой системы NTFS или недокументированным обходным путем Microsoft для поддержки новой функции OneDrive «Файлы по запросу».

Реализации

FreeBSD 3.2, выпущенная в мае 1999 г., включала поддержку NTFS только для чтения, написанную Семеном Устименко. Эта реализация была перенесена на NetBSD Христосом Зуласом и Яромиром Долечеком и выпущена вместе с NetBSD 1.5 в декабре 2000 года. Реализация NTFS для FreeBSD была также перенесена на OpenBSD Жюльеном Бордетом и предлагает чтение в исходном виде. -поддержка только NTFS по умолчанию на платформах i386 и amd64 начиная с версии 4.9, выпущенной 1 мая 2011 года.

ядро ​​Linux версии 2.2.0 и более поздних версий включают возможность чтения разделов NTFS; версии ядра 2.6.0 и более поздние содержат драйвер, написанный Антоном Альтапармаковым (Кембриджский университет ) и Ричардом Руссоном, который поддерживает чтение, перезапись и изменение размера файлов. Из-за сложности внутренней структуры NTFS встроенный драйвер ядра 2.6.14 запрещает изменения тома, которые считаются небезопасными, во избежание повреждения.

Mac OS X 10.3 включала реализацию NTFS Устименко только для чтения из FreeBSD. Затем Apple наняла Антона Альтапармакова для написания новой реализации NTFS для Mac OS X 10.6. Встроенная поддержка записи NTFS была обнаружена в 10.6 и более поздних версиях, но не активирована по умолчанию, хотя существуют обходные пути для включения этой функции. Однако отчеты пользователей указывают на то, что функциональность нестабильна и имеет тенденцию вызывать «паники ядра », что, вероятно, является причиной того, что поддержка записи не была включена или объявлена.

Captive NTFS, «упаковка» драйвер, который использует собственный драйвер Windows ntfs.sys, существует для Linux. Он был построен как программа Filesystem in Userspace (FUSE) и выпущен под лицензией GPL, но работа над Captive NTFS была прекращена в 2006 году.

NTFS-3G является бесплатной GPL -лицензионная FUSE-реализация NTFS, которая изначально была разработана как драйвер ядра Linux Szabolcs Szakacsits. Он был переписан как программа FUSE для работы в других системах, поддерживаемых FUSE, таких как macOS, FreeBSD, NetBSD, OpenBSD, Solaris, QNX и <247.>Haiku и позволяет читать и записывать разделы NTFS. Коммерческая версия NTFS-3G с улучшенной производительностью, называемая «Tuxera NTFS для Mac», также доступна от разработчиков NTFS-3G.

Paragon Software Group продает драйвер чтения-записи с именем NTFS для Mac OS X, которая также включена в некоторые модели жестких дисков Seagate.

Пакет NetDrive для OS / 2 (и производные, такие как eComStation и ArcaOS ) поддерживает плагин, который обеспечивает доступ для чтения и записи к томам NTFS.

Существует бесплатный драйвер чтения / записи для MS-DOS от Avira под названием «NTFS4DOS».

Ahead Software разработала драйвер «NTFSREAD» (версия 1.200) для DR-DOS 7.0x с 2002 по 2004 год. Он был частью их программного обеспечения Nero Burning ROM.

См. Также

  • Сравнение файловых систем
  • NTFSDOS
  • ntfsresize
  • WinFS
  • ReFS

Ссылки

Дополнительная литература

В чем разница между FAT32, exFAT и NTFS

Независимо от того, форматируете ли Вы внутренний диск, внешний диск, USB-накопитель или SD-карту, Windows дает Вам выбор в использовании трех различных файловых систем: NTFS, FAT32 и exFAT. Диалоговое окно «Форматирование» в Windows не объясняет разницу, поэтому мы объясним.

Файловая система обеспечивает способ организации диска. Он определяет, как данные хранятся на диске и какие типы информации могут быть прикреплены к файлам — имена файлов, разрешения и другие атрибуты. Windows поддерживает три разные файловые системы. NTFS — самая современная файловая система. Windows использует NTFS для своего системного диска и, по умолчанию, для большинства несъемных дисков.

FAT32 — это более старая файловая система, которая не так эффективна, как NTFS, и не поддерживает такой большой набор функций, но предлагает большую совместимость с другими операционными системами. exFAT — это современная замена FAT32 — и ее поддерживает больше устройств и операционных систем, чем NTFS, — но она не так широко распространена, как FAT32.

NT File System (NTFS)

NTFS — это современная файловая система, которую Windows любит использовать по умолчанию. Когда Вы устанавливаете Windows, она форматирует Ваш диск в файловой системе NTFS. NTFS имеет ограничения на размер файлов и разделов, которые теоретически настолько велики, что Вы не столкнетесь с ними. NTFS впервые появилась в версиях Windows с Windows XP, хотя изначально она дебютировала с Windows NT.

NTFS содержит современные функции, недоступные для FAT32 и exFAT. NTFS поддерживает права доступа к файлам для обеспечения безопасности, журнал изменений, который может помочь быстро восстанавливать ошибки в случае сбоя компьютера, теневые копии для резервного копирования, шифрование, ограничения дисковых квот, жесткие ссылки и различные другие функции. Многие из них имеют решающее значение для диска с операционной системой, особенно права доступа к файлам.

Ваш системный раздел Windows должен быть NTFS. Если у Вас есть дополнительный диск вместе с Windows, и Вы планируете устанавливать на него программы, Вам, вероятно, также следует сделать его NTFS. И, если у Вас есть диски, совместимость которых не является проблемой, потому что Вы знаете, что будете использовать их только в системах Windows, выбирайте NTFS.

Несмотря на свои преимущества, NTFS не хватает совместимости. Он будет работать со всеми последними версиями Windows, вплоть до Windows XP, но имеет ограниченную совместимость с другими операционными системами. По умолчанию компьютеры Mac могут читать только диски NTFS, но не записывать на них. Некоторые дистрибутивы Linux могут включать поддержку записи NTFS, но некоторые могут быть доступны только для чтения. Ни одна из консолей Sony PlayStation не поддерживает NTFS. Даже собственная Xbox 360 от Microsoft не может читать диски NTFS, хотя новые Xbox Series X, S и One могут. Другие устройства еще реже поддерживают NTFS.

Совместимость: работает со всеми версиями Windows, но по умолчанию только для чтения с Mac и может быть только для чтения по умолчанию с некоторыми дистрибутивами Linux. Другие устройства, за исключением Xbox One от Microsoft, вероятно, не будут поддерживать NTFS.

Ограничения: нет реалистичных ограничений на размер файла или раздела.

Идеальное использование: используйте его для системного диска Windows и других внутренних дисков, которые будут использоваться только с Windows.

File Allocation Table 32 (FAT32)

FAT32 — самая старая из трех файловых систем, доступных для Windows. Она был введена еще в Windows 95, чтобы заменить старую файловую систему FAT16, используемую в MS-DOS и Windows 3.

Возраст файловой системы FAT32 имеет свои преимущества и недостатки. Большим преимуществом является то, что из-за своей устаревшей файловой системы FAT32 является стандартом де-факто. Приобретаемые Вами флеш-накопители часто имеют файловую систему FAT32 для максимальной совместимости не только с современными компьютерами, но и с другими устройствами, такими как игровые консоли и все, что имеет порт USB.

Однако с этим возрастом приходят ограничения. Размер отдельных файлов на диске FAT32 не может превышать 4ГБ — это максимум. Раздел FAT32 также должен быть меньше 8 ТБ, что, по общему признанию, является меньшим ограничением, если Вы не используете диски сверхвысокой емкости.

Хотя FAT32 подходит для USB-флеш накопителей и других внешних носителей, особенно если Вы знаете, что будете использовать их на чем-либо, кроме ПК с Windows, Вам не нужно использовать FAT32 для внутреннего накопителя. Ему не хватает разрешений и других функций безопасности, встроенных в более современную файловую систему NTFS. Кроме того, современные версии Windows больше нельзя установить на диск, отформатированный в FAT32; они должны быть установлены на диски, отформатированные в NTFS.

Совместимость: работает со всеми версиями Windows, Mac, Linux, игровыми консолями и практически со всем, что имеет порт USB.

Ограничения: максимальный размер файла 4ГБ, максимальный размер раздела 8 ТБ.

Идеальное использование: используйте его на съемных дисках, где Вам нужна максимальная совместимость с широким спектром устройств, при условии, что у Вас нет файлов размером 4ГБ или больше.

Extended File Allocation Table (exFAT)

Файловая система exFAT была представлена в 2006 году и была добавлена в более старые версии Windows с обновлениями для Windows XP и Windows Vista. exFAT оптимизирован для флэш-накопителей и представляет собой легкую файловую систему, такую как FAT32, но без дополнительных функций и накладных расходов, присущих NTFS, и без ограничений FAT32.

Как и NTFS, exFAT имеет очень большие ограничения на размер файлов и разделов, что позволяет хранить файлы, размер которых намного превышает 4ГБ, разрешенные FAT32.

Хотя exFAT не совсем соответствует совместимости с FAT32, он более совместим, чем NTFS. В то время как macOS включает поддержку NTFS только для чтения, Mac предлагает полную поддержку чтения-записи для exFAT. Доступ к дискам exFAT в Linux можно получить, установив соответствующее программное обеспечение. PlayStation5 и PlayStation 4 поддерживают exFAT; у PlayStation 3 этого нет. Xbox Series X, S и One поддерживают его, а Xbox 360 — нет.

Совместимость: работает со всеми версиями Windows и современными версиями macOS, но для Linux требуется дополнительное программное обеспечение. Больше устройств поддерживают exFAT, чем NTFS, но некоторые, особенно старые, могут поддерживать только FAT32.

Ограничения: нет реалистичных ограничений на размер файла или раздела.

Идеальное использование: используйте его, когда Вам нужен больший размер файла и ограничения на разделы, чем предлагает FAT32, и когда Вам нужна большая совместимость, чем предлагает NTFS. Предполагая, что каждое устройство, с которым Вы хотите использовать диск, поддерживает exFAT, Вам следует отформатировать свое устройство с помощью exFAT вместо FAT32.

NTFS идеально подходит для внутренних дисков, в то время как exFAT обычно идеально подходит для флеш-накопителей. Однако иногда Вам может потребоваться отформатировать внешний диск с помощью FAT32, если exFAT не поддерживается на устройстве, с которым Вам нужно его использовать.

Вычислительные системы, сети и
телекоммуникации

Файловая система является одним из
самых важных компонентов сетевой
операционной системы. В первую очередь
сеть создается для разделения данных
и от того, каким образом организованы
эти данные, зависят и производительность
всей системы, и надежность, и устойчивость
функционирования. Операционная система
Windows XPпредполагает использованиеFAT32иNTFS
5.0.

Файловая система FAT32

32-разрядная файловая система содержит
многочисленные усовершенствования и
дополнения по сравнению с FAT16(см. таблицу 13_1.).

Во-первых, FAT32эффективно
использует дисковое пространство, т.
к. даже при разделе в 8 Гбайт может
использовать размер кластера 4 Кбайта.
По сравнению сFAT16экономится
до 10-15% дискового пространства.

Во-вторых, в системе можно перемещать
корневой каталог и использовать резервную
копию FAT.Более того, зеркальное
копирование можно отключить для повышения
производительности системы.

В-третьих, расширенная загрузочная
запись содержит копии критических
структур данных, например, сведенья о
таблице разделов, что повышает
отказоустойчивость системы.

В-четвертых, емкость раздела теоретически
повышается до 2 Тбайт, однако размер
создаваемого тома под Windows ХРне может превышать 32 Гбайта, но разрешается
монтировать тома большего раздела,
созданные в другой ОС, напримерWindows
98
.

FAT32плохо масштабируются. При
увеличении растет таблица расположения
файлов, следовательно, растет время
доступа к данным и время определения
свободного объема загрузочного тома
после перезагрузки.

Файловая система FAT32рекомендуется
к использованию, когда на компьютере
стоит двеОСWindows 98иWindows ХР. В этом случае, подFAT32форматируется только системный раздел,
а разделы с данными форматируются под
NTFS(см. рис. 13_1).

Загрузочный сектор

Указывает
на первый кластер корневого каталога

Корневой каталог

Может
размещаться в любом месте и содержать
до 65 535 записей

Таблица FAT

основная

Таблица FAT

Зеркальная,
может быть отключена

Другие папки
и файлы

Рис.13_1. Структура тома FAT32

Таблица 13_1. Основные характеристики
FAT32

Характеристика

Значение

Максимальный
размер тома

2 Тбайт

Максимальный
размер файла

2 Тбайт

Правила
именования

255
символов Unicode,
допустимы несколько разделителей

Максимальная
длина пути доступа

не ограничена

Каталоги

не сортированы

Основная
концепция

эффективное
использование дискового пространства

Размер
корневого каталога

65 535 элементов

Сжатие
на уровне файлов

нет

Встроенные
средства

безопасности

нет

Файловая система NTFS

Файловая система NTFS 5.0дляWindows
XPотличается
от реализацииWindows NT4.0,т. к. содержит ряд улучшений. К ним
относятся:

  1. Возможность квотирования дисков, т.е.
    выделять каждому пользователю максимально
    возможный размер дискового пространства,
    за пределы которого он выйти не может;

  2. Возможность сжатия отдельных файлов
    и папок на разделе;

  3. Возможность шифрования файлов с помощью
    EFS (Encrypting File System)на основе
    алгоритма открытого ключа.

Как NTFS 5.0, так иNTFS 4.0поддерживают встроенные механизмы
защиты файлов и папок на основе разрешений
на доступ.

NTFS хранит данные отличным отFATобразом. В начале диска
загрузочный сектор, который содержит
информациюBIOSо структуре тома
и файловой системе, и код о местоположении
системных файлов для загрузки. В этом
загрузочном секторе присутствует
таблицаMFT (Master File Table), которая
содержит информацию о файлах в своих
записях и метаданные. Следом за ней идет
зеркальная копияMFT.Каждый файл
представлен своим именем, размером,
датой и временем создания, правами
доступа и его содержимым. Если файл
содержит слишком много атрибутов или
сильно фрагментирован, то может
понадобиться больше, чем одна запись.
Тогда первая запись о файле (базовая)
содержит ссылку на внешнее хранилище
данных, где хранятся остальные записи
о файле.MFTсодержит информацию
и о себе самой.NTFSрезервирует
первые 16 записей под метаданные вMFT,
которые используются для реализации
структуры файловой системы. Если страдает
первая записьMFT, то файловая
система считывает вторую, чтобы найти
дубликатMFT. В конце раздела
всегда находится дубликат загрузочного
сектора (рис.13_2).

Сами записи о файлах размещаются в двух
килобайтных элементах, из которых 512
байт отводится на имя файла и расширенный
список атрибутов, а остальное — на
данные. Короткие файлы помещаются в
элемент целиком, а большие располагаются
на диске с помощью ссылочных механизмов
типа B-деревьев.

Загрузочный сектор

MFT, MFT-Mirrow,
местоположение системных файлов для
загрузки

Внешнее

хранилище

данных

Загрузочный сектор

дубликат

Рис. 13_2. Структура тома NTFS 5.0

Основные характеристики NTFSпредставлены в таблице 13_2. Преобразование
томовFATвNTFS возможно с
помощью утилитыCONVERT.EXE.Обратное
преобразование

не
поддерживается!

Таблица 13_2. Основные характеристики
NTFS

Характеристика

Значение

Максимальный
размер тома

16 Эбайт

Максимальный
размер файла

16 Э Гбайт

Правила
именования

255 символов
Unicode, допустимы несколько
разделителей

Максимальная
длина пути доступа

не ограничена

Каталоги

двоичное
дерево

Основная
концепция

быстрота,
восстанавливаемость, безопасность

Размер
корневого каталога

не ограничена

Сжатие на
уровне файлов

не ограничена

Встроенные средства безопасности

разрешения
на доступ

Дополнительные
средства управления

Сжатие,
квотирование, шифрование

Выбор файловой системы

При выборе файловой системы Microsoftпредлагает администраторам системы
придерживаться следующих правил:

  1. Единственная причина, для которой
    используется FAT – это
    многовариантная загрузка;

  2. В других случаях выбор осуществляется
    на основании иных критериев. Тома FATпреобразуются в томаNTFS 5.0только
    с согласия пользователя. Табл. 13_3
    отражает результаты сравнительного
    анализа по рекомендуемым характеристикам
    файловым системам.

Табл. 13_3. Характеристики файловых систем

Ограничения

NTFS

FAT
и
FAT 32

Размеры
тома

Минимальный размер
тома составляет приблизительно 10 Мб.

FATподдерживает
различные размеры томов — от объема
дискет и до 4 Гб.

На практике
рекомендуется создавать тома, размеры
которых не превышают 2 Тб.

FAT 32
поддерживает тома объемом от 2 гб. до
2 Тб. Работая под управлением Windows
XP
для Fat
32
можно отформатировать
тома, размер которых не превышает 32
Гб.

С помощью
NTFS
нельзя форматировать дискеты.

Не
поддерживаются диски размеры, которых
меньше 512 Мб.

Размеры
файлов

Теоритически размер
файла может составлять 16 экзабайт.

FAT
поддерживает файлы размером не более
2 Гб. FAT 32
поддерживает файлы размером не более
4 Гб.

Дополнительные файловые системы

При использовании Active Directoryвозможна организация распределенной
файловой системыDFS (Distributed File System)и службы репликации файловFRS (File
Replication
Service).DFS представляет
файлы различных серверов, таким образом,
как если бы они находились на одном
компьютере. Для синхронизации содержимого
между репликамиDFSиспользуетсяFRS.

Соседние файлы в папке Lekcii

  • #

    22.08.2013871 б18.listing

  • #
  • #
  • #
  • #
  • #
  • #
  • #
  • #
  • #
  • #

Понравилась статья? Поделить с друзьями:
  • Максимальный размер папки в windows 10
  • Максимальный размер оперативной памяти для 64 битных версий windows 10
  • Максимальный размер озу для windows xp
  • Максимальный размер названия файла в windows
  • Максимальный размер логического диска windows 7