vRA 7.6x/vRO Appliance Storage Partition Increase/Resize

Mindwatering Incorporated

Author: Tripp W Black

Created: 05/05/2021 at 11:24 AM

 

Category:
VMWare
vRA, vRO - VCAC

Issue:
One of the vRA/vRO disks is nearing 100%. How to expand the vRA/vRO appliance.


Warning:
Make sure you have a backup. Shut down the VM appliance.
Back it up again. Restore the backup to another datastore.

If the fdisk step fails, data will be lost. Now remove any snapshot. Snapshots complicate (block) the the expansion.


Steps:
1. Increase the disk size:
In vCenter, locate the appliance. (e.g. Search, enter the VM name)
Under Actions, choose Edit Settings, Under Disks, Update the disk to it's new size. In our case, it's disk 4, and we increase it from 100 GB to 150 GB.
Click OK


2. Increase the actual partition.
Notes:
We will use fdisk to "delete" the current partition, and then make a new one. Ironically, killing a partition in Linux leaves the data intact if you get the starting sector the same, and the disk isn't smaller. Then, we will create a new partition, and reboot.
We will then extend the disk.

- Login to the appliance as root:
$ ssh root@vroappliance.mindwatering.local
<enter password>

- Update the disk devices:
[master] vroappliance:~ # partprobe

- Verify if the disk shows 100GB vs 150 GB.
Print the location. Note the starting sector. We will need it again later.
[master] vroappliance:~ # fdisk /dev/sdd

Command (m for help): p
e.g.
Disk /dev/sdd: 107.4 GB, 107374182400 bytes

- In this example, the system still doesn't see the increased size, and partprobe didn't update. So we will do a reboot.
Command (m for help): q
[master] vroappliance:~ # reboot

- If the output said:
Disk /dev/sdd: 161.1 GB, 161061273600 bytes
We could skip to the next step.

- Run fdisk for the disk.
Print the location. Note the starting sector. We will need it again later.
[master] vroappliance:~ # fdisk /dev/sdd

Command (m for help): p
e.g.
Disk /dev/sdd: 161.1 GB, 161061273600 bytes
...
Device Boot Start End Blocks Id System
/dev/sdd1 2048 209715199 104856576 83 Linux


Command (m for help): d
Selected partition 1
Partition 1 has been deleted.
<This removes the partition, but leaving the data as long as starting sector next stays the same >

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4, default 1): 1
First sector (2048-314572799), default 2048): 2048
Last sector, +sectors or +size{K,M,G} (2048-314572799, default 314572799): 314572799

Command (m for help): w
The partition table has been altered!
Calling ioctl() to reread partition table.
WARNING: Re-reading partition table failed with error 16: Device or resource busy.
The kernel still uses the old table...
<This saves the change to disk, but also will give an error because the kernel cannot be updated with the disk still mounted. >

[master] vroappliance:~ # reboot


3. Resize (increase) the disk's formatted size.
- Log back into the appliance:
$ ssh root@vroappliance.mindwatering.local
<enter password>

- If you check the partition size via df, it will still show the old size. We need to expand it. Use resize2fs:
[master] vroappliance:~ # df
...
/dev/sdd1 103211296 97969444 0 100% /storage/db
...

[master] vroappliance:~ # resize2fs /dev/sdd1
resize2fs 1.41.9 (22-Aug-2009)
Filesystem at /dev/sdd1 is mounted on /storage/db; on-line resizing required
old desc blocks = 7, new_desc_blocks = 10
Performing an on-line resize of /dev/sdd1 to 39321344 (4k) blocks.
The filesystem on /dev/sdd1 is now 39321344 blocks long.

- Verify new size using df:
[master] vroappliance:~ # df
...
/dev/sdd1 154817516 97969336 48985400 67% /storage/db
...

- Just in-case, performed another reboot, to make sure everything comes up okay:
[master] vroappliance:~ # reboot



previous page