6.14.1 Expanding Disk Space on a Guest Using Exascale Storage

You can expand the disk space on an Oracle Linux KVM guest that uses Exascale storage to host the guest image files.

  1. Inside the guest, identify and gather information about the storage volume you wish to expand.

    For example, the following output shows a file system that is almost full.

    [root@exa01adm01vm01 ~]# df -h
    Filesystem                                                                                     Size  Used Avail Use% Mounted on
    ...
    /dev/mapper/VGExaDbDisk.exa01adm01vm01_gih01_vol0006_f69be05a84be446eaa9628bc07d86034-LVDBDisk  48G   47G  692M  98% /u01/app/23.0.0.0/grid
    ...

    You can gather more information about the volume you wish to expand using the lsblk command.

    [root@exa01adm01vm01 ~]# lsblk
    NAME                                                    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
    ...
    sdd                                                       8:48   0   50G  0 disk
    `-sdd1                                                    8:49   0   50G  0 part
      `-VGExaDbDisk.exa01adm01vm01_gih01_vol0006_f69be05a84be446eaa9628bc07d86034-LVDBDisk
                                                            252:0    0   48G  0 lvm  /u01/app/23.7.0.25/grid
    ...

    Take note of the following information, which you will require throughout the rest of the procedure:

    • The disk name (sdd).

    • The disk partition name (sdd1).

      Take note of the partition number (1), which you will use later in the parted command that extends the disk partition.

    • The file system mount point (/u01/app/23.0.0.0/grid).

    • The logical volume manager (LVM) name (VGExaDbDisk.exa01adm01vm01_gih01_vol0006_f69be05a84be446eaa9628bc07d86034-LVDBDisk).

      Take note of information embedded in this identifier:

      • A volume identifier is embedded between the period (.) and dash (-). You will use this value (exa01adm01vm01_gih01_vol0006_f69be05a84be446eaa9628bc07d86034) later to identify the volume in an Exascale command line interface (ESCLI) lsvolumeattachment command, and also to identify the corresponding disk device in a vm_maker command.

      • The guest OS volume group name is embedded before the dash (-) and the guest OS logical volume name is embedded after the dash. You will use these values (VGExaDbDisk.exa01adm01vm01_gih01_vol0006_f69be05a84be446eaa9628bc07d86034 and LVDBDisk) later to construct the logical volume path used in the lvextend command.

    Note:

    The command examples in the rest of this procedure use the example values shown in this step. Ensure that you replace these values with your own as needed when running the commands.

  2. In Exascale, expand the volume.
    1. Connect to the Exascale command line interface (ESCLI) as the storage administrator or volume owner.
    2. Use the volume identifier observed on the guest to find the associated Exascale volume ID.

      For example:

      @>lsvolumeattachment --filter deviceName=exa01adm01vm01_gih01_vol0006_f69be05a84be446eaa9628bc07d86034
      id                                       volume                                   deviceName                                                    attachTime
      att0007_65b439fd897d4c4384f73014d1565081 vol0006_f69be05a84be446eaa9628bc07d86034 exa01adm01vm01_gih01_vol0006_f69be05a84be446eaa9628bc07d86034 2025-08-12T01:11:39-07:00
    3. Confirm the current state of the Exascale volume.

      For example:

      @>lsvolume vol0006_f69be05a84be446eaa9628bc07d86034 --attributes id,name,size,state
      id                                       name                        size state
      vol0006_f69be05a84be446eaa9628bc07d86034 exa01adm01vm01_gih01    50.0000G AVAILABLE
      
    4. Expand the Exascale volume.

      For example, the following command sets the volume size to 500 GB.

      @>chvolume vol0006_f69be05a84be446eaa9628bc07d86034 --attributes size=500G
      Volume altered.
  3. Resize the disk on the KVM host

    On the KVM host, run the vm_maker command with the --resize option. Identify the disk (--disk) using the volume identifier observed on the guest and specify the guest name (--domain).

    For example:

    [root@exa01adm01 ~]# vm_maker --resize --disk exa01adm01vm01_gih01_vol0006_f69be05a84be446eaa9628bc07d86034 --domain exa01adm01vm01
    [INFO] Running 'virt-control blockresize exa01adm01vm01.example.com /dev/exc/exa01adm01vm01_gih01_vol0006_f69be05a84be446eaa9628bc07d86034 536870912000B'...
    [INFO] Disk image /dev/exc/exa01adm01vm01_gih01_vol0006_f69be05a84be446eaa9628bc07d86034 resized to 500G
    
  4. Back inside the guest, expand the volume and file system.
    1. Expand the volume in the guest operating system.

      Use the following command sequence, substituting in your earlier gathered device details.

      1. Determine if the device uses a GUID Partition Table (GPT) and update it if necessary.

        • Run the following command to determine if the device uses GPT:

          [root@exa01adm01vm01 ~]# blkid -o value -s PTTYPE /dev/sdd1
          Gpt

          If the command output indicates that the device does not use GPT, skip to "Extend the relevant partition into the expanded device space."

        • If output of the previous command indicates that the device uses GPT, run the following commands to update the partition view in the OS kernel:

          [root@exa01adm01vm01 ~]# printf "Fix\nYes\n" | parted ---pretend-input-tty /dev/sdd print
          Warning: Not all of the space available to /dev/sdd appears to be used, 
          you can fix the GPT to use all of the space
          ...
          
          [root@exa01adm01vm01 ~]# partprobe /dev/sdd
      2. Extend the relevant partition into the expanded device space:

        Note:

        Take care to use the correct partition number, as identified at the start of the procedure.

        [root@exa01adm01vm01 ~]# parted -s /dev/sdd "resizepart 1 100%"
        
      3. Resize the physical volume:

        [root@exa01adm01vm01 ~]# pvresize /dev/sdd1
          Physical volume "/dev/sdd1" changed
          1 physical volume(s) resized or updated / 0 physical volume(s) not resized
        
      4. Extend the logical volume:

        Note:

        To construct the logical volume path used in the lvextend command, use the guest OS volume group name and logical volume name, as identified at the start of the procedure.

        The logical volume path format is: /dev/<volume_group_name>/<logical_volume_name>

        [root@exa01adm01vm01 ~]# lvextend -l +100%FREE /dev/VGExaDbDisk.exa01adm01vm01_gih01_vol0006_f69be05a84be446eaa9628bc07d86034/LVDBDisk
          Size of logical volume VGExaDbDisk.exa01adm01vm01_gih01_vol0006_f69be05a84be446eaa9628bc07d86034/LVDBDisk changed from <50.00 GiB (12799 extents) to <500.00 GiB (127999 extents).
          Logical volume VGExaDbDisk.exa01adm01vm01_gih01_vol0006_f69be05a84be446eaa9628bc07d86034/LVDBDisk successfully resized.
        
    2. Expand the file system.

      Use the xfs_growfs command and specify the file system mount point.

      [root@exa01adm01vm01 ~]# xfs_growfs /u01/app/23.0.0.0/grid
      meta-data=/dev/mapper/VGExaDbDisk.exa01adm01vm01_gih01_vol0006_f69be05a84be446eaa9628bc07d86034-LVDBDisk isize=512
      ...
      data blocks changed from 12582672 to 131070976
  5. Verify the resized volume.

    For example:

    [root@exa01adm01vm01 ~]# df -h
    Filesystem                                                                                     Size  Used Avail Use% Mounted on
    ...
    /dev/mapper/VGExaDbDisk.exa01adm01vm01_gih01_vol0006_f69be05a84be446eaa9628bc07d86034-LVDBDisk 500G   47G  453G   9% /u01/app/23.0.0.0/grid
    ...