2.9.2.2 Extending a Non-root LVM Partition on Systems Running Oracle Exadata System Software Earlier than Release 11.2.3.2.1

This procedure describes how to extend the size of a non-root (/u01) partition on systems running Oracle Exadata System Software earlier than release 11.2.3.2.1.

In this procedure, /dev/VGExaDb/LVDbOra1 is mounted at /u01.

Note:

  • Keep at least 1 GB of free space in the VGExaDb volume group. This space is used for the LVM snapshot created by the dbnodeupdate.sh utility during software maintenance.

  • If you make snapshot-based backups of the / (root) and /u01 directories by following the steps in Creating a Snapshot-Based Backup of Oracle Linux Database Server, then keep at least 6 GB of free space in the VGExaDb volume group.

  1. Collect information about the current environment.
    1. Use the df command to identify the mount points for the root partition (/) and the non-root partition (/u01), and their respective LVMs.
      # df
      Filesystem                    1K-blocks   Used    Available Use% Mounted on
      /dev/mapper/VGExaDb-LVDbSys1 30963708   21867152   7523692  75%    /
      /dev/sda1                      126427      16355    103648  14%    /boot
      /dev/mapper/VGExaDb-LVDbOra1 103212320  67404336  30565104  69%    /u01
      tmpfs                         84132864   3294608  80838256   4%    /dev/shm
      
    2. Use the lvm lvscan command to display logical volumes.
      ACTIVE            '/dev/VGExaDb/LVDbSys1'  [30.00 GB]  inherit
      ACTIVE            '/dev/VGExaDb/LVDbSwap1' [24.00 GB]  inherit
      ACTIVE            '/dev/VGExaDb/LVDbOra1'  [100.00 GB] inherit
      
    3. Use the lvdisplay command to display the current volume group configuration.
      # lvdisplay /dev/VGExaDb/LVDbOra1
      
      --- Logical volume ---
      LV Name               /dev/VGExaDb/LVDbOra1
      VG Name               VGExaDb
      LV UUID               vzoIE6-uZrX-10Du-UD78-314Y-WXmz-f7SXyY
      LV Write Access       read/write
      LV Status             available
      # open                1
      LV Size               100.00 GB
      Current LE            25600
      Segments              1
      Allocation            inherit
      Read ahead sectors    auto
      - currently set to    256
      Block device          253:2
      
    4. Verify there is available space in the volume group VGExaDb so the logical drive can be extended.

      If the command shows there is zero free space, then neither the logical volume or file system can be extended.

      # lvm vgdisplay VGExaDb -s
      
      "VGExaDb" 556.80 GB [154.00 GB used / 402.80 GB free]
      
  2. Shut down any software that uses /u01.

    The following software typically uses /u01:

    • Oracle Clusterware, Oracle ASM, and Oracle Database

      # Grid_home/bin/crsctl stop crs
      
    • Trace File Analyzer

      # Grid_home/bin/tfactl stop
      
    • OS Watcher

      # /opt/oracle.oswatcher/osw/stopOSW.sh
      
    • Oracle Enterprise Manager agent

      (oracle)$ agent_home/bin/emctl stop agent
      
  3. Unmount the partition as the root user.
    # umount /u01
    

    Note:

    If the umount command reports that the file system is busy, then use the fuser(1) command to identify processes still accessing the file system that must be stopped before the umount command will succeed.

    # umount /u01
    umount: /u01: device is busy
    umount: /u01: device is busy
     
    # fuser -mv /u01
     
            USER      PID ACCESS COMMAND
    /u01:   root     6788 ..c..  ssh
            root     8422 ..c..  bash
            root    11444 ..c..  su
            oracle  11445 ..c..  bash
            oracle  11816 ....m  mgr
            root    16451 ..c..  bash
  4. Verify the file system.
    # e2fsck -f /dev/VGExaDb/LVDbOra1
    
  5. Extend the partition.

    In this example, the logical volume is expanded to 80% of the physical volume size. At the same time, the file system is resized with the command.

    # lvextend -L+XG --verbose /dev/VGExaDb/LVDbOra1
    

    In the preceding command, XG is the amount of GB the logical volume will be extended. The following example shows how to extend the logical volume by an additional 200 GB:

    # lvextend -L+200G --verbose /dev/VGExaDb/LVDbOra1
    

    Caution:

    Use extreme caution when reducing the size. The new size must be large enough to hold all the original content of the partition. To reduce the size, use a command similar to the following:

    lvreduce -L60G --resizefs --verbose /dev/VGExaDb/LVDbOra1
    

    In the preceding command, the size of /u01 is reduced to 60 GB.

  6. Check the /u01 file system using the e2fsck command.
    # e2fsck -f /dev/VGExaDb/LVDbOra1
    
  7. Resize the /u01 file system.
    # resize2fs -p /dev/VGExaDb/LVDbOra1
    
  8. Mount the partition.
    # mount -t ext3 /dev/VGExaDb/LVDbOra1 /u01
    
  9. Verify the space was extended.
    $ df -h /u01
    
  10. Restart any software that was stopped in step 2.
    • Oracle Clusterware, Oracle ASM, and Oracle Database

      # Grid_home/bin/crsctl start crs
      
    • Trace File Analyzer

      # Grid_home/bin/tfactl start
      
    • OS Watcher

      # /opt/oracle.cellos/vldrun -script oswatcher
      
    • Oracle Enterprise Manager agent

      (oracle)$ agent_home/bin/emctl start agent