Extending the VMware vCloud Usage Meter storage partition
search cancel

Extending the VMware vCloud Usage Meter storage partition

book

Article ID: 391179

calendar_today

Updated On: 03-18-2025

Products

VMware Usage Meter

Issue/Introduction

This article explains how to extend the storage partition of VMware vCloud Usage Meter to increase available disk space.

Environment

VMware vCloud Usage Meter 4.x

Resolution

To extend the root partition: 

  1. Take a backup/clone of the virtual machine that needs its root partition extended.

    Note: This is important. Make sure the backup/clone is working.

  2. Right-click the Usage Meter virtual machine and click Edit Settings.

  3. Extend Hard disk 1 to the desired size(Please extend the disk based on the file system in question. it is not mandatory to extend all the hard disks.)

    Note: Take a snapshot of the VM as the hard disk size has been extended.

  4. Putty into the node as "root" and run the below command to rescan for the disk changes

    echo 1 > /sys/class/block/sda/device/rescan
  5.  Invoke partitioning tool (menu-driven interface) by running the below command.

    # cfdisk /dev/sda
  6. Invoke partitioning tool (menu-driven interface) by running the below command.

    # cfdisk /dev/sda

    Note: This step is applicable only for the root partition: Using arrow keys select /dev/sda4

     

  7.  Using arrow keys select /dev/sda4

     

  8. Using tab key Or shift tab select [ Resize ] then enter

  9. Enter the free size available

    • For Example we selected 2M in the screenshot below:

     

  10. Using tab key select [ Write ]

     

  11. Type "yes" and press tab to [ Quit ]

     

To resize the two data partitions which are LVMs and the steps are different here versus root partition:

  1. Use "pvresize" to let LVM know that the physical disk size has changed:


  2. Run the below command
    pvresize /dev/sda4

     

  3. Extend the logical volumes with "lvextend" to use the new space:
    lvextend -l +100%FREE /dev/mapper/vg_0-data

     

  4. Finally, use "resize2fs" to extend the file system on the LV
    resize2fs /dev/mapper/vg_0-data

     

  5.  Run "df -h" command to verify the allocated space