All storage volumes are configured as LVM devices. They can be resized online by providing the underlying virtualization technology to support online disk expansion. Disks are expanded automatically via cloud-init when the VM boots.

To expand disks after boot:

  1. Login into the SD-WAN Orchestrator system console.
  2. Identify the physical disks that support the database volume.
    vgs -o +devices store

    Example:

    root@vco:~# vgs -o +devices db_data
       \  VG      #PV #LV #SN Attr   VSize   VFree   Devices
         store   1   1   0 wz--n- 500.00g 125.00g /dev/sdb(0)
  3. Identify the physical disk attachment.
    lshw -class volume
    Example:
    /dev/sdb is attached to scsi@2:0.1.0 (Host: scsi2 Channel: 00 Id: 01 Lun: 00)
    root@vco:~# lshw -class volume
      *-volume
           description: EXT4 volume
           vendor: Linux
           physical id: 1
           bus info: scsi@2:0.0.0,1
           logical name: /dev/sda1
           logical name: /
           version: 1.0
           serial: 9d212247-77c4-4f98-a5c2-7f8470fa2da8
           size: 10239MiB
           capacity: 10239MiB
           capabilities: primary bootable journaled extended_attributes large_files huge_files dir_nlink recover extents ext4 ext2 initialized 
           configuration: created=2016-02-22 20:49:38 filesystem=ext4 label=cloudimg-rootfs lastmountpoint=/ modified=2016-02-22 21:18:58 mount.fstype=ext4 mount.options=rw,relatime,data=ordered mounted=2016-10-06 23:22:04 state=mounted 
      *-disk:1
           description: SCSI Disk
           physical id: 0.1.0
           bus info: scsi@2:0.1.0
           logical name: /dev/sdb
           serial: v5V2zm-Lvbh-Mfx3-W8ki-COI9-DAtP-RXndhu
           size: 500GiB
           capacity: 500GiB
           capabilities: lvm2
           configuration: sectorsize=512
      *-disk:2
           description: SCSI Disk
           physical id: 0.2.0
           bus info: scsi@2:0.2.0
           logical name: /dev/sdc
           serial: fTQFJ2-giAV-WsXL-1Wha-V305-oQkV-qqS3SA
           size: 100GiB
           capacity: 100GiB
           capabilities: lvm2
           configuration: sectorsize=512
  4. On the hypervisor host, locate the disk attached to the VM using bus information. Example: SCSI(0:1)
  5. Extend the virtual disk. For instructions, see https://knowledge.broadcom.com/external/article/344854.
  6. Re-login into the SD-WAN Orchestrator system console.
  7. Re-scan the block device for the resized physical volume. Example:
    echo 1 > /sys/block/$DEVICE/device/rescan

    Example:

    echo 1 > /sys/block/sdb/device/rescan
  8. Resize the LVM physical disk.
    pvresize /dev/sdb
  9. Determine the amount of free space in the database volume group.
    vgdisplay store |grep Free

    Example:

    root@vco:~# vgdisplay store |grep Free
    Free  PE / Size       34560 / 135.00 GiB
  10. Extend the database logical volume.
    lvextend -r -L+#G /dev/store/data

    Example:

    root@vco1:~# lvextend -r -L+1G /dev/store/data
      Size of logical volume store/data changed from 400.00 GiB (102400 extents) to 401.00 GiB (102656 extents).
      Logical volume store/data successfully resized.
    resize2fs 1.44.1 (24-Mar-2018)
    Filesystem at /dev/mapper/store-data is mounted on /store; on-line resizing required
    old_desc_blocks = 50, new_desc_blocks = 51
    The filesystem on /dev/mapper/store-data is now 105119744 (4k) blocks long.
  11. View the new size of the volume.
    df -h /dev/store/data

    Example:

    root@vco:~# df -h /dev/store/data
    Filesystem               Size  Used Avail Use% Mounted on
    /dev/mapper/store-data  379G  1.2G  359G   1% /store