08/13/96, 4FAX# 5101 Reducing File System Size in AIX 4.1 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-5972. 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. ABOUT THIS DOCUMENT This document explains how you can reduce the size of file systems in the rootvg volume group by making a system backup, editing "/image.data", and reinstalling the system. It then describes how non-rootvg, or user-created, volume groups may be imported into your newly installed operating system. This document applies to AIX 4.1 on the RISC System/6000. NOTE: If you do NOT need to reduce the "/usr" or "/" or "/tmp" or "/var" file system, you can use the SIMPLER proce- dure which consists of the following steps: 1. Backup the data to tape 2. Unmount the file system 3. Remove the file system 4. Recreate the file system at the smaller size 5. Mount the file system 6. Restore the data from tape STEPS NOTE: It is recommended that you back up any file systems that are not in the rootvg volume group before following this procedure. 1. With the machine in Normal mode, log in as root. 2. Remove any files that you do not want in the file systems that you plan to reduce. If you are not sure of the origin or purpose of a particular file, do not delete it. 3. Make sure all file systems in the rootvg volume group are mounted. IF NOT, THEY WILL NOT BE INCLUDED IN THE REINSTALLED SYSTEM Reducing File System Size in AIX 4.1 1 08/13/96, 4FAX# 5101 NOTE: Ensure that /tmp has at least 8 mb free prior to moving on to step 4. 4. Type "mkszfile". This will create a file "/image.data", which will contain a list of the active file systems in the rootvg volume group, which will be included in the mksysb tape that you will create. 5. Use an editor to edit the "/image.data" file. Change the size of all the rootvg file systems that you are reducing to reflect the sizes you want for those file systems. Example: The /image.data file currently shows the file size of /usr to be 40MB with the following entry: lv_data: VOLUME_GROUP= rootvg LV_SOURCE_DISK_LIST= hdisk0 LV_IDENTIFIER= 000011651bee8429.6 LOGICAL_VOLUME= hd2 VG_STAT= active/complete TYPE= jfs MAX_LPS= 512 COPIES= 1 LPs= 10 STALE_PPs= 0 INTER_POLICY= minimum INTRA_POLICY= center MOUNT_POINT= /usr MIRROR_WRITE_CONSISTENCY= on LV_SEPARATE_PV= yes PERMISSION= read/write LV_STATE= opened/syncd WRITE_VERIFY= off PP_SIZE= 4 SCHED_POLICY= parallel PP= 10 BB_POLICY= relocatable RELOCATABLE= yes UPPER_BOUND= 32 LABEL= /usr MAPFILE= LV_MIN_LPS= 8 The line above "LPs" indicates the number of logical partitions required by the logical volume. You will need to change this value to the new size that you want the logical volume to be. If you want to reduce reduce the size of /usr from 40 MB to 32 MB, you would edit the /usr entry to look like this: LPs= 8 IMPORTANT: Make sure that you DO NOT enter a value which is less than the size required to contain the current data. Doing so will cause the reinstallation procedure to fail. Look at the line above "LV_MIN_LPS= Reducing File System Size in AIX 4.1 2 08/13/96, 4FAX# 5101 #" this is the smallest number of logical partitions that you can allocate to this logical volume. | 6. Check for any user defined paging space(s) with the fol- | lowing command: lsvg -l where "" is the name of the volume group. If there are any user defined paging space(s), do the fol- lowing to deactivate the paging space: | a. Execute the command: chps -a n b. Reboot the system. 7. Unmount all file systems that are NOT in the rootvg volume group. 8. If you have any non-rootvg volume groups, varyoff and export them with the following commands. (Substitute VGname with the name of the volume group.) varyoffvg VGname exportvg VGname 9. With a tape in the tape drive, type the following command: mksysb /dev/rmt0 This will create a complete system backup of the rootvg, which will include file-system size information (in the /image.data file) for use in the installation procedure. 10. Follow the instructions in Chapter 5 of the AIX Version 4.1 Installation Guide ("Installing BOS from a System Backup"), using the tape that you created in step 9. 11. When the operating system installation is complete, you will need to reboot the system in normal mode. The reduction of the file systems is now complete. 12. If you have any non-rootvg volume groups, you can import them with the following commands. (Substitute VGname with the name of the volume group; substitute PVname with the name of any one of the physical volumes in the volume group.) importvg -y VGname PVname varyonvg VGname 13. Now, you can mount all the file systems with mount all Reducing File System Size in AIX 4.1 3 08/13/96, 4FAX# 5101 READER'S COMMENTS Please fax this form to (512) 823-5972, 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: ______________________________________________________________________ END OF DOCUMENT (reduce.fs.41.krn, 4FAX# 5101) Reducing File System Size in AIX 4.1 4