Skip to content

How to Increase VCSA External PSC Disk Space in vSphere 6

The vCenter Server Appliance 6.0 uses the Linux Logical Volume Management (LVM) that allows you to dynamically increase the disk size of the vCenter Server disks. For the vCenter server itself the process to increase the capacity is well documented in KB2126276. When you have an external Platform Services Controller, the tool mentioned in the KB is missing. You can't use "vpxd_servicecfg storage lvm autogrow" to increase the space automatically so you have to do it manually.

This post explains how to increase the disk space for an external platform service controller.

First of all, if you are familiar with LVM, there is noting special here. Just use the vSphere Client to grow the virtual disk (I recommended to grow the disk instead of attaching a new disk to extend the VG) and resize the Volume Group and Logical Volume.

  1. Connect to the PSC with SSH
  2. Get out of the appliancesh and open a bash shell
    shell.set --enabled true 
    shell
  3. Use df -h to identify the filesystem that needs to be resized. In this exaple, it is the volume used for logs.
    df -h
    /dev/mapper/log_vg-log 5.0G 5.0G 0 100% /storage/log

    psc-storage-log-out-of-space

  4. Use the following table to identify the corresponding virtual disk.
    DiskMount PointDisk DeviceLogical Volume
     VMDK1//dev/sda
     VMDK2/tmp/dev/sdb
     VMDK3SWAP/dev/sdc/dev/swap_vg/swap1
     VMDK4/storage/core/dev/sdd/dev/core_vg/core
     VMDK5/storage/log/dev/sde/dev/log_vg/log
     VMDK6/storage/db/dev/sdf/dev/db_vg/db
     VMDK7/storage/dblog/dev/sdg/dev/dblog_vg/dblog
     VMDK8/storage/seat/dev/sdh/dev/seat_vg/seat
     VMDK9/storage/netdump/dev/sdi/dev/netdump_vg/netdump
     VMDK10/storage/autodeploy/dev/sdj/dev/autodeploy_vg/autodeploy
     VMDK11/storage/invsvc/dev/sdk/dev/invsvc_vg/invsvc
  5. Resize the Virtual Disk with the vSphere (Web) Client
    psc-resize-virtual-disk
  6. Rescan the SCSI Bus to make Linux aware of the resized virtual disk
    rescan-scsi-bus.sh -w --forcerescan
  7. Resize the Volume Group by using the Disk Device from the table above
    pvresize /dev/sd<X>

    psc-pvresize-dev-sde

  8. Resize the Logical Volume by using the name from the table above
    lvresize --resizefs -l +100%FREE <LOGICAL VOLUME>

    psc-lvresize

  9. Verify that the resize was successfulpsc-storage-with-resized-log

Additional Information
The vpxd_servicecfg command mentioned in KB2126276 is a shell script that calls functions from disk_utils.sh to automatically resize all volumes after resizing a virtual disk. The routine uses the same commands as explained above.

/usr/sbin/vpxd_servicecfg

  case "$ACTION" in
 "autogrow")
 do_storage_lvm_autogrow "$@"
 ;;
 "recreate_swap")
 do_storage_lvm_recreate_swap "$@"
 ;;
 *)
 log "ERROR: Invalid storage action ($ACTION)"
 RESULT=$ERROR_INVALID_PARAMETER
 return 1
 ;;
 esac

/usr/lib/vmware-vpx/disk_utils.sh

# expands LVs into new disk free space.
lvm_autogrow()
{
 # we don't handle brand new disks
 # The user has to manually do vgcreate
 # or vgextend to add it to existing VG

 # For existing VGs just call resize_lvm_vg
 resize_lvm_vg
 return $?
}

# Following routine resizes all VGs
resize_lvm_vg()
{
 local VGLIST=`lvdisplay | grep "LV Name"|awk '{print $3}'`
 # Call resize PVs (Doesn't hurt if called multiple times)
 resize_lvm_pv
 # Now resize all LVM LVs
 for v in $VGLIST; do
 tlog "INFO: LV Resizing $v"
 lvresize --resizefs -l +100%FREE "$v" 2>&1
 done
 return 0
}

# Following routine resizes all PVs in LVM called by resize_lvm_vg
resize_lvm_pv()
{
 # Add a force rescan of scsi bus to allow hotadd changed disk size
 # Note the following command is SuSE / SLES specific
 tlog "INFO: Scanning Hard disk sizes"
 rescan-scsi-bus.sh -w --forcerescan 2>&1
 # Now resize all LVM PVs
 local DEVLIST=`ls /sys/block/ | grep sd[a-z]`
 for d in $DEVLIST; do
 local DEV=/dev/${d}
 # check for partitions, filesystem, swap directly on the device and LVM.
 tlog "INFO: Resizing PV $DEV"
 if file -s $DEV | grep -q "LVM2"; then
 pvresize $DEV 2>&1
 fi
 done
}

 

3 thoughts on “How to Increase VCSA External PSC Disk Space in vSphere 6”

Leave a Reply

Your email address will not be published. Required fields are marked *