01/10/94, 4FAX# 2364 Reducing the Size of the /var File System in AIX 3.2 SPECIAL NOTICES Information in this document is correct to the best of our knowledge at the time of this writing. Please send feedback by fax to "AIXServ Information" at (512) 823-4009. Please use this information with care. IBM will not be responsible for damages of any kind resulting from its use. The use of this information is the sole responsibility of the customer and depends on the customer's ability to eval- uate and integrate this information into the customer's operational environment. +----------------------------------------------------------+ | | | NOTE: The information in this document has NOT been | | verified for AIX 4.1. | | | +----------------------------------------------------------+ PROCEDURE The following steps will reduce the size of the /var file system in AIX 3.2. If the /var file system on your machine is 8192 KB total, you probably should not reduce it. The default size of the /var file system (on installation) is 4096, which gets filled up rather quickly; if you can afford the space it is better to have /var be 8192 KB total. NOTE: BACK UP THE DATA in /var before proceeding. One way to do this is the following: cd /var tar -cdvf/dev/fd0 (/dev/fd0 can be replaced with /dev/rmt# or the full path of a file; that file CANNOT BE in the /var file system). 1. Turn the key to the Service position. 2. With bootable media OF THE SAME VERSION AND LEVEL AS THE SYSTEM, boot the system. Reducing the Size of the /var File System in AIX 3.2 1 01/10/94, 4FAX# 2364 +----------------------------------------------------------+ | | | WARNING: If you boot a 3.2 system with 3.1 media, or | | boot a 3.1 system with 3.2 media, then you will not be | | able to use the standard scripts (getrootfs or | | /etc/continue) to bring your workstation into full main- | | tenance mode. | | | | Moreover, performing the scripts on a 3.1 system with | | 3.2 boot media may actually remove some files and | | prevent your system from booting successfully in normal | | mode until missing files (/etc/mount and /etc/umount) | | are replaced on the disk. | | | +----------------------------------------------------------+ NOTES: a. For information on BOSboot diskettes, refer to InfoExplorer or order fax #2462 from 1-800-IBM-4FAX (or 415-855-4FAX outside the U.S. from a fax machine phone). b. If booting from diskettes, when you see LED c07, insert the next diskette. This may be the optional display extensions diskette (required for AIX 3.2.5) or the display diskette. c. If you have AIX 3.2.5, used a fddi network install, and selected that option for the install device, you will need the communications extensions diskette. If this diskette is not available, you can build it from another system with fddi installed or call your branch office for assistance. 3. Choose the maintenance shell (option 4 for AIX 3.2). 4. Determine the hdisk# to use with the getrootfs command. If you have only one disk, then "hdisk0" is the proper hdisk# to use. If you have more than one disk, do the following: o FOR AIX 3.2.4 OR LATER: Run getrootfs The output indicates the disk that should be used with getrootfs in the next step. o FOR AIX 3.2 TO 3.2.3E: Run lqueryvg -Atp hdisk# | grep hd5 for each hdisk# (hdisk0, hdisk1, etc.) until you get output that looks like: Reducing the Size of the /var File System in AIX 3.2 2 01/10/94, 4FAX# 2364 00005264feb3631c.2 hd5 1 The exact output you get will be different but will follow the form large_number.x hd5 1 You may find more than one disk has this output. These will all be disks which belong to the rootvg volume group. You may use any of the disks identi- fied to be in rootvg in the following step. 5. Now access the rootvg volume group by running getrootfs. ('#' is the number of the fixed disk determined in step 4 on page 2). getrootfs hdisk# If you get errors from getrootfs, do not continue with the rest of this procedure. Correct the problem causing the error. If you need assistance correcting the problem causing the error, contact one of the following: o local branch office o your point of sale o 1-800-CALL-AIX (to register for fee-based services) 6. For AIX 3.2.4 or greater, enter the following command: ODMDIR=/dev/objrepos 7. Unmount the /var file system, with the following command: umount /var 8. Remove the /var file system, with the following command: rmfs /var 9. Create the logical volume for /var with the command "mklv -y hd9var rootvg x", where x is the number of physical partitions you want to allocate. Partitions are 4MB by default. For example, mklv -y hd9var rootvg 2 makes logical volume hd9var of size 8MB (two 4MB parti- tions) in the rootvg volume group. 10. Create the /var file system with the following command: crfs -v jfs -d hd9var -m /var -a check=false -a free=false -a vol=/var | 11. Mount the /var file system, with the following command: | mount /var | 12. Create /var/tmp directory for vi editor: Reducing the Size of the /var File System in AIX 3.2 3 01/10/94, 4FAX# 2364 | mkdir /var/tmp 13. Set your TERM variable and export it. If you are using a megapel display, try setting TERM=hft. If you are using an ASCII terminal. (such as an ibm3151), set your TERM to the appropriate terminal type. For example: TERM=hft export TERM | 14. Edit /etc/filesystems | Go down to the stanza for /var (search for "/var:"). | Within that stanza go to the line that says "mount = | false" and change the word "false" to "automatic". Save | the file. | 15. Change the ownership and permissions to the proper | values, as follows: | chmod g-s /var | chmod 755 /var | chown bin.bin /var 16. Restore the /var files from your backup. 17. Shutdown the system. sync;sync;sync;shutdown -F 18. After you get the message "Halt completed," turn the power off. 19. Switch the key to the Normal position and turn the power back on. Reducing the Size of the /var File System in AIX 3.2 4 01/10/94, 4FAX# 2364 READER'S COMMENTS Please fax this form to (512) 823-4009, attention "AIXServ Informa- tion". You may also e-mail comments to: elizabet@austin.ibm.com. These comments should include the same customer information requested below. Use this form to tell us what you think about this document. If you have found errors in it, or if you want to express your opinion about it (such as organization, subject matter, appearance) or make sug- gestions for improvement, this is the form to use. If you need technical assistance, contact your local branch office, point of sale, or 1-800-CALL-AIX (for information about support offer- ings). These services may be billable. Faxes on a variety of sub- jects may be ordered free of charge from 1-800-IBM-4FAX. Outside the U.S. call 415-855-4329 using a fax machine phone. When you send comments to IBM, you grant IBM a nonexclusive right to use or distribute your comments in any way it believes appropriate without incurring any obligation to you. NOTE: If you have a problem report or item number, supplying that number may help us determine why a procedure did or did not work in your specific situation. Problem Report or Item #: Branch Office or Customer #: Be sure to print your name and fax number below if you would like a reply: Name: Fax Number: ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ END OF DOCUMENT (reduce.hd9var.krn, 4FAX# 2364) Reducing the Size of the /var File System in AIX 3.2 5