File System Structure
File System Structure
After completing this unit, students should be able to: Identify the components of an AIX file system Add an enhanced journaled file system Change characteristics of a file system
Data Blocks
Indirect Blocks
Superblock File system size and identification Free list, fragment size, nbpi inodes File size, ownership, permissions, times Pointers to data blocks Blocks Data blocks - contain data Indirect blocks - contain pointers to data blocks
Structure of an Inode
permissions no. of links type of file user ID group ID file size address of blocks time modified time accessed time changed access control info. reserved other
Contents of an inode
Fragmentation Enabled File size = 2000 bytes Fragment size = 1024 bytes
4096 bytes
2000 bytes 1024 1024 1024 1024
File System
INODES 128 bytes 1 2
4096
4096
4096
Using the value nbpi = 1024 an inode will be created for every 1024 bytes of file system.
File System
INODES 128 bytes
1 2 3 4 5 6 7 8
4096
4096
4096
4 X 1024
disk blocks
16 MB 16 MB
16 MB agsize
inodes
64 MB 64 MB 64 MB
disk blocks
64 MB agsize
JFS2 uses extent based allocation for high performance and large file size.
2 GB 64 GB 1 TB
or
Maximum file system size limit in bytes = nbpi * 2
24
4096
4096
4096
4096
1 2 3 4
. . .
1 Block 4 KB
1055 1056
32 Blocks 128 KB
File 132 MB
1023 1024
128 KB
32 Blocks 128 KB
Journal Log
1
Write data
fsync ( )
3
inodes
data block
JFSLOG
No journaling of data blocks - only journals inode information (and indirect block information.)
File Systems
# smit fs File Systems
Move cursor to desired item and press Enter List All File Systems List All Mounted File Systems Add/Change/Show/Delete File Systems Mount a File System Mount a Group of File Systems Unmount a File System Unmount a Group of File Systems Verify a File System Backup a File System Restore a File System List Contents of a Backup
Add a Journaled File System on a Previously Defined Logical Volume Move cursor to desired item and press Enter. Add a Standard Journaled File System Add a Compressed Journaled File System Add a Large File Enabled Journaled File System
F4=List F8=Image
F4=List F8=Image
F4=List F8=Image
+ + + +
+ + + +
+ + + + + #
hd2 hd4 hd6 hd8 /usr /(root) Page Space hd2 log hd5 free /blv hd61 hd9var hd2 hd3 free /usr /tmp /usr Page Space /var lv00 lv00 hd1 hd1 free /home /home free special DB special DB lv00 lv00 hd1 hd1 free /home /home free special DB special DB
hdisk0 rootvg
File Systems
hdisk1
hdisk2 uservg
/(root) File System
hdisk3
Directories
File Systems
/bin
/dev
/etc
/lib
/usr
/tmp
/var
/home
Checkpoint
1. Will the size of the file system change when the size of the logical volume it is on is increased? ___________________________________________________ 2. If a file system is the same size as the logical volume on which it sits, will the size of the logical volume increase when the size of the file system that is sitting on it increases? ___________________________________________________ 3. If you remove a logical volume, will the file system that is sitting on it be removed as well? ___________________________________________________ ___________________________________________________ ___________________________________________________
Unit Summary
The components of an AIX file system are the superblock, inodes, data blocks and indirect blocks Important issues to consider when creating a journaled file system are: fragment size, NBPI, allocation group size, compression and whether it should be large file enabled JFS2 supports large files, large file systems, and improves performance File systems can be added and removed from the system, and their characteristics can also be changed, all through SMIT