Format of common file systems

Source: Internet
Author: User

The file system is the short name of a file management system, which, according to Wikipedia, is used to organize how data is stored on storage media and how it is retrieved. Without a file system, the information on the storage medium will be a large piece of information, there is no way to know when a message will end, and can not know when the information began, the management of information will be very troublesome.

?? There are many types of file systems, each of which is different in structure, logic, access speed, flexibility, security, size, and so on.

?? File systems can be used on many different storage devices (storage devices), these storage devices use different media (media), such as tapes, removable hard disks, flash memory, etc., sometimes, the main memory (RAM) of the computer will even create a temporary file system to use when it comes.

?? In short, the file system has a lot of categories, but also very complex, and want to understand the principle of the file system, there are many things to learn, here are only some of the usual in the use of different operating systems may use some knowledge, several different systems common file system format.

Format of common file systems

Common file systems for Windows systems

FAT

Wikipedia FAT file system

?? The fat (file Allocation Table) file system was originally created in 1977 as a file system for floppy disks, but later with Microsoft's launch of DOS and Win 9x systems, the FAT file system was adapted to the hard drive, and for 20 years, has been the mainstream file system.

?? Later with the development of hardware technology, the capacity of the hard disk is more and more large, this file format has been expanded gradually, appeared fat12,fat16,fat32 and other file systems, and even later appeared the FAT64 file system.

?? Today, fat is no longer a mainstream filesystem for windows, but it is common on floppy disks, flash memory (U-disk), and many embedded devices.

?? For details, there are several tables on Wikipedia, which can be found in the relevant information.
?? At present the most common is FAT32, many u disk is the FAT32 format, about FAT32 file system, the following points are worth noting:

A maximum of 4G per file
Maximum number of files 268,435,437
Partition Maximum Capacity 8TB
Can read and write on multiple operating systems
Sometimes, when we copy large files to the U-disk, we will find that the copying is not in, actually because this USB stick is FAT32 format.

Ntfs

?? The NTFS full name is the new technology file system, which is a more powerful filesystem than the FAT32 feature.
?? The default file system for Windows systems after Windows 2000 is NTFS, and these Windows systems can only be installed on NTFS-formatted disks.
NTFS has the following characteristics:

Theoretically the largest file size can be up to 16eb-1kb, in fact there is 16tb-64kb (1EB = 1024PB 1PB = 1024TB, as to why the theory and the actual why so much, did not conduct in-depth research, it is possible that the current technology is not enough to create such a large disk)
Maximum number of files up to 232-1
The operating system supports most Windows systems, Unix/linux systems, Mac OS (on Mac OS 10.4+ systems, NTFS format is read-only, that is, under Mac systems, you can only read data from NTFS-formatted disks and not write data)
NTFS system is a log file system, the operation of the file in the system can be recorded, when the system crashes, the use of log function can repair the data
?? Because NTFS is read-only under the Mac system, to write data to an NTFS-formatted hard disk in a Mac, a plugin Paragon NTFS is said to be not too stable.
3. Extfat

?? ExFAT (Extended file Allocation Table), also known as FAT64, is known as the extension of the FAT file system.
?? E under the FAT is a file system developed by Microsoft, but said it is not suitable for Windows file system, it is specifically designed for the Flash disk file system, a single file breakthrough 4G limit, and the maximum capacity of the partition up to 64ZB (larger than EB), recommended 512TB.
?? exFAT on the Windows,linux and Mac system, can read and write, as a U disk or the format of the mobile hard drive is more appropriate.

Common file systems for MAC OS systems

hfs/hfs+
?? The HFS full name is called a layered file system (hierarchical Files SYSTEM,HFS), which was originally designed for floppy disks and hard disks, and can also be seen on read-only media such as CD-ROM, which was created in 1985.
?? Hfs+ is an improved version of HFS that supports larger files and uses Unicode to name files or folders instead of Mac OS Roman or some other character sets.
?? The maximum file size of hfs+ can reach 8EB and the number of files can reach 232-1.
?? Because these two file formats are Apple's proprietary file system, the HFS partition is not visible under the Windows system.
Common file systems for Linux systems

?? These file systems are not very informative on Wikipedia, so they are directly copied.

Ext2
?? Wikipedia English: Https://en.wikipedia.org/wiki/Ext2
?? Wikipedia Chinese: https://zh.wikipedia.org/wiki/Ext2

?? The second-generation extended file System (English: Second extended filesystem, abbreviated as EXT2), is the file system used by the Linux kernel. It began to be designed by Rémycard in place of ext and joined Linux core support in January 1993. Ext2 's classic implementation of the Linux kernel in the ext2fs file system driver, the largest supporting 2TB file system, to the Linux core version 2.6, extended to support 32TB. Other implementations include GNU Hurd,mac OS X (3rd party), Darwin (3rd party), BSD.
?? Ext2 is a default file system for several Linux distributions, such as Debian, Red Hat > Linux.
Ext3
?? Wikipedia English: Https://en.wikipedia.org/wiki/Ext3
?? Wikipedia Chinese: https://zh.wikipedia.org/wiki/Ext3

