Introduction of NTFS File System
Chapter One Introduction
NTFS is with the Windows NT operating system produced, called "NT File System", Chinese word for NT file system, now is the windows operating system in the main class format the partition. Its advantage is security and stability is extremely good, easy to produce in the use of file fragmentation, NTFS partition for user rights to a very strict limits, according to each user only given permission to operate the system, any attempt to override The operating system will be banned, but it also provides a fault-tolerant configuration log, you can record all the user's operation, thereby protecting the security of the system.
NTFS is a file system with error warning. As the NTFS file system information critical systems using redundant storage, and therefore when a sector on the disk is damaged, NTFS can still access critical data on the volume. NTFS partition the beginning of the 16 sectors is the partition boot sector, to save the partition boot code, followed by the Master File Table (MFT), if the MFT where the damaged disk sectors, NTFS file system will transfer MFT to other sectors to the hard drive, thus ensuring the normal operation of the NTFS file system and Windows operating systems. Than the previous FAT FAT16 and FAT32 file systems (file allocation table), FAT can only be fixed at the back of the boot sector of the partition, once the sector, will paralyze the entire file system, NTFS file system is obviously more advanced . However, this move MFT practice but it is not perfect, if the partition boot code pointing to the part of the MFT errors, then the NTFS file system will not know where to look for MFT, which will report "Disk not formatted" error message . To avoid such problems, the partition boot code will contain some calibration procedures, responsible for debugging.
The second chapter NTFS Overview
NTFS is Mircrosoft introduced a new file system. The main purpose of Mircrosoft NTFS file system is introduced it as WindowsNT/2000/XP and server versions of the default file system. NTFS goal is to get reliability. Efficiency and safety.
2.1 NTFS features
Ø It provides a fault-tolerant configuration log, you can effectively protect the security of the system. NTFS is a recoverable file system. On an NTFS partition users rarely need to run disk repair program. NTFS by using standard transaction logging and recovery techniques to ensure the consistency of the partition.
Ø Its scalable architecture based on the use of conventional special data structure management. In all of the NTFS file system data files are considered, is usually hidden in other file systems to manage data in NTFS files are also stored in the file system management data can be stored as a regular file in the file system of any location.
Ø support for NTFS partitions compression. folders and files.
Ø In the NTFS partition, you can share resources folder and file to set access permissions, permission settings include two aspects: First, what group or user files and folders to access shared resources. The second is to get a group or user access permissions can be what level of access.
Ø In the next Windows 2000 NTFS file system disk quota management. Disk quotas that administrators can limit the amount of disk space quota can be used by users, each user can only use the maximum disk space quota limits.
Ø NTFS as the Windows operating system's standard file system also supports distributed free of charge by most Unix versions.
Ø NTFS support for high-capacity disk storage, can support volume sizes up to 2TB.
Ø NTFS on the FAT file system, also using the "cluster" as the smallest unit of data inch taken. However, since it all the data, including the file system management data is managed as a file, the NTFS file system with all of the sectors are assigned cluster number, and zero for all the cluster number of the file system 0 number of the starting position of the sector cluster number 0.
2.2 NTFS basic concepts
MFT, that is the main file allocation table for short, which is the core of the NTFS file system. MFT MFT entry by one or more (documentation), each MFT entry occupies 1024 bytes of space.Front of dozens of bytes for each MFT entry has a fixed header structure used to describe information about the MFT entries. The following byte for storing "attributes." Each file and directory information are included in the MFT, each file and directory in the table at least a MFT entry. Early boot sector, the visit before any other one must first visit MFT, MFT entries to find the file in the MFT, MFT entries to find content based on the information in the records and access it.
In NTFS, all data-related information are called "attributes", NTFS biggest differs from other file systems is that most of the contents of the file system to read and write files, and NTFS is the file that contains the contents of read and write attributes.
In the data structure, properties can be divided into resident and non-resident property attributes
Resident property. Some attribute its properties is very small, it's MFT entry can accommodate it in its entirety, in order to save space, the system will be stored directly in the MFT entry, rather than its allocated another cluster space, said such a property Permanent property
Non-resident property. Non-resident property refers to those elements greater can not be completely stored in its properties MFT entry. If the data file attributes, usually great content, you need to assign another outside the MFT enough space for storage clusters, such property is non-resident property.
2.3 NTFS metafile
NTFS file system is created, will also establish some important system information. These systems are also full of information exists in the form of documents, called metafile. Metafile file name are to $ beginning symbol, which means that it is a hidden system file, the user can not directly access.
NTFS file under a total of $ 17, its specific meaning as follows:
$ MFT: it is in fact the entire master file table, that is, the entire MFT seen as a file.
$ MFTMirr: Backup first few MFT MFT entries, NTFS also be viewed as a file.
$ LogFile: log files.
$ Volume: volume file that contains the label and the other version.
$ AttDef: attribute defines the list of names and type definitions for each attribute.
$ Root: the root directory of the file.
$ Bitmap: a bitmap file, its data attributes for each bit corresponds to a cluster file system, used to describe the distribution of clusters.
$ Boot: boot file, DBR sector is the first sector of the boot file.
$ BadClus: bad cluster log file.
$ Quota: Early NT system disk quota information is recorded.
$ Secure: Security documents.
$ UpCase: case character conversion table files.
$ Extend metadata directory: Extended metadata catalog.
$ Extend \ $ Reparse: reparse point file.
$ Extend \ $ UsnJrnl: change log file.
$ Extend \ $ Quota: Quota Management files.
$ Extend \ $ ObjId: Object ID documents.
Chapter III NTFS file system layout
An NTFS file system can be roughly divided into the boot sector, MFT, MFT backup area, DBR backup data area and several parts of the sector. Because all the data NTFS as the file, in theory, in addition to the boot sector must be located outside the first sector, NTFS volumes can store any file in any location, but usually will follow a habit layout. Under XP system NTFS volume roughly layout as shown below:
1) boot sector. Boot portion includes DBR and boot code, assigned to the general system 16 sectors, are not fully used.
2) MFT zone. A file system "MFT" area, the "MFT Zone" is a contiguous cluster space, unless other spaces have all been allocated for use, otherwise they would not in this space to store user files or directories. NTFS in WINXP created its MFT is usually far from the boot sector, but NTFS under WIN2000 created its MFT clusters usually starting at the 4th position.
3) MFT backup area. Due to the importance of MFT backup in the middle of the file system for saving a backup, but the backup is very small, just a few items before the backup MFT.
4) backup boot sector sector. Volume in the last sector, a saved backup DBR sector. This sector contains the size of the partition in the partition table described, but not in the DBR file system within the size range described. When DBR description file system size, always score zone table describes a small number of sectors sectors.
Chapter IV DBR (boot sector)