Increase disk space of a new AlgoSec VM

The following topic explains how to increase the disk space of a newly deployed AlgoSec VM (running CentOS 7) by extending your out-of-the-box VM hard disk (up to 2TB).

The AlgoSec OVF comes with 241 GB in the data partition. After you deploy it on a VMware environment, according to your sizing, you may need to increase the disk space of your newly deployed AlgoSec VM.

Procedure preconditions:

Only run this procedure if the following two conditions are true:

  1. The VMware virtual machine has never had snapshots taken.

  2. When running the command lsblk you see the following structure:

    sda should contain both sda1 and sda2.

Do the following:

  1. On the VM, click Actions and select Edit Settings.

  2. On the Virtual Hardware tab, change the disk size of the Hard Disk.

  3. Click OK.

  4. Restart the machine and run the following command:

    fdisk /dev/sda

    Press n

    Command (m for help): n

    Press p

    Command action
    l   logical (5 or over)
    p   primary partition (1-4)
    p

    Press 3

    Partition number (1-4): 3

    Hit <enter>

    First sector (….): <enter>

    Hit <enter>

    Last sector (...): <enter>

    Press t

    Command (m for help): t

    Press 3

    Partition number (1-3, default 3): 3

    Press t

    Command (m for help): t

    Press 8e

    Hex code (type L to list codes): 8e
    Changed system type of partition 3 to 8e (Linux LVM)

    Press w

    Command (m for help): w
    The partition table has been altered!
  1. Run the command:

    partprobe
  1. To Increase the logical volume, run the following commands:

    pvcreate /dev/sda3
    vgextend centos /dev/sda3
    lvextend /dev/centos/data /dev/sda3
    xfs_growfs /dev/centos/data

  2. check using the df -h command that the /data partition shows the additional storage.