EFS (Extent File System) The Extent File System (EFS) was developed by Silicon Graphics for use on IRIX systems before version 5.3. On IRIX 6.0 and after, the XFS file system is used. As the name suggests, files are stored in Extents. EFS does not track file locations by block addresses. Instead, a pointer points to the first block, and a counter specifies how many contiguous blocks are used. This storage technique helps provide faster disk access by files being contiguous and only requiring one read from the file table. Reduction of fragmentation helps EFS, but fragmentation is still possible. A single file size can theoretically be in the terabytes, but in actuality is about 2 GB. Keep in mind that EFS is limited to a maximum of an 8 GB volume. By using extents, the result is that there is less file management overhead for large files, if they are contiguous. Each extent can contain from 1 to 248 contiguous blocks. EFS uses 128-byte inodes. An inode stores metadata about the files, directories and other objects. Each file created also has an inode created as well. Each inode contains 12 addresses to point the extents. If the file exceeds the 12 extent addresses because of fragmentation and/or file size, then indirect extents are created. These indirect extents contain the actual data, but help extend the inode addressing issue. To track used and free space, a bitmap is used. The bitmap is not to be confused with a graphics file. The bitmap is a mapping of a bit (0 or 1) to each block. A 1 indicates the block is free, while a 0 represents it is used. The EFS Superblock, located at Block 1, consists of: Number of sectors used by the file system – value is set when mkfs creates a file system Block offset to the first cylinder group Size in blocks of the cylinder group Sectors per track Heads per cylinder Number of cylinder groups in the file system File system needs to be checked (fsck) Time of last update of Superblock Magic number – either 0x072959 or 0x07295A Name of the file system Name of file system pack Size of bitmap (in bytes) Number of free data blocks Number of free inodes Location of bitmap Location of Superblock backup Volume checksum of file system Extra space used for expansion of the superblock Let’s look at some of these items to help clear up anything that isn’t clear. The number of sectors refers to an individual section of a track, sometimes called a block. Each track has the same number of sectors. The track, or cylinder, is a circular path around the disk platter. Each platter, like a CD or double sided CD, has one or two read/write heads (depending if it is double sided). A cylinder group is a group of tracks, or cylinders. Now that these basics are out of the way, the number of sectors is a count of all of the sectors in the volume. The volume can be the whole disk or a partition. The block offset to the first cylinder group is usually after the superblock bitmap. The cylinder group contains its own inodes and data blocks, or extents. The size in blocks of the cylinder group is based on the hard disk itself, since each vary in size. The value also can depend on the partition size if a whole disk is not used. Sectors per track will also vary on the hard disk. Some hard disks may have a higher quality magnetic media and read/write heads that read/write in a smaller space to allow for more sectors per track. The heads per cylinder is a count of the heads or the number of writeable platters. For example, if there are two platters and each are double-sided, there should be 4 heads per cylinder. The number of cylinder groups which exist on the EFS volume is set at the time of the file system’s creation. File system check is a flag used to determine if the volume was unmounted properly before a shutdown. If the system suffered a power loss, the unmount process would not set the flag to show it was unmounted properly. When the system came back online, the flag would be checked when the EFS volume was mounted. If the flag is set, a file system check (fsck) will be performed. NOTE: When an EFS volume is mounted, the Superblock is checked. If the bit is set to perform a file system check, then it is done before the volume is mounted. When the checked bit is referred to, the checksum is also compared to the checksum stored in the superblock. If the two do not match, a file system check (fsck) is performed. Whenever the Superblock is modified, a time stamp is made in the Superblock to show when the modification took place. The Magic Number is a value in the Superblock to show that the file system is EFS. The two values associated with EFS are 0x072959 and 0x07295A. One of these values should be used to signify EFS. The name of the file system is the name where it is mounted. The name of the file system pack is the volume name on which EFS resides. The size of the bitmap will vary depending on the number of blocks in the volume. This value depends on the hard disk or partition size. Each bit in the bitmap represents one block, so the bitmap is large for larger volumes. The number of free data blocks is a value to represent how many blocks on the volume are unused. The number of free inodes contains a value to represent how many inodes are available to be used. Remember that one inode represents one file. The location of the bitmap, which is usually Block 2, is an address to show where the bitmap is located. It may be different if the logical volume has been extended. The location of the Superblock backup is an address to point to its location. NOTE: The last block on a file system is used to store a copy of the Superblock. This can be termed Superblock Mirroring. The volume checksum is a checksum of all superblock values, not including itself. On mounting, a checksum is created and compared to the one in the Superblock. If the two do not match, a file system check (fsck) is performed. Finally, there is extra space left for expansion of the Superblock in the future. There may be no future for EFS since XFS is an extension to it.