The amount of space allocated to a virtual API Gateway appliance is pre-configured upon deployment. Disk space is utilized by components of the host operating system, the MySQL database, or flat log files. Version 8.x and later of the API Gateway leverages Logical Volume Management to structure and partition the storage space available to the host operating system. The scope of this articles focuses on increasing the storage available to the partition and logical volume used by the MySQL server to store the database tablespace. These instructions are ordered as such but can be modified to add additional storage to any existing logical volume.
This article assumes that API Gateway version 8.x or later is currently running and that the appliance form factor is virtual or a software-based install running on a VMware-based hypervisor. This article does not apply to hardware appliances of any version or virtual appliances older than version 8.x.
API Gateway 8.x, 9.x
The API Gateway appliance comes with a structured disk partitioning scheme using a collection of logical volumes within a volume group on a physical volume. The current logical volume deployment can be printed and inspected via lvscan. An example output would be as follows (with the applicable information in bold):
ACTIVE '/dev/vg00/lv_swap' [2.00 GiB] inherit
ACTIVE '/dev/vg00/lv_root' [8.00 GiB] inherit
...
ACTIVE '/dev/vg00/lv_reserved' [2.00 GiB] inherit
ACTIVE '/dev/vg00/lv_db' [20.97 GiB] inherit
The logical volume name (lv_db) and its current size (20.97 GiB) should be noted and retained in order to ensure the process completed without issues.
It is imperative that an administrator takes a virtual machine snapshot before beginning this procedure. Executing a full API Gateway installation backup is also recommended. Executing a snapshot is documented here. API Gateway backup procedures are documented within the Installation and Maintenance Manual for the applicable version of the Gateway.
NOTE: The following output is an example with an existing partitioned disk (/dev/sda) and a new unpartitioned disk (/dev/sdb). Some data has been removed for brevity and other data may be different based on your deployment.
Disk /dev/sda: 53.7 GB, 53687091200 bytes
...
Disk identifier: 0x00085c3a
Device Boot Start End Blocks Id System
/dev/sda1 * 1 131 1048576 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 131 6528 51379200 8e Linux LVM
Disk /dev/sdb: 42.9 GB, 42949672960 bytes
...
Disk identifier: 0x00046a21
Device Boot Start End Blocks Id System
NOTE: This command will open up a new command shell. Options are selected by choosing the appropriate alphanumeric option and pressing <Enter>
Executing lvscan should show a large storage allocation for the lv_db logical volume. If this value has increased then the operation was successful. An example output is documented below:
ACTIVE '/dev/vg00/lv_swap' [2.00 GiB] inherit
ACTIVE '/dev/vg00/lv_root' [8.00 GiB] inherit
..
ACTIVE '/dev/vg00/lv_reserved' [2.00 GiB] inherit
ACTIVE '/dev/vg00/lv_db' [36.94 GiB] inherit