File System
File System
Superblock The first addressable logical block on the file system is the superblock. The superblock contains information such as the file system name, size, number of inodes, and date/time of creation. The superblock is critical to the file system and, if corrupted, prevents the file system from mounting. For this reason a backup copy of the superblock is always written in block 31. Inodes Immediately following the superblock are inodes which contain identifying information for files, such as the file type, size, permissions, user/group/owner, and create/modification and last access dates. They also contain pointers to the data blocks for fragment addresses which hold the data. Indirect blocks For larger files the system creates sets of indirect blocks filled with data block addresses to point to the data block or fragments which hold the data
You can create large files with the JFS file system type. JFS supports fragmented and compressed file systems, which save disk space by allowing a logical block to be stored on the disk in units or "fragments" smaller than the full block size of 4096 bytes
Enhanced Journaled File System (JFS2) is a file system, introduced in AIX 5.1, that provides the capability to store much larger files than the existing Journaled File System (JFS). You can make an point-in-time image of a JFS file system or of a JFS2 file system (AIX 5.2 and later), which you can then use for backup purposes. There are differences, however, in the requirements and behavior of this image for each file system type. JFS file systems are fully compatible within AIX 5.1 and AIX 5.2. Previous supported versions of the operating system are compatible with the current JFS, although file systems with a nondefault fragment size, NBPI value, or allocation group size might require special attention if migrated to a previous version
crfs
chfs
Change file system characteristics. This can be used to increase the size of a file system. Remove a filesystem, its associated logical volume, and its entry in /etc/filesystems.
rmfs
Technical Features
JFS is a modern file system supporting many features, a few of which are listed here. fully 64-bit dynamic space allocation for i-nodes, i.e. no running out of i-nodes on file systems with large number of small files Directory structures designed for speed and efficiency: - directories with eight or fewer entries have their contents storied inline within that directory's i-node.- directories with more than eight entries have their contents stored in a B+ tree keyed on name.JFS utilizes extents for allocating blocks for large files. Support for extended attributes in addition to standard Unix-style permissions. Support for both internal and external logs (see below) Extremely Scalable; Consistent performance from minimum file size up to 4 petabytes. Algorithms designed for high performance on very large systems
Performance tuned for GNU/Linux Designed from the ground up to provide Transaction/Log (not an add-on) Restarts after a system failure < 1 sec Proven Journaling FS technology (10+ years in AIX) Original design goals: Performance, Robustness, SMP Team members from the original AIX JFS Designed/Developed this File System Designed to operate on SMP hardware, with code optimized for at least a 4-way SMP machine
NOTE: JFS uses a journal to maintain consistency of metadata only. Thus, only consistency of metadata (and not actual file contents) can be assured in the case of improper shutdown. This is also the case for XFS and ReiserFS. Ext3, on the other hand, does support journaling of both metadata and data , though with a significant performance penalty, and not by default.
Data compression however, allows all logical blocks of any sized file to be stored as one or more contiguous fragments. On average, data compression saves disk space by about a factor of 2. JFS2 does not support file system compression
4 Petabytes / 1 Terabyte
128 Bytes Fixed, set at creation Sequential External JFSlog only Yes Yes
512 Bytes Dynamic B-tree Inline or External JFS2log No AIX 5L V5.3 and later
File Systems
# smit fs
# crfs command
The crfs command is the high-level command to create a file system.
Space management
File systems expand upon notice, NOT automatically To keep from running into problems:
Monitor file system growth Determine causes Control growing files Manage file system space usage Control user disk usage Defragment file system
df -k
df -m df -g
Information displayed is like that shown on the visual, but statistics in first two columns are given in units of 1 MB blocks Information displayed is like that shown on the visual, but statistics in first two columns are given in units of 1 GB blocks