Extending File System Storage

If Oracle DBSecCentral requires more space than was originally allocated, you can extend the storage for the file system.

About Extending Storage

You can allocate space in the volume group to extend the storage for a file system. You can add physical storage to extend the storage for the volume group.

You have the following options for extending storage:

Increasing the Logical Volume Capacity for a File System

If an Oracle Oracle Database Security Central file system runs out of space, you can allocate more space to the logical volume that holds the file system.

Use the lvextend command to increase the logical volume capacity. The vg_root volume group normally has unallocated space for this purpose.

  1. Log in to the appliance through SSH and switch to the root user.

    See Logging In to Oracle DBSecCentral Appliances Through SSH.

  2. Run vgs to check the volume group free space. For example:

    /usr/sbin/vgs
    VG      #PV #LV #SN   Attr   VSize  VFree
    vg_root   1  13   0 wz--n- 149.84G 10.72G

    For more detailed volume group information, run vgdisplay.

  3. Increase the logical volume capacity.

    For example, the following command adds 2 GB to the /tmp folder from the VG_ROOT volume group:

    /usr/sbin/lvextend -r -L+2G /dev/mapper/vg_root-lv_tmp

Related Topics

Adding a Disk to a Volume Group

If the vg_root volume group needs more space for patching, upgrading, or another purpose, you can add a disk and extend the volume group to the new disk.

Caution: Each additional physical device that is added to the volume group adds an additional single point of failure, unless the physical devices are hosted on the same back-end storage such as on a SAN or virtual environment. This document does not cover how to make the volume group resilient. To find more information about how to make the volume group resilient through RAID, see Configure RAID Logical Volumes on Oracle Linux

  1. Log in to the appliance through SSH and switch to the root user.

    See Logging In to Oracle DBSecCentral Appliances Through SSH.

  2. Run vgs to check the volume group free space. For example:

    /usr/sbin/vgs
    VG      #PV #LV #SN   Attr   VSize  VFree
    vg_root   1  13   0 wz--n- 149.84G 10.72G
  3. Run lsblk to view a list of all the available hard disks. For example:

    lsblk
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    sda 8:0 0 256G 0 disk
            sda1 8:1 0 200M 0 part
            sda2 8:2 0 1G 0 part
            sda3 8:3 0 160.2G 0 part
                    vg_root-lv_ol8root 252:0 0 6.6G 0 lvm /
                    vg_root-lv_swap 252:1 0 15.3G 0 lvm [SWAP]
                    vg_root-lv_images 252:2 0 488M 0 lvm
                    vg_root-lv_var_dbfw 252:3 0 2.9G 0 lvm /var/dbfw
                    vg_root-lv_oracle 252:4 0 58.6G 0 lvm /var/lib/oracle
                    vg_root-lv_tmp 252:5 0 1.9G 0 lvm /tmp
                    vg_root-lv_var_log 252:6 0 5.7G 0 lvm /var/log
                    vg_root-lv_home 252:7 0 976M 0 lvm /home
                    vg_root-lv_opt 252:8 0 976M 0 lvm /opt
                    vg_root-lv_var_tmp 252:9 0 5.7G 0 lvm /var/tmp
                    vg_root-lv_local_dbfw_tmp 252:10 0 6.6G 0 lvm /usr/local/dbfw/tmp
                    vg_root-lv_local_dbfw 252:11 0 976M 0 lvm /usr/local/dbfw
            sda4 8:4 0 31.6G 0 part
            sda5 8:5 0 31.6G 0 part
            sda6 8:6 0 31.6G 0 part
    sdb 8:16 0 2T 0 disk
    sr0 11:0 1 1024M 0 rom
    sr1 11:1 1 1024M 0 rom
  4. From the list, locate a disk with no partitions defined and with the same size that you need.

  5. Use the parted command to create the partition.

    1. Run parted /<path of the disk> using the path of the disk that you identified in step 4. For example:

      /sbin/parted /dev/sdb
      
      GNU Parted 3.2
      Using /dev/sdb
      Welcome to GNU Parted! Type 'help' to view a list of commands.
      (parted)
    2. Run mklabel gpt to set the disk label to GPT. For example:

      (parted) mklabel gpt
      (parted) print
      
      Model: XXX VBOX HARDDISK (scsi)
      Disk /dev/sdb: 2199GB
      Sector size (logical/physical): 512B/512B
      Partition Table: gpt
      
      Number Start End Size File system Name Flags
      
      (parted)
    3. Run the mkpart primary ext3 command to create the partition.

      When prompted, enter 0GB as the start point and specify another size of the first partition as the end point.

      For example, to create three partitions and to use 314GB as the end of partition 1, use the following command:

      (parted) mkpart primary ext3
      Start? 0GB
      End? -1
      (parted)
    4. Set the partition type to LVM.

      In this example, the partition number is 1, and you can use the print command to verify the change.

      (parted) set 1 lvm on
      (parted) print
      Model: XXX VBOX HARDDISK (scsi)
      Disk /dev/sdb: 2199GB
      Sector size (logical/physical): 512B/512B
      Partition Table: gpt
      Number Start    End   Size File system Name Flags
      1     1049kB 2199GB 2199GB ext3 primary lvm
      (parted)
    5. Run quit to exit parted. The changes are automatically saved.

  6. Run pvcreate to create the physical volume using the added disk. For example:

    /usr/sbin/pvcreate /dev/sdb1
    Writing physical volume data to disk "/dev/sdb1"
    Physical volume "/dev/sdb1" successfully created
  7. Verify the creation with pvdisplay.

    You should now have two physical volumes: vg_root and the one you just created. For example:

    /usr/sbin/pvdisplay
    
    --- Physical volume ---
    PV Name               /dev/sda3
    VG Name               vg_root
    PV Size                <160.16 GiB / not usable 4.00 MiB
    Allocatable           yes
    PE Size        4.00 MiB
    Total PE              40999
    Free PE               13724
    Allocated PE          27275
    PV UUID               4Fup6c-ruea-0B20-s9Sn-66on-4sVf-fDON2D
    
    "/dev/sdb1" is a new physical volume of "<2.00 TiB"
    
    --- NEW Physical volume ---
    PV Name               /dev/sdb1
    VG Name
    PV Size               <2.00 TiB
    Allocatable           NO
    PE Size (KByte)       0
    Total PE              0
    Free PE               0
    Allocated PE          0
    PV UUID               uDgKdm-LawO-4cXB-Bjog-pZ48-gNHD-fQE1IE
  8. Run vgextend to extend the vg_root volume group to the added disk. For example:

    /usr/sbin/vgextend vg_root /dev/sdb1
    Volume group "vg_root" successfully extended
  9. Run vgs again and compare it to the output from step 2.

    You should see more free space available for the vg_root volume group. For example:

    /usr/sbin/vgs
    VG      #PV #LV #SN   Attr   VSize  VFree
    vg_root   2  13   0 wz--n- 199.81G 60.69G

    In the examples throughout this procedure, you can see that the VSize has increased from 149.84 G to 199.81 G.

Related Topics