?? The third-generation extended file System (English: Third extended filesystem, abbreviated as EXT3), is a log file system that is commonly used in Linux operating systems. It is the default file system for many Linux distributions. In the February 1999 kernel mailing list [2], Stephen Tweedie first showed that he used the extended ext2, which began with the 2.4.15 kernel and merged into the kernel mainline [3].
?? Its performance (speed) is not as good as its competitors, such as Jfs2,reiserfs and XFS, but it has an important advantage that it allows upgrades from popular ext2 file systems at the right time without the need to back up and recover data; It also has a lower CPU usage than ReiserFS and XFS.
?? Although Ext3 has a number of advantages over EXT2, it has some disadvantages:
(1) Ext3 will clear the block metrics in the file's node (inode) when the file is deleted. This can reduce access to the file system when the unclean is loaded into the file system and the log is replayed. But it also adds to the difficulty of removing the files above the anti-deletion. The only remedy for the user is to skim the data on the hard drive and to know the block metrics from the beginning to the end of the file. While providing a slightly higher level of security than ext2 in deleting files, there is also an unavoidable inconvenience.
(2) EXT3 does not support transparent compression (EXT2 is supported by unofficial patches).
(3) Size limit, see table below.

Block size maximum file size Maximum file system size
1kb16gb2tb
2kb256gb8tb
4kb2gb16tb
8kb16gb32tb
(4) Ext3 does not do checksum when writing to the log. If Barrier=1 does not act as a load parameter (in file/etc/fstab), and if the hardware is in an out-of-order write cache, it can severely damage the file system when it crashes (this option is not enabled in most popular Linux distributions, so most distributions are in a dangerous situation.) )
3. Ext4
?? Wikipedia English: HTTPS://EN.WIKIPEDIA.ORG/WIKI/EXT4
?? Wikipedia Chinese: HTTPS://ZH.WIKIPEDIA.ORG/WIKI/EXT4
EXT4 has the following characteristics

Large File system
?? The Ext4 file system can support up to 1 exbibyte of partitions [6] with files up to a maximum of tebibyte.
Extents
?? Ext4 introduced the extent file storage method to replace the block mapping mode used by EXT2/3. Extent refers to a series of contiguous entity blocks, which can increase the efficiency of large files and reduce the fragmentation of files. The single extent supported by the EXT4 is up to 128mb[1 in a single block 4KB system. 4 extent can be stored in a single inode, and more than four extent will be indexed in htree manner.
Backward compatible
?? EXT4 is backwards compatible with ext3 and ext2, so ext3 and ext2 file systems can be mounted as EXT4 partitions. Due to the new functions of some ext4 can be directly used on the ext3 and ext2, directly mounted can improve a little performance.
The ext3 file system can be partially upward compatible with EXT4 (that is, the Ext4 file system can be mounted as a ext3 partition). However, if the EXT4 using the extent technology will not be mounted as ext3.
Reserved space
?? EXT4 allows disk space to be reserved for a file beforehand. The way most file systems do this now is to produce a file that fills 0 directly; Ext4 and XFS can use a new system in the Linux core to call "Fallocate ()" To get enough headroom.
Delayed access to space
?? Ext4 uses a method called Allocate-on-flush, which starts acquiring space before the data is written to disk (sync), and most file systems get the space they need before they can. This way, you can increase performance and reduce the degree of file dispersion.
32000 sub-directory limit exceeded
?? There can be up to 32,000 subdirectories in a directory of ext3. The EXT4 can be up to 64000 subdirectories, and will be higher with the "Dir_nlink" feature (although the parent directory's link count stops increasing). To prevent performance from being affected by a large number of catalogs, Ext4 opens the Htree (a special B-tree) indexing feature by default. This feature has been implemented in Linux core 2.6.23.
The log checksum
?? EXT4 uses the checksum feature to improve file system reliability because the log is one of the most frequently read parts of the disk. Another benefit of this feature is the ability to safely avoid disk I/O waiting during log processing while slightly improving performance. The technology for log checksums stems from a research paper called Iron File Systems at the University of Wisconsin (see section Sixth, transaction checksums checksum processing) [7]
Online disk Grooming
?? There are many drafts for the online defrag tool, but none of these drafts are included in the mainstream kernel. Even though the EXT4 contains many techniques to avoid disk fragmentation, disk fragmentation is inevitably present in a long-used file system. EXT4 will have a disk-finishing tool [8].
Quick File System Check
?? EXT4 blocks unused chunks in the inode, which allows tools such as e2fsck to completely skip these chunks while the disk is being checked, saving a lot of time for file system checks. This feature is already implemented in the 2.6.24 version of the Linux kernel.

Format of common file systems

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.