[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
System Management Guide: Operating System and Devices

Reducing the File System Size in the rootvg Volume Group

This procedure explains how to manually reduce the size of file systems in the rootvg volume group by creating a backup of your current rootvg volume group, and then reinstalling the operating system. It allows you to define the sizes of the logical partitions that are to be created during the installation process.

This procedure also explains how user-defined volume groups may be imported into your newly installed operating system.

Note: It is recommended that you create a separate backup of all file systems that are not contained in the rootvg volume group before performing this procedure.

Prerequisites

Procedure

This example uses the /usr file system as an example for reducing a file system in the rootvg volume group. If you want to reduce all file systems to their minimum size, the simplest way is to set SHRINK to yes during BOS install. Setting SHRINK to yes overrides any changes you make in the /image.data file described below.

  1. With the key in the Normal position, log in as root.
  2. Remove any files in /usr that you do not want.

    Attention: Only delete files that you have created or that you know are not needed on your system. If in doubt, do not delete the file.

  3. Make sure all file systems in the rootvg volume group are mounted. If not, they will not be included in the reinstalled system.
  4. Type the command:
    mkszfile 
    This creates the file /image.data, which contains a list of the active file systems in the rootvg volume group that will be included in the installation procedure.
  5. Use an editor to edit the /image.data file. If you edit the /image.data file, you must issue the mksysb command from the command line. Otherwise, your edited file will be overwritten.
  6. Change the size of /usr to reflect what you want the size of the file system to be in terms of logical partitions. In the following example, the image.data file currently shows the file size of /usr to be 58 logical partitions:
    lv_data: 
         VOLUME_GROUP= rootvg
            .
            .
            .
            LPs= 58
            .
            .
            .
            MOUNT_POINT= /usr
            .
            .
            .
            LV_MIN_LPs= 51
       
    You can either increase or decrease the number of logical partitions needed to contain the file system data. The default size of each additional logical partition is 4MB (defined in the PP_SIZE entry of the image.data file).

    Attention: If you enter a value that is less than the minimum size required to contain the current data (indicated in the LV_MIN_LPs entry), the reinstallation process will fail. Use the df -k command to see the current blocks used in the file systems; then divide this number by 1024 to get the total MB of the file system.

  7. Change the FS_NAME in the fs_data to match the value that was chosen for LPs.
    fs_data: 
            FS_NAME= /usr 
            . 
            . 
            . 
            FS_SIZE= 475136 
            . 
            . 
            . 
            FS_MIN_SIZE= 417792 
       
    	
    The FS_SIZE value is calculated:
    FS_SIZE = PP_SIZE ( in KB ) * 2 ( 512-blocks) * LPs
    Given the values for LV_DATA in step 6, FS_SIZE would come out to be:
    475136     =     4096     *     2     * 58
  8. Unmount all file systems that are not in the rootvg volume group.
  9. If you have any user-defined volume groups, use the following commands to vary off and export them:
    varyoffvg VGName
    	
    exportvg VGName
  10. With a tape in the tape drive, type the following command:
    mksysb /dev/rmt0
    This will do a complete system backup, which will include file system size information (in the /image.data file) for use in the installation procedure.
  11. Follow the instructions in "Installation from a System Backup" in AIX Installation Guide using the tape you created. The Use Maps option must be set to no, and the Shrink the File Systems option must be set to no. The new system must be installed using the option Install AIX With Current System Settings for the logical-volume-size changes to take effect.
  12. When the operating system installation is complete, you will need to reboot the system in Normal mode. The reduction of the file system is now complete.
  13. If you have any user-defined volume groups, you can import them by doing the following:
    importvg -y VGName PVName
  14. You can mount all file systems using the command:
    mount all
    Note: You may get "Device Busy" messages about file systems that are already mounted. These messages can be ignored.

[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]