Visit VMARENA.COM For More Advanced Technical Posts , Learn More .

Sunday, January 21, 2018

VMDK Partitions and disk resizing in VCSA 6.5

Similar to the vCenter Server Appliance (VCSA) 6.0 release, the new VCSA 6.5 is also composed of multiple virtual machine disks (VMDKs). Each VMDK maps to a specific function and OS partition within the VCSA. There are now a total of 12 VMDKs, two of which are new in vSphere 6.5: vSphere Update Manager (VUM) and Image Builder. The following table provides a break down of the VMDKs in VCSA 6.5 compared to VCSA 6.0:
Disk6.0 Size6.5 SizePurposeMount Point
VMDK112GB12GB/ and Boot / and Boot
VMDK21.2GB1.8GBVCSA's RPM packagesN/A as it is not mounted after install
VMDK325GB25GBSwapSWAP
VMDK425GB25GBCore /storage/core
VMDK510GB10GBLog /storage/log
VMDK610GB10GBDB /storage/db
VMDK75GB15GBDBLog /storage/dblog
VMDK810GB10GBSEAT (Stats Events and Tasks) /storage/seat
VMDK91GB1GBNet Dumper /storage/netdump
VMDK1010GB10GBAuto Deploy /storage/autodeploy
VMDK11N/A (Previously InvSrvc 5GB)10GBImage Builder/storage/imagebuilder
VMDK12N/A100GBUpdate Manager /storage/updatemgr
n addition to the VMDK/partition changes, there are a couple of enhancements when needing to increase disk capacity in the VCSA. Just like in VCSA 6.0, you will still be able to hot-extend any one of the VMDKs while the system is still running.
  • The first change is that instead of the old vpxd_servicecfg command which is used expand the logical volume(s) making the new storage capacity available the OS/application, it has been replaced with the following command: /usr/lib/applmgmt/support/scripts/autogrow.sh 
  • The second change is that instead of having to perform the above command using only SSH which may be disabled by default. There is now a new Virtual Appliance Management Interface (VAMI) REST API that can be called remotely: POST /appliance/system/storage/resize
  • The final difference is that in previous releases, you could only resize the Embedded VCSA or External VCSA node, but not the Platform Services Controller (PSC) node. In 6.5, this has changed and you can apply this method on any one of the VCSA nodes. Thanks to Blair for reminding me on this one!
Lets walk through an example of increasing the Net Dumper partition (VMDK9) and exercising this new VAMI API.
Step 1 - Login to VCSA using SSH to run a quick "df -h" to check the current size of your Net Dumper partition which by default will be 1GB as seen in the screenshot below.
increase-disk-capacity-vcsa-6-5-0
Step 2 - Next, we will increase the VMDK to 5GB. In this example, I am using the vSphere Web Client but if you wanted to completely automate this process end-to-end, you can use the vSphere API/PowerCLI to perform this operation.
increase-disk-capacity-vcsa-6-5-1
Step 3 - To quickly try out the new VAMI API, we will use the new vSphere API Explorer that is included in the VSCA 6.5. Simply open a web browser and enter the following URL: https://[VCSA-HOSTNAME]/apiexplorer Select the "appliance" API and then click on the login button and enter your vCenter Server credentials.
increase-disk-capacity-vcsa-6-5-2
Step 4 - Scroll down to the POST /appliance/system/storage/resize operation and expand it. To call this API, just click on the "Try it out" button. If the operation completely successfully, you should see a  200 response as shown in the screenshot below.



Step 3 and 4 can also be called directly through PowerCLI using the new CIS cmdlets (Connect-CisServer & Get-CisService) which exposes the new VAMI APIs. Below is a quick snippet that performs the exact same operation:
Connect-CisServer -Server 192.168.1.150 -User administrator@vsphere.local -Password VMware1!
$diskResize = Get-CisService -Name 'com.vmware.appliance.system.storage'
$diskResize.resize()
Step 5 - Lastly, we can now log back into the VCSA and re-run the "df -h" command to verify we can see the new storage capacity.
increase-disk-capacity-vcsa-6-5-4

No comments:

Post a Comment