Skip to main content

 Extend HardDisks/Partitions on the vIDM Appliance

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:

rwk1982_1-1622553423963.png

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:

rwk1982_2-1622555689247.png

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)

rwk1982_0-1622556788397.png

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




rwk1982_1-1622558473434.png

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

Comments

Popular posts from this blog

  Issue with Aria Automation Custom form Multi Value Picker and Data Grid https://knowledge.broadcom.com/external/article?articleNumber=345960 Products VMware Aria Suite Issue/Introduction Symptoms: Getting  error " Expected Type String but was Object ", w hen trying to use Complex Types in MultiValue Picker on the Aria for Automation Custom Form. Environment VMware vRealize Automation 8.x Cause This issue has been identified where the problem appears when a single column Multi Value Picker or Data Grid is used. Resolution This is a known issue. There is a workaround.  Workaround: As a workaround, try adding one empty column in the Multivalue picker without filling the options. So we can add one more column without filling the value which will be hidden(there is a button in the designer page that will hide the column). This way the end user will receive the same view.  

57 Tips Every Admin Should Know

Active Directory 1. To quickly list all the groups in your domain, with members, run this command: dsquery group -limit 0 | dsget group -members –expand 2. To find all users whose accounts are set to have a non-expiring password, run this command: dsquery * domainroot -filter “(&(objectcategory=person)(objectclass=user)(lockoutTime=*))” -limit 0 3. To list all the FSMO role holders in your forest, run this command: netdom query fsmo 4. To refresh group policy settings, run this command: gpupdate 5. To check Active Directory replication on a domain controller, run this command: repadmin /replsummary 6. To force replication from a domain controller without having to go through to Active Directory Sites and Services, run this command: repadmin /syncall 7. To see what server authenticated you (or if you logged on with cached credentials) you can run either of these commands: set l echo %logonserver% 8. To see what account you are logged on as, run this command: ...
  The Guardrails of Automation VMware Cloud Foundation (VCF) 9.0 has redefined private cloud automation. With full-stack automation powered by Ansible and orchestrated through vRealize Orchestrator (vRO), and version-controlled deployments driven by GitOps and CI/CD pipelines, teams can build infrastructure faster than ever. But automation without guardrails is a recipe for risk Enter RBAC and policy enforcement. This third and final installment in our automation series focuses on how to secure and govern multi-tenant environments in VCF 9.0 with role-based access control (RBAC) and layered identity management. VCF’s IAM Foundation VCF 9.x integrates tightly with enterprise identity providers, enabling organizations to define and assign roles using existing Active Directory (AD) groups. With its persona-based access model, administrators can enforce strict boundaries across compute, storage, and networking resources: Personas : Global Admin, Tenant Admin, Contributor, Viewer Projec...