Our vIDM appliance is now at 3.3.4, was updated several times and still has the disk layout from the initial 3.3.2 installation:
The pre check to 3.3.5 now fails complaining: Disk space on /opt/vmware/horizon should be at least 7 GB for upgrade bundle upload. Current available space on /opt/vmware/horizon is 2 GB in node. So i decided to extend the disks and partitions to match the 3.3.5 vIDM disk settings:
The steps are quite simple and can be done online:
Extend Hard disk 1 to 60GB and Hard disk 2 and 3 to 20GB in vCenter (Hard disk 4 can be ignored)
After that is a good time to take a snapshot of the VM.
Login as "root" to your appliance let linux rescan for the disk changes:
echo 1 > /sys/class/block/sda/device/rescan
echo 1 > /sys/class/block/sdb/device/rescan
echo 1 > /sys/class/block/sdc/device/rescan
Check if the new disk sizes are recognized with dmesg:
dmesg -T | grep "detected capacity change"
Now you can extend the root partition with:
cfdisk /dev/sda
Select /dev/sda4, [ Resize ], type 12G (12G are used in the 3.3.5 appliance), than [ Write ] and finally type "yes" and quit cfdisk
Now you must resize the file system with "resize2fs" to use the new space:
[before resize2fs]
df -h | grep "sda4"
/dev/sda4 8.8G 3.9G 4.5G 47% /
[run resize2fs]
resize2fs /dev/sda4
[after resize2fs]
df -h | grep "sda4"
/dev/sda4 12G 3.9G 7.3G 35% /
Next is to resize the two data partitions which are LVMs and the steps are different in this case:
Use "pvresize" to let LVM know that the physical disk size has changed:
[before pvresize]
pvdisplay /dev/sdc /dev/sdb
--- Physical volume ---
PV Name /dev/sdc
VG Name tomcat_vg
PV Size 10.00 GiB / not usable 4.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 2559
Free PE 0
Allocated PE 2559
PV UUID 546IZ8-0PYE-AAKg-f2WP-VGeG-L9ep-OTasC3
--- Physical volume ---
PV Name /dev/sdb
VG Name db_vg
PV Size 10.00 GiB / not usable 4.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 2559
Free PE 0
Allocated PE 2559
PV UUID ue30Dt-bPWI-JlYG-DktR-5mGT-AZ66-4KEK03
[run pvresize]
pvresize /dev/sdb /dev/sdc
[after pvresize]
pvdisplay /dev/sdc /dev/sdb
--- Physical volume ---
PV Name /dev/sdc
VG Name tomcat_vg
PV Size <20.00 GiB / not usable 0
Allocatable yes
PE Size 4.00 MiB
Total PE 5119
Free PE 2560
Allocated PE 2559
PV UUID 546IZ8-0PYE-AAKg-f2WP-VGeG-L9ep-OTasC3
--- Physical volume ---
PV Name /dev/sdb
VG Name db_vg
PV Size <20.00 GiB / not usable 0
Allocatable yes
PE Size 4.00 MiB
Total PE 5119
Free PE 2560
Allocated PE 2559
PV UUID ue30Dt-bPWI-JlYG-DktR-5mGT-AZ66-4KEK03
Next step is to extend the logical volumes with "lvextend" to use the new space:
[before lvextend]
lvdisplay /dev/tomcat_vg/horizon /dev/db_vg/db
--- Logical volume ---
LV Path /dev/tomcat_vg/horizon
LV Name horizon
VG Name tomcat_vg
LV UUID gw2MpR-PZgs-ehmA-Ebpc-vg52-97Nd-9t5YVW
LV Write Access read/write
LV Creation host, time sc-a01-049-209, 2019-09-12 15:55:24 +0000
LV Status available
# open 1
LV Size <10.00 GiB
Current LE 2559
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:1
--- Logical volume ---
LV Path /dev/db_vg/db
LV Name db
VG Name db_vg
LV UUID WzGOjU-z4Qw-FI0u-aOVO-AWlB-AO1O-2fwSkN
LV Write Access read/write
LV Creation host, time sc-a01-049-209, 2019-09-12 15:55:23 +0000
LV Status available
# open 1
LV Size <10.00 GiB
Current LE 2559
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:0
[run lvextend]
lvextend -l +100%FREE /dev/tomcat_vg/horizon
lvextend -l +100%FREE /dev/db_vg/db
[after lvextend]
lvdisplay /dev/tomcat_vg/horizon /dev/db_vg/db
--- Logical volume ---
LV Path /dev/tomcat_vg/horizon
LV Name horizon
VG Name tomcat_vg
LV UUID gw2MpR-PZgs-ehmA-Ebpc-vg52-97Nd-9t5YVW
LV Write Access read/write
LV Creation host, time sc-a01-049-209, 2019-09-12 15:55:24 +0000
LV Status available
# open 1
LV Size <20.00 GiB
Current LE 5119
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:1
--- Logical volume ---
LV Path /dev/db_vg/db
LV Name db
VG Name db_vg
LV UUID WzGOjU-z4Qw-FI0u-aOVO-AWlB-AO1O-2fwSkN
LV Write Access read/write
LV Creation host, time sc-a01-049-209, 2019-09-12 15:55:23 +0000
LV Status available
# open 1
LV Size <20.00 GiB
Current LE 5119
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:0
And finally use "resize2fs" to extend the file system on the two LVs:
[before resize2fs]
df -h | grep "mapper"
/dev/mapper/db_vg-db 9.8G 1014M 8.3G 11% /db
/dev/mapper/tomcat_vg-horizon 9.8G 7.1G 2.2G 78% /opt/vmware/horizon
[run resize2fs]
resize2fs /dev/tomcat_vg/horizon
resize2fs /dev/db_vg/db
[after resize2fs]
df -h | grep "mapper"
/dev/mapper/db_vg-db 20G 1019M 18G 6% /db
/dev/mapper/tomcat_vg-horizon 20G 7.2G 12G 39% /opt/vmware/horizon
That's all... and I think not supported from VMware 😄
That's all... and I think not supported from VMware 😄
Welp if it wasn't it sure is now, I stumbled upon both of these articles and realized one was just like the other, haha.
Thanks, this is helping me alot!
How to Increase vIDM appliance disk space (85425) (vmware.com)
It's great when a community contribution is upgraded to an official KB article 😉