Increase Size of Virtual Disk

The gateway Virtual Appliance is shipped with 50GB default hard drive space. This should be sufficient for most deployments, but you may want to increase this if you:
gateway90
The
CA API Gateway
Virtual Appliance is shipped with 50GB default hard drive space. This should be sufficient for most deployments, but you may want to increase this if you:
  • Use the local Gateway database to store audit records.
  • Send high concurrency large messages. By default, the Gateway spools messages over a particular threshold (10 MB by default) to disk. If users are sending many messages of that size or larger, the disk may fill up during processing.
  • Configure the Gateway to use larger and more log files.
  • Configure a clustered environment that creates additional log files and synchronizes logs within MySQL.
If any of these apply to you, increase the disk space available to your Virtual Appliance.
How to Increase Disk Space for the Virtual Appliance
This section describes how to use Logical Volume Management to modify the amount of storage available to the Virtual Appliance. The procedure is intended for system administrators or advanced technical users.
(Reference: Support document ID: TEC0000001372)
Take a snapshot of the virtual machine before attempting to change the disk space. See this page from the VMware documentation for details. It is also a good idea to make a backup of your
CA API Gateway
. See Back Up Gateways for details.
Environment
The
CA API Gateway
comes with a structured disk partitioning scheme, using a collection of logical volumes within a volume group on a physical volume. You can print and inspect the current logical volume deployment using
lvscan
. The following is an example output:
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
Make a note of the logical volume name ("lv_db" in the example) and its current size ("20.97").
Instructions
  1. Create and install a new virtual disk onto the Virtual Appliance. See this page from the VMware documentation for details. You may need to consult the vendor of the applicable virtualization platform for more specific instructions.
  2. Restart the Gateway appliance and access a command prompt.
  3. Run this command to display the existing list of partitions:
    # fdisk -l
    You should see output similar to the following.
    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
  4. Start the disk partitioning tool and target the newly installed disk:
    # fdisk /dev/sdb
    This command opens up a new command shell. Select the appropriate option by choosing the appropriate alphanumeric option and then pressing
    Enter
    .
  5. Select option
    N
    to add a new partition.
  6. Select option
    P
    to set the new partition as the primary.
  7. Enter
    1
    to set the partition number.
  8. Press
    Enter
    to accept the default starting cylinder.
  9. Press
    Enter
    to accept the default ending cylinder.
  10. Select option
    T
    to change the partition type.
  11. Specify
    8e
    to change the type to "Linux LVM".
  12. Select option
    W
    to write the changes to disk.
  13. Initialize the new disk partition:
    # pvcreate /dev/sdb1
  14. Add a physical volume to an existing volume group:
    # vgextend vg00 /dev/sdb1
  15. Expand the size of the database tablespace partition:
    # lvextend -r -l +100%FREE /dev/mapper/vg00-lv_db /dev/sdb1
    To distribute the free space among different drives, specify the size for one specific drive. For example, to add only 40GB to root (out of the 100GB space added to the server), use this command:
    # lvextend -L +40G -r /dev/mapper/vg00-lv_root
Verify
Running
lvscan
again should show an increased storage allocation for the
lv_db
logical volume. For example, compare this against the sample shown under "Environment":
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