VMware Cloud Community
Mnemonic
Enthusiast
Enthusiast

VCSA External PSC disk volume expansion without reboot or downtime

Hi,

If you have a VCSA based PSC and you are running out of disk space in some partitions you might have discovered that the command you would normally use on a VCSA to extend the disk (vpxd_service_cfg storage lvm_autogrow) does not exist.

You could ask why, because it is just based on some shell scripts, but anyway. The fact is that in VCSA 6.0 Update 2 they do not exist when configured as a PSC.

The following requires that you are familier with Linux bash, and everything you do it your own responsibility. You should never run commands on you system that you do not fully understand.

Solution:


The way to extend a partition in a VCSA based PSC is the following.

  • Login to PSC using SSH
  • Find the right volume group
  • Find the right logical volume
  • Find the right disk
  • Extend the virtual disk
  • Rescan disk in PSC
  • Grow Volume Group
  • Grow Logical Volume

In depth.

Using any ssh client connect to you PSC.

If you are in the appliancesh shell you need to break out using:

shell.set --enabled true

shell

Now you have to find the partition you need to extend, and take note of the filesystem name

df -h

Find the physical disk name (PV), and take note of if.

pvs

Use this to figure out which disk virtual disk you need to extend. Take note of the size for cross reference. Usually /dev/sd(A) corresponds to Virtual Disk 1, and B to disk 2, and so forth.

Extend the virtual disk using you vSphere client.

After the task is done in vCenter you need to rescan your disks in the PSC using SSH.

rescan-scsi-bus.sh -w --forcerescan

Find the Logical Volume Name

lvdisplay | grep "LV Name" | awk '{print $3}'

Resize your volume group using the disk name (ex: /dev/sde)

pvresize <DISK DEVICE>

Resize you logical volume using the LV Name (ex: lvresize --resizefs -l +100%FREE /dev/log_vg/log)

lvresize --resizefs -l +100%FREE <VOLUMEGROUP NAME>

I hope this helps someone.

Best Regards

Brian Knutsson

ATEA A/S

1 Reply
VMscribble
Contributor
Contributor

6.0 U2a - Nov 22nd, 2016 finally has an official way for the ext psc.

:smileyx:

# /usr/lib/applmgmt/support/scripts/lvm_cfg.sh storage lvm autogrow

bash: /usr/lib/applmgmt/support/scripts/lvm_cfg.sh: Permission denied

:smileycheck:

# cd /usr/lib/applmgmt/support/scripts/

# chmod +x lvm_cfg.sh

# ./lvm_cfg.sh storage lvm autogrow

Command executed successfully

https://vmscribble.com/vcenter/6-0-external-vcsa-vm_cfg-sh-permission-denied-vpxd_servicecfg-command...

Thanks,

VMscribble

Reply
0 Kudos