5.13.4 Increasing the Size of the Grid Infrastructure Home or Database Home File System

You can increase the size of the Oracle Grid Infrastructure or Oracle Database home file system in a user domain.

The Oracle Grid Infrastructure software home and the Oracle Database software home are created as separate disk image files in the management domain. The disk image files are located in the /EXAVMIMAGES/GuestImages/DomainName/ directory. The disk image files are attached to the user domain automatically during virtual machine startup, and mounted as separate, non-LVM file systems in the user domain.

  1. Connect to the user domain, and check the file system size using the df command, where $ORACLE_HOME is an environment variable that points to the Oracle Database home directory, for example, /u01/app/oracle/product/12.1.0.2/dbhome_1.
    # df -h $ORACLE_HOME
    

    The following is an example of the output from the command:

    Filesystem  Size  Used Avail Use% Mounted on
     /dev/xvdc    20G  6.5G   13G  35% /u01/app/oracle/product/12.1.0.2/dbhome_1
    
  2. Connect to the management domain, and then shut down the user domain using the xm command and specifying the name of the domain.
    # xm shutdown DomainName
    
  3. Create an OCFS reflink to serve as a backup of the disk image that will be increased, where version is the release number for example, 12.1.0.2.1-3.
    # cd /EXAVMIMAGES/GuestImages/DomainName
    # reflink dbversion.img before_resize.dbversion.img
    
  4. Create an empty disk image using the qemu-img command, and append it to the database home disk image.

    The empty disk image size is the size to extend the file system. The last command removes the empty disk image after appending to the database home disk image.

    # qemu-img create emptyfile 10G
    # cat emptyfile >> dbversion.img
    # rm emptyfile
    
  5. Check the file system using the e2fsck command.
    # e2fsck -f dbversion.img
    
  6. Resize the file system using the resize2fs command.
    # resize2fs dbversion.img
    
  7. Start the user domain.
    # xm create /EXAVMIMAGES/GuestImages/DomainName/vm.cfg
    
  8. Connect to the user domain, and verify the file system size was increased.
    # df -h $ORACLE_HOME
    

    The following is an example of the output from the command:

    Filesystem      Size  Used Avail Use% Mounted on
    /dev/xvdc        30G  6.5G   22G  23% /u01/app/oracle/product/12.1.0.2/dbhome_1
    
  9. Connect to the management domain, and remove the backup image.

    Use a command similar to the following where back_up_image.img is the name of the backup image file:

    # cd /EXAVMIMAGES/GuestImages/DomainName
    # rm back_up_image.img