This document provides instructions on how to increase HCX Manager disk space specifically related to Section A) of Knowledge Article 373010 "HCX - Bulk Migration & Replication Assisted vMotion (RAV) scalability guide - for HCX version 4.10 or higher"
Please refer to the above Knowledge Article before making any changes.
Step 1: Login to HCX Manager SSH Console using 'admin' user.
Step 2: Switch to 'root' user.
Step 3: Run following commands on prompt.
# lsblk -l --output SIZE,TYPE,NAME,MOUNTPOINT | grep common
Step 4: Identify whether HCX Manager is LVM or non-LVM based on below responses from Step 2.
44.4G part sda6 /common --- non-LVM based, follow Section A
44.4G lvm vg01-lv01 /common --- LVM based, follow Section B
NOTE: for a non-LVM based system that is already scaled to 'medium' the response will be as below.
120G part sdb1 /common_ext
Step 1: Add a 120GB or 300GB disk to both HCX managers based on the desired Medium or Large Scale Form Factor. Refer to Broadcom Knowledge Article 316591 "Creating a new virtual disk for an existing Linux virtual machine".
Step 2: Mount the created disk to HCX managers.
mount /dev/sdc1 /common_ext
df -hT
vi /etc/fstab
/dev/sdc1 /common_ext ext3 rw,nosuid,nodev,exec,auto,nouser,async 1 2
1. Press the ESC key for normal mode.
2. Press "i" Key for insert mode.
3. Press ":q!" keys to exit from the editor without saving a file.
4. Press ":wq!" keys to save the updated file and exit from the editor.
Step 3: Stop HCX services as below:
# systemctl stop postgresdb
# systemctl stop zookeeper
# systemctl stop kafka
# systemctl stop app-engine
# systemctl stop web-engine
# systemctl stop appliance-management
Step 4: Redirect existing contents under "kafka-db" and "postgres-db" to the newly created disk.
cd /common
mv kafka-db kafka-db.bak
cd /common_ext
mkdir kafka-db
chmod 755 kafka-db
chown kafka:kafka kafka-db
cd /common
ln -s /common_ext/kafka-db kafka-db
cd /common
mv postgres-db postgres-db.bak
cp -r /common/postgres-db.bak /common_ext/postgres-db
chown -R postgres:postgres /common_ext/postgres-db
cd /common
ln -s /common_ext/postgres-db postgres-db
Step 5: Start HCX services as below:
# systemctl start postgresdb
# systemctl start zookeeper
# systemctl start kafka
# systemctl start app-engine
# systemctl start web-engine
# systemctl start appliance-management
# fdisk -l | grep 'Disk /dev/sdb'
Disk /dev/sdb: 120 GiB, 128849018880 bytes, 251658240 sectors
# echo 1 > /sys/block/sdb/device/rescan
# fdisk -l | grep 'Disk /dev/sdb'
Disk /dev/sdb: 300 GiB, 322122547200 bytes, 629145600 sectors
# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.37.4).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
This disk is currently in use - repartitioning is probably a bad idea.
It's recommended to umount all file systems, and swapoff all swap
partitions on this disk.
Command (m for help): d
Selected partition 1
Partition 1 has been deleted.
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p):
Using default response p.
Partition number (1-4, default 1):
First sector (2048-629145599, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-629145599, default 629145599):
Created a new partition 1 of type 'Linux' and of size 300 GiB.
Partition #1 contains a ext3 signature.
Do you want to remove the signature? [Y]es/[N]o: No
Command (m for help): w
The partition table has been altered.
Syncing disks.
# resize2fs /dev/sdb1
Step 1: Add a 120GB or 300GB disk to both HCX managers based on the desired Medium or Large Scale Form Factor. Refer to Broadcom Knowledge Article 316591 "Creating a new virtual disk for an existing Linux virtual machine" for creating a new virtual disk to an existing Linux virtual machine.
Step 2: Login to HCX Manager SSH Console using 'admin' user.
Step 3: Switch to 'root' user.
Step 4: Verify current partition with '/common' mount path.
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 7.6G 4.0G 3.3G 55% /
devtmpfs 5.9G 0 5.9G 0% /dev
tmpfs 5.9G 64K 5.9G 1% /dev/shm
tmpfs 2.4G 644K 2.4G 1% /run
tmpfs 4.0M 0 4.0M 0% /sys/fs/cgroup
/dev/sda2 10M 2.0M 8.1M 20% /boot/efi
/dev/sda4 7.6G 92K 7.3G 1% /slot2
/dev/mapper/vg01-lv01 44G 3.0G 39G 8% /common
tmpfs 1.2G 0 1.2G 0% /run/user/1000
Step 5: To rescan the disks on the HCX Manager execute the following command.
# echo 1 > /sys/block/sdb/device/rescan
Step 6: To create and add a partition to the existing '/common' partition using LVM execute the following commands.
# pvcreate /dev/sdb
Physical volume "/dev/sdb" successfully created.
# vgextend vg01 /dev/sdb
Volume group "vg01" successfully extended
# lvm lvextend -l +100%FREE /dev/vg01/lv01
Size of logical volume vg01/lv01 changed from 44.39 GiB (11364 extents) to <164.39 GiB (42083 extents).
Logical volume vg01/lv01 successfully resized.
# resize2fs -p /dev/mapper/vg01-lv01
resize2fs 1.46.5 (30-Dec-2021)
Filesystem at /dev/mapper/vg01-lv01 is mounted on /common; on-line resizing required
old_desc_blocks = 3, new_desc_blocks = 11
The filesystem on /dev/mapper/vg01-lv01 is now 43092992 (4k) blocks long.
Step 7: Verify if the partition has been extended.
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 7.6G 4.0G 3.3G 55% /
devtmpfs 5.9G 0 5.9G 0% /dev
tmpfs 5.9G 64K 5.9G 1% /dev/shm
tmpfs 2.4G 652K 2.4G 1% /run
tmpfs 4.0M 0 4.0M 0% /sys/fs/cgroup
/dev/sda2 10M 2.0M 8.1M 20% /boot/efi
/dev/sda4 7.6G 92K 7.3G 1% /slot2
/dev/mapper/vg01-lv01 162G 3.1G 152G 2% /common
tmpfs 1.2G 0 1.2G 0% /run/user/1000
Step 1: Login to HCX Manager SSH Console using 'admin' user.
Step 2: Switch to 'root' user.
Step 3: Verify current partition with '/common' mount path.
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 7.7G 4.2G 3.2G 57% /
devtmpfs 12G 0 12G 0% /dev
tmpfs 12G 64K 12G 1% /dev/shm
tmpfs 4.7G 668K 4.7G 1% /run
tmpfs 4.0M 0 4.0M 0% /sys/fs/cgroup
/dev/sda2 10M 2.0M 8.1M 20% /boot/efi
/dev/sda3 7.6G 4.0G 3.3G 56% /slot1
/dev/mapper/vg01-lv01 162G 6.0G 149G 4% /common
tmpfs 2.4G 0 2.4G 0% /run/user/1000
Step 4: To rescan the disks on the HCX Manager execute the following command.
# echo 1 > /sys/block/sdb/device/rescan
Step 5: Verify increased disk space.
# fdisk -l | grep /dev/sdb
Disk /dev/sdb: 300 GiB, 322122547200 bytes, 629145600 sectors
Step 6: Increase Physical Volume.
# pvresize /dev/sdb
Physical volume "/dev/sdb" changed
1 physical volume(s) resized or updated / 0 physical volume(s) not resized
Step 7: Extend Volume Group.
# lvm lvextend -l +100%FREE /dev/vg01/lv01
Size of logical volume vg01/lv01 changed from <164.39 GiB (42083 extents) to <344.39 GiB (88163 extents).
Logical volume vg01/lv01 successfully resized.
Step 8: Resize partition space.
# resize2fs -p /dev/mapper/vg01-lv01
resize2fs 1.46.5 (30-Dec-2021)
Filesystem at /dev/mapper/vg01-lv01 is mounted on /common; on-line resizing required
old_desc_blocks = 11, new_desc_blocks = 22
The filesystem on /dev/mapper/vg01-lv01 is now 90278912 (4k) blocks long.
Step 9: Verify increase partition space.
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 7.7G 4.2G 3.2G 57% /
devtmpfs 12G 0 12G 0% /dev
tmpfs 12G 64K 12G 1% /dev/shm
tmpfs 4.7G 672K 4.7G 1% /run
tmpfs 4.0M 0 4.0M 0% /sys/fs/cgroup
/dev/sda2 10M 2.0M 8.1M 20% /boot/efi
/dev/sda3 7.6G 4.0G 3.3G 56% /slot1
/dev/mapper/vg01-lv01 339G 6.0G 319G 2% /common
tmpfs 2.4G 0 2.4G 0% /run/user/1000