Beruflich Dokumente
Kultur Dokumente
1
Student Notebook
Uempty
References
SG24-7559 Online AIX Version 6.1 Differences Guide AIX 6.1 Operating System and device management
Note: References listed as Online above are available at the following address: http://publib.boulder.ibm.com/infocenter/pseries/v6r1/index.jsp
11-1
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
Unit objectives
After completing this unit, you should be able to: Monitor file system growth and control growing files Manage file system disk space usage Implement basic file system integrity checks
AU1412.0
Notes:
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
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
AU1412.0
11-3
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
AU1412.0
11-5
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
Flag (Option) df -I
Brief Description of Output Displays information on the total number of blocks, the used space, the free space, the percentage of used space, and the mount point for the file system Information displayed is like that shown on the visual, but statistics in first two columns are given in units of 1024-byte blocks 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
df -k df -m df -g
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
AU1412.0
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
- Example 1: # cat /dev/null > /var/adm/wtmp - Example 2: # > /etc/security/failedlogin The file /var/adm/sulog can be edited directly.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
skulker is normally invoked daily by the cron command as part of the crontab file of the root user Modify the skulker shell script to suit local needs for the removal of files
AU1412.0
11-9
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
# du /home | sort -r -n 624 392 98 54 52 23 2 1 /home /home/fred /home/tom /home/mary /home/liz /home/suzy /home/guest /home/steve
AU1412.0
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
The -x flag
The -x flag/option is also very useful. When you use du -ax, the report only shows information from the specified file system. This is the best way to determine what file is filling a particular file system.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
Fragmentation considerations
Without fragmentation File size = 2000 bytes
2000 bytes
4096 bytes
With fragmentation File size = 2000 bytes Fragment size = 1024 bytes
2000 bytes 1024
4096 bytes
1024
1024
1024
Considerations to be made: Disk space allocation Disk space utilization I/O activity Free space fragmentation Fragment allocation map
Copyright IBM Corporation 2008
AU1412.0
11-13
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
filesystem
-s
AU1412.0
11-15
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
Note: Sometimes the estimates for these items provided when running defragfs with the -q or -r option indicate results different from what is actually done when defragfs is run without any options.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
Checks journal log Checks inodes, indirect blocks, data blocks, free lists If no file system name is specified, the fsck command checks all file systems which have the check=true attribute set in the /etc/filesystems Orphan files are placed in the lost+found directory Unmount the file system before running fsck
AU1412.0
The -p option
The -p (preen) option is used to check a file system and make only minor changes, without bothering the user. When fsck is run under SMIT, this option is used.
Copyright IBM Corp. 1997, 2008 Unit 11. Managing file systems 11-17
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
AU1412.0
Notes:
11-19
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
Checkpoint
1. What command can you use to determine if a file system is full? __________
2. What two commands can be used to find the files and users that are taking the most disk space? ____________ ____________
3. True or False? It is good practice to run fsck -y on all file systems, even if they are mounted.
AU1412.0
Notes:
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
Part 1 - Determining file system usage Part 2 - Using fragments for disk usage efficiency Part 3 - Using JFS compression Part 4 - Fixing file system problems
AU1412.0
Notes: Introduction
The lab allows you to get some experience with the file system management tools. It also allows you to build and test file systems with different characteristics. This exercise can be found in your Student Exercises Guide
11-21
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
Unit summary
File system management does not just happen on the system. File systems need to be regularly monitored to ensure that they do not run out of space. To ensure the integrity of file systems, checks have to be carried out whenever file system corruption is suspected.
AU1412.0
Notes:
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.