Increase or add storage on a virtual appliance

Prev Next

When the available storage on the EDR Telemetry Store virtual appliance becomes insufficient, you can increase capacity by extending the existing data disk.

Important

We recommend that you take a backup of the virtual machine in the hypervisor to ensure data recovery.

The high-level steps include:

Extend the hard disk in the hypervisor

  1. Shut down the virtual machine.

  2. Delete all existing snapshots.

  3. Open the hardware configuration settings for the virtual machine in your hypervisor management console.

  4. Locate the second hard disk, which contains the OpenSearch data directory.

  5. Increase the disk capacity to the required size, and then save your changes.

Convert the MBR partition table to GPT

Master Boot Record (MBR) partition tables do not support disks that exceed 2 TB. If the new disk size exceeds 2 TB, you must convert the partition table to GUID Partition Table (GPT) to ensure the system recognizes the additional capacity.

If the disk size is 2 TB or less, proceed to Resize the partition.

  1. Power on the EDR Telemetry Store virtual appliance and log in as an administrator.

    ssh admin@<IP_address>
  2. Enter privileged mode:

    enable

    Enter your password when prompted.

  3. Access the shell:

    shell
  4. Install the gdisk utility:

    dnf install -y gdisk
  5. Stop the OpenSearch service:

    systemctl stop opensearch
  6. Unmount the OpenSearch data directory:

    umount /var/lib/opensearch
  7. Deactivate the volume group to safely modify the partition table:

    vgchange -a n vg_opensearch
  8. Run gdisk to convert the MBR table to GPT:

    gdisk /dev/sdb
  9. Write the new GPT data:

    • Type w and press Enter.

    • Type Y and press Enter to confirm.

  10. Force the kernel to read the new partition table:

    partprobe /dev/sdb
  11. Reactivate the volume group:

    vgchange -a y vg_opensearch
  12. Remount the OpenSearch data directory:

    mount -a

Resize the partition

  1. Power on the EDR Telemetry Store virtual appliance and log in as an administrator.

    ssh admin@<IP_address>
  2. Enter privileged mode:

    enable

    Enter your password when prompted.

  3. Access the shell:

    shell
  4. List block devices:

    lsblk

    The OpenSearch data directory (/var/lib/opensearch) is located on partition sdb1 of disk sdb.

    1-Resizepartition-lsblk.png
  5. Display partition information:

    parted -s -a opt /dev/sdb "print free"
    2-Resizepartition-parted.png
  6. Confirm that free space is available after partition 1.

  7. Resize partition 1 to occupy the full disk:

    parted -s -a opt /dev/sdb "resizepart 1 100%"
  8. Verify the updated partition layout:

    parted -s -a opt /dev/sdb "print free"

Resize the physical volume

  1. Display current physical volumes:

    pvs
  2. Resize the physical volume:

    pvresize /dev/sdb1
  3. Verify the updated size:

    pvs
    3-Resizephysicalvolume.png

Resize the logical volume and file system

  1. Display logical volumes:

    lvs
  2. Extend the logical volume and file system to use all free space:

    lvextend -l +100%FREE -r /dev/vg_opensearch/lv_opensearch
  3. Verify the updated logical volume size:

    lvs
    4-Resizelogicalvolume-lvs.png

Result

The additional disk space is now available for use by the EDR Telemetry Store virtual appliance.

You can confirm the increase using:

df -h
5-Resizelogicalvolume-final.png