AppDefense Appliance disk is almost full. Appliance upgrade fails due to disk space.

Problem

Appliance upgrade fails. While upgrading AppDefense Appliance, appliance is showing as unreachable. AppDefense Appliance disk space is almost full.

Solution

  1. Verify disk space usage as follows.
    1. SSH to the AppDefense Appliance with admin credentials.
    2. Switch to root user using the sudo su command.
    3. Verify disk space usage using the df -h /var/vmware/vpostgres/ command.
      The result displays used and available disk space. For example:
      df -h /var/vmware/vpostgres/
      Filesystem                   Size  Used Avail Use% Mounted on
      /dev/mapper/db_vg-vpostgres   99G  90G   9G   90% /var/vmware/vpostgres
    Here 90% of disk space is used.
  2. Add an additional disk for the appliance VM.
    1. Log in to the vCenter Server and go to the AppDefense Appliance virtual machine.
    2. Click Actions > Edit Settings, and make sure that you are in Virtual Hardware tab.
    3. Click Add New Device, and then click Hard Disk.
    4. Enter or select size of a hard disk as 100 GB.
    5. Click OK.
  3. If database partition is full 90% or more, expand the database disk on appliance as follows.
    1. SSH to the AppDefense Appliance with admin credentials.
    2. Switch to root user using the sudo su command.
    3. Discover new disk using the following commands.
      fdisk -l | grep '100 GiB' 
      for i in 0 1 2; do echo "- - -" > /sys/class/scsi_host/host$i/scan; done 
      fdisk -l | grep '100 GiB' 
      Make sure new disk is showing up. If not, reboot the VM.
    4. Add the disk to existing database volume group using the following commands. Assuming /dev/sdg is a new disk.
      lvmdiskscan; pvcreate /dev/sdg; lvmdiskscan 
      lvs; vgextend db_vg /dev/sdg; lvextend -l +100%FREE /dev/db_vg/vpostgres; lvs
    5. Expand the existing database file system to 200 GB as follows.
      resize2fs -p /dev/mapper/db_vg-vpostgres
  4. Make sure db_vg is changed from 100 GB to 200 GB using the following command.
    df -h /var/vmware/vpostgres/
  5. Proceed with appliance upgrade as usual.

Solution

Appliance upgrade must proceed successfully.