Updated on 2023-10-17 GMT+08:00

Expanding EVS Disk Capacity (with LVM)

This section describes how to expand the capacity of EVS disks that have an LVM logical volume. In the following example, two 400-GB data disks are mounted to an ECS. The two disks form a 696-GB LVM logical volume through data striping, and the logical volume is mounted to the /hana/data directory. This section describes how to expand the /hana/data directory to 1.4 TB by expanding the capacity of the EVS disks and file systems.

Procedure

  1. Expand the capacity of the EVS disks by following the instructions provided in Expanding EVS Disk Capacity (Without LVM).
  2. Run the following command to check the sizes of the two EVS disks after capacity expansion:

    lsblk

    If information similar to the following is displayed, the sizes of the two EVS disks are both 800 GB, but the size of the logical volume is still 696 GB.

  3. Run the following commands to expand the physical volume capacity and check the sizes of the physical volumes after the capacity expansion:

    pvresize /dev/vdb

    pvresize /dev/vdc

    pvs

    If information similar to the following is displayed, the sizes of the physical volumes are both 800 GB after the capacity expansion:

  4. Run the following command to check the size of the LVM volume group:

    vgdisplay

    If information similar to the following is displayed, the size of the LVM volume group is expanded to 1.56 TB.

  5. Run the following command to add 696 GB to the logical volume:

    lvextend -L +696G /dev/mapper/vghanadata-lvhanadata

    If information similar to the following is displayed, the logical volume capacity is expanded by 696 GB.

  6. Run the following command to check the logical volume capacity:

    lvdisplay

  7. Run the following command to expand the capacity of the file system:

    • Run the resize2fs -d /hana/data command to expand the ext2, ext3, or ext4 file system.
    • Run the xfs_growfs -d /hana/data command to expand the xfs file system.

    In this example, run the following command:

    xfs_growfs -d /hana/data