If you have insufficient space on the PostgreSQL database disk of a vCloud Director appliance, you can increase the capacity of the embedded PostgreSQL database.

The PostgreSQL database resides on Hard disk 3. It has a default size of 80 GB. The procedure can be done while the appliances are operational.
Important: You must increase the capacity of any existing standby appliances before increasing the capacity of the primary appliance.


  • If your vCloud Director environment has standby nodes, identify the standby nodes and the primary node, and begin the procedure from a standby node. For more information on identifying the roles of the nodes, see Check the Status of a Database High Availability Cluster.
  • If your vCloud Director environment consists of only a primary node, run the procedure on the primary node.


  1. Log in to the vSphere Client to increase the capacity of Hard Disk 3 to the size that you want.
    The PostgreSQL database disk size on each standby appliance must be as large as the PostgreSQL database disk on the primary appliance.
    1. Select the appliance virtual machine that you want to change.
    2. Select Actions > Edit Settings.
    3. Increase the size of Hard disk 3 and click OK.
    The progress of the reconfiguration task appears in the Recent tasks pane.
  2. Increase the logical size of the volume that the database uses.
    1. Log in directly or by using an SSH client to the vCloud Director appliance console as root.
    2. To apply the hard disk resizing change to the OS, run the following command.
      echo 1 > /sys/class/scsi_device/2\:0\:2\:0/device/rescan
    3. To get the correct space recognized at the physical volume layer, run the following command.
      pvresize /dev/sdc
    4. (Optional) Confirm the new physical volume size by running the following command.
    5. Resize the logical volume by running the following command.
      lvresize /dev/database_vg/vpostgres /dev/sdc
    6. (Optional) Confirm the new logical volume size by running the following command.
  3. Increase the size of the file system so that it consumes the entire logical volume.
    1. To consume the additional space, run the following command.
      resize2fs /dev/database_vg/vpostgres
    2. (Optional) To confirm that the file system consumed the additional space, run df -h.
      The additional space is available to the OS. The system output is similar to: /dev/mapper/database_vg-vpostgres 157G 75G 82G 48% /var/vmware/vpostgres
  4. If your environment does not consist of only one primary appliance and has other standby nodes, repeat Step 1 to Step 3 on all other standby nodes that have a database and then repeat Step 1 to Step 3 on the primary node.