Note: Before doing any work make sure we have a current backup of VIO. For more information, see the Backup and Restore section of the
VMware Integrated Openstack Administration guide
- Resize Hard disk 1 in vCenter for controller
- ssh into the VIO manager, then ssh to controller
root@oms [ ~ ]# viossh <controller name>
vioadmin@controller-xxx [ ~ ]$ sudo su –
- Rescan the SCSI bus for disk changes
echo 1 > /sys/class/block/sda/device/rescan
- Validate that OS sees the change
root@oms [ ~ ]# fdisk -l
....
GPT PMBR size mismatch (83886079 != 94371839) will be corrected by write.
The backup GPT table is not on the end of the device. This problem will be corrected by write.
Disk /dev/sda: 45 GiB, 48318382080 bytes, 94371840 sectors << New disk size
- Install the parted package to resize the disk partition
root@oms [ /etc/yum.repos.d ]# tdnf install parted
Refreshing metadata for: 'VMware Photon Linux 3.0 (x86_64)'
Refreshing metadata for: 'VMware Photon Linux 3.0 (x86_64) Updates'
Refreshing metadata for: 'VMware Photon Extras 3.0 (x86_64)'
photon-extras 123 100%
Installing:
parted x86_64 3.2-9.ph3 photon-updates 1.12M 1170933
Total installed size: 1.12M 1170933
Is this ok [y/N]:
y
Downloading:
parted 423548 100%
Testing transaction
Running transaction
Installing/Updating: parted-3.2-9.ph3.x86_64
Complete!
root@oms [ /etc/yum.repos.d ]#
- View the partitions. Type Fix when prompted
# parted /dev/sda
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
Warning: Not all of the space available to /dev/sda appears to be used, you can
fix the GPT to use all of the space (an extra 10485760 blocks) or continue with
the current setting?
Fix/Ignore? Fix <<
Fix
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 48.3GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 3146kB 2097kB bios_grub
2 3146kB 137MB 134MB ext3
3 137MB 272MB 134MB linux-swap(v1)
4 272MB 42.9GB 42.7GB ext4
- Resize partition and quit (root partition on VIO manager is partition 4)
(parted) resizepart 4 yes 100%
resizepart 4 yes 100%
Warning: Partition /dev/sda4 is being used. Are you sure you want to continue?
(parted) quit
- Resize filesystem
root@oms [ /etc/yum.repos.d ]# resize2fs /dev/sda4
resize2fs 1.45.5 (07-Jan-2020)
Filesystem at /dev/sda4 is mounted on /; on-line resizing required
old_desc_blocks = 5, new_desc_blocks = 6
The filesystem on /dev/sda4 is now 11730171 (4k) blocks long.
- See the updated size
root@oms [ /etc/yum.repos.d ]# df -l /
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda4 45922128 13317084 30295188 31% /
- Repeat for remaining controllers
Modify the configuration file so that any newly created controllers will also be this size.
- Access the vio-manager VM using SSH.
- Determine the existing K8s controller size using the following command.. One of three values should be returned: small, medium, or large.
kubectl -n openstack get viomachinesets.vio.vmware.com controller1 -o jsonpath='{.spec.size}'
- The controller resource configuration is maintained in a K8s configmap resource named lcm-config. Open the lcm-config configmap for editing in vi using the following command.
kubectl -n openstack edit configmap lcm-config
- In the configmap locate the controller resource size returned in step 2. The diskSizeGB value is used to determine how much disk space a controller will be allocated. Change the diskSizeGB value to the desired disk space in GB and save the file.
Note: The OS also uses this space.