0% found this document useful (0 votes)
142 views

File System Structure

The document discusses file systems in AIX including: - The components of a journaled file system including the superblock, inodes, data blocks, and indirect blocks - The structure of an inode containing file metadata like permissions, size, and pointers to data blocks - File system fragmentation and how enabling fragmentation allows unused space to be used by other files - Variable number of inodes (nbpi) and how this affects inode allocation - Allocation groups that organize related inodes and disk blocks - Differences between JFS and JFS2 file systems - Maximum file and file system sizes for different AIX versions and file system types

Uploaded by

akbisoi1
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
142 views

File System Structure

The document discusses file systems in AIX including: - The components of a journaled file system including the superblock, inodes, data blocks, and indirect blocks - The structure of an inode containing file metadata like permissions, size, and pointers to data blocks - File system fragmentation and how enabling fragmentation allows unused space to be used by other files - Variable number of inodes (nbpi) and how this affects inode allocation - Allocation groups that organize related inodes and disk blocks - Differences between JFS and JFS2 file systems - Maximum file and file system sizes for different AIX versions and file system types

Uploaded by

akbisoi1
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Objectives

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

Structure of a Journaled File System


Superblock inodes

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

inode for file1

This information can be seen with ls -l:


$ ls -li /home/team01
2132 2136 2141 drwxr - xr - x drwxr - xr - x -rw-r - - r - 2 2 1 team01 staff team01 staff team01 staff 512 512 28 May 2 14:33 c May 2 14:33 doc May 16 10:11 Manuals

File System Fragmentation


No Fragmentation File size = 2000 bytes 4096 bytes
2000 bytes

This free space cannot be used by another file.

Fragmentation Enabled File size = 2000 bytes Fragment size = 1024 bytes

4096 bytes
2000 bytes 1024 1024 1024 1024

These free fragments can be used by other files.

Variable Number of Inodes


With the default nbpi = 4096 an inode will be created for every 4096 bytes of file system.

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

Allocation Group Size


inodes
16 MB

disk blocks

Groupings of related inodes and disk blocks.

16 MB 16 MB

16 MB agsize

inodes
64 MB 64 MB 64 MB

disk blocks

Groupings of related inodes and disk blocks.

64 MB agsize

JFS vs. JFS2 File Systems


JFS Maximum File Size Architectural / Tested Maximum File System Size Architectural / Tested Inode size Number of inodes Fragments / Block Size Online defragmentation Available on Itanium Available on POWER 64 Gigabytes / 64 Gigabytes 1 Terabyte / 1 Terabyte 128 Bytes Fixed, set at creation 512 / 4096 Yes No Yes, default JFS2 4 Petabytes / 1 Terabyte 4 Petabytes / 1 Terabyte 512 Bytes Dynamic 512 / 4096 Yes Yes Yes

JFS2 uses extent based allocation for high performance and large file size.

File and File System Sizes


Maximum Individual File Size Limits AIX Version 4.1 (JFS) AIX Version 4.2 and later (JFS) AIX Version 5 (JFS2) JFS File System Limit Calculation
28

2 GB 64 GB 1 TB

Maximum file system size limit in bytes = fragment size * 2

or
Maximum file system size limit in bytes = nbpi * 2
24

Compressed File Systems


compression = LZ (yes) fragment size = 1024

4096

4096

4096

4096

Large File Enabled File Systems


File = 132 MB
(1024 * 4 KB blocks)+ (1024 * 128 KB blocks) = 132 MB 4 MB + 128 MB = 132 MB
1025 1026 1027
. . .

1 2 3 4
. . .

1 Block 4 KB

1055 1056

32 Blocks 128 KB

File 132 MB

1023 1024

128 KB

1057 1058 1059


. . .

32 Blocks 128 KB

Activity: Inodes and NBPI

Activity: Inodes and NBPI

Journal Log
1

Write data

fsync ( )
3

1) inode changes to log 2) COMMIT to log 3) update inode 4) sync log

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

Listing File Systems


# lsfs
Name Nodename Mount Pt __ __ __ __ __ __ __ sys4 / /home /usr /var /tmp /proc /opt /reports VFS jfs jfs2 jfs jfs jfs procfs jfs nfs Size 16384 90112 1277952 8192 24576 __ __ Options Auto

/dev/hd4 /dev/hd1 /dev/hd2 /dev/hd9var /dev/hd3 /proc /dev/hd10opt /budget

__ yes __ yes __ yes __ yes __ yes ro yes __ yes bg,hard,intr

List All Mounted File Systems


# mount
node mounted /dev/hd4 /dev/hd2 /dev/hd9var /dev/hd3 /dev/hd1 sys4 /budget mounted over vfs / /usr /var /tmp /home /reports jfs jfs jfs jfs jfs2 nfs date Jul 11 20:14 Jul 11 20:15 Jul 11 20:15 Jul 11 20:15 Jul 11 20:16 Jul 11 20:16 options rw,log=/dev/hd8 rw,log=/dev/hd8 rw,log=/dev/hd8 rw,log=/dev/hd8 rw,log=/dev/lv02 rw,hard,bg,intr

