This paper mainly describes the more popular Linux ext2 file system on the hard disk partition of the detailed layout. The next version of the Ext2 file system plus log support is the Ext3 file system, it and the Ext2 file system in the hard disk layout is the same, the difference is only the ext3 file system on the hard disk a special Ino de (can be understood as a special file), to record the file system log, Also known as the journal. Since this article does not discuss log files, the contents of this article are applicable to both ext2 and ext3. 1, preface this article source is the Linux kernel ext3 file system source code. In order to facilitate reader access to the source code, some of the key technical terms in this article are used in the kernel source code used in English words, without the use of the corresponding Chinese translation. (This method is appropriate, but also ask readers to advise.) 2, a rough description for the ext2 file system, the hard disk partition is first divided into blocks, a ext2 file system each block is the same size, but for different ext2 file systems, block size can be different. The typical block size is 1024 bytes or 4096 bytes. This size is determined when the Ext2 file system is created, it can be specified by the system administrator, or the file system creator can automatically select a reasonable value based on the size of the hard disk partition. These blocks are grouped together into several large block groups. How many blocks in each block group are fixed. Each block group corresponds to a group descriptor, and these group descriptor are clustered together at the beginning of the hard disk partition, following the Super block. The so-called super block, we have to discuss below. There are several important block pointers in this descriptor. The block pointer we are talking about here refers to the block number on the hard disk partition, for example, the value of the pointer is 0, we say it points to block 0 on the hard disk partition, the pointer value is 1023, and we say it points to block 1023 on the hard disk partition. We notice that the block count on a hard disk partition starts at 0, and that this count is global for this hard disk partition.
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