1. Home
  2. System Administration
  3. How to Increase Disk Space in Variphy Insight Virtual Appliance

How to Increase Disk Space in Variphy Insight Virtual Appliance

Overview

The Variphy OVA leverages Logical Volume Management (lvm), which treats a collection of physical volumes (i.e. disk partitions) as a logical volume (i.e. the thing you mount and read/write files to/from).  In order to add more storage capacity, instead of expanding an existing physical volume and then expanding the logical volume, you can create a new physical volume through VSphere and then add that physical volume to the logical volume within Ubuntu.

1. Take a snapshot of your existing environment.

2. Using vSphere edit your existing virtual machine and add/create a New Hard Disk.

When adding the new disk add only the additional space needed. For example if you currently have 100GB on your existing disk and I wish to increase to a total of 250 GB your new disk will be 150GB.

3. Add the new Hard Disk to the logical volume.

  1. SSH to the Virtual Machine and run the following commands.
    • Become root user.
      • sudo su -
    • echo results to a psuedo file
      • echo "- - -" > /sys/class/scsi_host/host2/scan
    • Display the partitions
      • fdisk -l (L not a one)
      • You should expect to see the new partition.
      • Take note of the new disk
  1. Partition the New Disk. (Make sure your are running fdisk against the new disk in the previous step)
    • fdisk /dev/sdb
    • Command (m for help):n
    • Select (default p): (Hit enter you do not need to enter a value)
    • Partition number (1-4, default 1): (Hit enter you do not need to enter a value)
    • First sector (2048-524287999, default 2048): (Hit enter you do not need to enter a value)
    • Last sector, +sectors or +size{K,M,G,T,P} (2048-524287999, default 524287999): (Hit enter you do not need to enter a value)
    • Command (m for help): t
    • Hex code (type L to list all codes): 8e
    • Command (m for help): w
  1. Check that the partition has been added to the new disk
    • fdisk -l (L not a one)
  1. Add the New disk to the Logical Volume.
    • vgdisplay (Make note of the VG Name)
    • pvcreate /dev/sdb1
    • vgextend system /dev/sdb1 (Replace system with the VG Name noted above)
  1. Add space to the current Logical Volume.
    • lvdisplay | grep Path
    • lvresize -l +100%free /dev/system/root
  1. Resize the filesystem.
    • resize2fs /dev/system/root
Updated on November 17, 2022

Article Attachments

Was this article helpful?

Related Articles