Working with Journaled File Systems in SMIT


Journaled File Systems
Move cursor to desired item and press Enter. Add a Journaled File System Add a Journaled File System on a Previously Defined Logical Volume Change / Show Characteristics of a Journaled File System Remove a Journaled File System Defragment a Journaled File System

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

Add a Standard Journaled File System on a Previously Defined Logical Volume


Add a Standard Journaled File System Type or select values in entry fields. Press Enter AFTER making all desired changes. [Entry Fields] * LOGICAL VOLUME name * MOUNT POINT Mount AUTOMATICALLY at system restart? PERMISSIONS Mount OPTIONS Start Disk Accounting ? Fragment Size (bytes) Number of bytes per inode Allocation Group Size (MBytes) + [] no read/write [] no 4096 4096 8 + + + + + + +

F1=Help F5=Reset F9=Shell

F2=Refresh F6=Command F10=Exit

F3=Cancel F7=Edit Enter=Do

F4=List F8=Image

Add a Standard Journaled File System


Add a Standard Journaled File System Type or select values in entry fields. Press Enter AFTER making all desired changes. Volume group name * SIZE of file system (in 512-byte blocks) * MOUNT POINT Mount AUTOMATICALLY at system restart? PERMISSIONS Mount OPTIONS Start Disk Accounting ? Fragment Size (bytes) Number of bytes per inode Allocation Group Size (MBytes) [Entry Fields] rootvg [] [] no read/write [] no 4096 4096 8 + # + + + + + + +

F1=Help F5=Reset F9=Shell

F2=Refresh F6=Command F10=Exit

F3=Cancel F7=Edit Enter=Do

F4=List F8=Image

Add a JFS2 File System on a Previously Defined Logical Volume


Add an Enhanced Journaled File System Type or select values in entry fields. Press Enter AFTER making all desired changes. [Entry Fields] * LOGICAL VOLUME name * MOUNT POINT Mount AUTOMATICALLY at system restart? PERMISSIONS Mount OPTIONS Block size (bytes) Inline Log? Inline Log size (MBytes) F1=Help F5=Reset F9=Shell F2=Refresh F6=Command F10=Exit F3=Cancel F7=Edit Enter=Do + [] no read/write [] 4096 no [] F4=List F8=Image + + + + + #

Add an Enhanced Journaled File System


Add an Enhanced Journaled File System Type or select values in entry fields. Press Enter AFTER making all desired changes. Volume group name * SIZE of file system (in 512-byte blocks) * MOUNT POINT Mount AUTOMATICALLY at system restart? PERMISSIONS Mount OPTIONS Block size (bytes) Inline Log? Inline Log size (MBytes) [Entry Fields] rootvg [] [] no read/write [] 4096 no [] + # + + + + + #

F1=Help F5=Reset F9=Shell

F2=Refresh F6=Command F10=Exit

F3=Cancel F7=Edit Enter=Do

F4=List F8=Image

Mount a File System


Mount a File System Type or select values in entry fields. Press Enter AFTER making all desired changes. [Entry Fields] FILE SYSTEM name DIRECTORY over which to mount TYPE of file system FORCE the mount? REMOTE NODE containing the file system to mount Mount as a REMOVABLE file system? Mount as a READ-ONLY system? Disallow DEVICE access via this mount? Disallow execution of SUID and sgid programs in this file system? [] [] no [] no no no no + + + +

+ + + +

Change/Show Characteristics of a Journaled File System


Change/Show Characteristics of a Journaled File System Type or select values in entry fields. Press Enter AFTER making all desired changes. [Entry Fields] File system name /var NEW mount point [/var] SIZE of file system (in 512-byte blocks) [8192] Mount GROUP [] Mount AUTOMATICALLY at system restart ? yes PERMISSIONS read/write MOUNT OPTIONS [] Start Disk Accounting ? no Fragment Size (bytes) 512 Number of bytes per inode 4096 Compression algorithm no Large File Enabled false Allocation Group Size (MBytes) 4

+ + + +

Change/Show Characteristics of an Enhanced Journaled File System


Change/Show Characteristics of an Enhanced Journaled File System Type or select values in entry fields. Press Enter AFTER making all desired changes. [Entry Fields] File system name /home NEW mount point [/home] SIZE of file system (in 512-byte blocks) [32768] Mount GROUP [] Mount AUTOMATICALLY at system restart ? yes PERMISSIONS read/write MOUNT OPTIONS [] Block size (bytes) 4096 Inline Log? no Inline Log size (MBytes) []

+ + + + + #

Remove a Journaled File System


Remove a Journaled File System Type or select values in entry fields. Press Enter AFTER making all desired changes. [Entry Fields] FILE SYSTEM name Remove mount point no + +

System Storage Review


Logical Volume Structure

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

Exercise: Working with File Systems

Exercise: Working with File Systems

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

You might also like