2.2. Summary information Associated with the super block is non replicated summary information. The summary information changes as the ﬁle system is modiﬁed. The summary information contains the number of blocks, fragments, inodes and directories in the ﬁle system. †The actual number may vary from system to system, but is usually in the range 5-13.
SMM:3-4 The UNIX File System Check Program 2.3. Cylinder groups The ﬁle system partitions the disk into one or more areas called cylinder groups. A cylinder group is comprised of one or more consecutive cylinders on a disk. Each cylinder group includes inode slots for ﬁles, a block map describing available blocks in the cylinder group, and summary information describing the usage of data blocks within the cylinder group. Axed number of inodes is allocated for each cylinder group when the ﬁle system is created. The current policy is to allocate one inode for each 2048 bytes of disk space this is expected to be far more inodes than will ever be needed. All the cylinder group bookkeeping information could be placed at the beginning of each cylinder group. However if this approach were used, all the redundant information would be on the top platter. A single hardware failure that destroyed the top platter could cause the loss of all copies of the redundant super-blocks. Thus the cylinder group bookkeeping information begins at a ﬂoating offset from the beginning of the cylinder group. The offset for the i+1st cylinder group is about one track further from the beginning of the cylinder group than it was for the ith cylinder group. In this way, the redundant information spirals down into the pack any single track, cylinder, or platter can be lost without losing all copies of the super-blocks. Except for the ﬁrst cylinder group, the space between the beginning of the cylinder group and the beginning of the cylinder group information stores data. 2.4. Fragments To avoid waste in storing small ﬁles, the ﬁle system space allocator divides a single ﬁle system block into one or more fragments. The fragmentation of the ﬁle system is speciﬁed when the ﬁle system is created each ﬁle system block can be optionally broken into 2, 4, or 8 addressable fragments. The lower bound on the size of these fragments is constrained by the disk sector size typically 512 bytes is the lower bound on fragment size. The block map associated with each cylinder group records the space availability at the fragment level. Aligned fragments are examined to determine block availability. On ale system with a block size of 4096 bytes and a fragment size of 1024 bytes, ale is represented by zero or more 4096 byte blocks of data, and possibly a single fragmented block. If ale system block must be fragmented to obtain space fora small amount of data, the remainder of the block is made available for allocation to other ﬁles. For example, consider an 11000 byte ﬁle stored on a 4096/1024 byte ﬁle system. This ﬁle uses two full size blocks and a 3072 byte fragment. If no fragments with at least bytes are available when the leis created, a full size block is split yielding the necessary 3072 byte fragment and an unused 1024 byte fragment. This remaining fragment can be allocated to another leas needed.