andrea.meyer

How To Extend/Resize the Hard Drive in Operations Manager 4.0 or later

Blog Post created by andrea.meyer on Dec 8, 2014

Summary

 

This document provides steps to extend the size of the Operations Manager virtual hard drive beyond the default 20GB allocated out-of-the-box.

 

Requirements

 

The steps outlined apply to Operations Manager version 4.0 or later.

 

Background

 

In certain cases it may be necessary to allocate additional disk space to the Operations Manager appliance, for example, if the size of the MySQL database grows and fills up all available disk space.

-       The default size of the appliance hard disk out-of-the-box is 20GB.

-       About 1.5GB are consumed by the Linux OS, applications and database on a default appliance with no configuration in place.

-       2GB are allocated as swap space.

This leaves approximately 16GB of free space on the appliance when it ships.  Depending on the size of the environment and the retention policy configured within the product, additional space may be needed after the appliance runs for a while as the database will naturally grow and consume additional space.

 

Procedure or Steps

 

If the Operations Manager appliance is running low on space, the following steps can be followed to add additional space and then extend the file system within the appliance to consume the newly added space.

  1. Shut down the appliance first!  Resizing the root disk on-the-fly is not recommended, nor is it supported.  The appliance can be safely powered down by logging into the appliance console directly, or via SSH, using the login ‘root’ with password ‘vmturbo’, and issuing the command ‘shutdown now’.
  2. Once the appliance is powered down, extend the attached hard disk to the desired size using the recommended, documented, methods for the hypervisor in use (VMWare vCenter, XenServer or RHEV).
    • IMPORTANT NOTE:  If you are using vCenter and cannot resize the disk because the option is grayed out, this likely means you have a snapshot on the Operations Manager appliance.  VMWare will not permit you to resize the VMDK if a snapshot is present, therefore you can either delete all snapshots for the VM, or, you can clone a new appliance from the existing one (which will have no snapshots) and extend/resize the disk on the clone and use this VM going forward.
  3. Power up the appliance again.  Once booted, log back into the console using the root account.  Confirm that the additional space is visible to the appliance by running ‘fdisk –l’.  The indicated capacity for device /dev/sda should now be greater than 20GB, for example a disk extended to 30GB will look like this:

    Disk /dev/sda: 32.2 GB, 32212254720 bytes
    255 heads, 63 sectors/track, 5221 cylinders, total 83886080 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x167942c0

    However, the root file system will still report its capacity as 20GB:
    Disk /dev/mapper/systemVG-LVRoot: 19.1 GB, 19113443328 bytes
    255 heads, 63 sectors/track, 2323 cylinders, total 37330944 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    We will now need to create a new partition utilizing the additional space, then resize the existing logical volume to take advantage of the additional space. We use the YaST utility to accomplish this in the following steps.
  4. Issue the command 'yast' on the appliance console.
  5. Using the tab key to navigate the windows, select System on the left pane, and Partitioner on the right pane and hit enter.
    Screenshot_6_4_13_2_13_PM.jpg
  6. Select 'Yes' at the warning and hit enter.
  7. Select Hard Disks on the left pane, hit enter, and then select Add Partition on the right pane.
    Screenshot_6_4_13_2_17_PM.jpg
  8. Select Primary Partition as the partition type and select Next.
    Screenshot_6_4_13_2_22_PM.jpg
  9. Select Maximum Size, then select Next
    Screenshot_6_4_13_2_23_PM.jpg
  10. Select Do not format partition, and assign the partition the file system ID 0x8E Linux LVM.  Select Do not mount partition, then select Finish
    Screenshot_6_4_13_2_26_PM.jpg
  11. We will now need to resize the system volume group to make use of the new partition we just created.  Once back in the main Partitioner window, select Volume Management on the left pane, select /dev/systemVG on the right pane, select Resize and hit enter.
    Screenshot_6_4_13_2_29_PM.jpg
  12. Select Add All in between the left and right panes and hit enter to move /dev/sda3 to the Selected Physical Volumes list.
    Screenshot_6_4_13_2_35_PM.jpg
  13. Select Finish and hit enter
    Screenshot_6_4_13_2_36_PM.jpg
  14. Once back to the main Partitioner window, select /dev/systemVG/LVRoot on the right pane, select Resize and hit enter.
    Screenshot_6_4_13_2_38_PM.jpg
  15. Select Maximum Size, select OK and hit enter to apply the setting.
    Screenshot_6_4_13_2_39_PM.jpg
  16. Select Next and hit enter.
    Screenshot_6_4_13_2_43_PM.jpg
  17. Select Finish and hit enter.
    Screenshot_6_4_13_2_44_PM.jpg
  18. Once the changes are completed, select Quit and hit enter to exit the YaST utility and be returned back to the command line.
  19. Reboot the appliance by issuing the command 'shutdown -r now' to ensure that all the above changes are applied.
  20. Run the command ‘df –lh’ to confirm that the root (‘/’) file system has now been extended to consume the additional space which was allocated to the appliance hard disk:
    Filesystem                   Size  Used Avail Use% Mounted on
    devtmpfs                     1.5G   32K  1.5G   1% /dev
    tmpfs                        1.5G     0  1.5G   0% /dev/shm
    tmpfs                        1.5G  1.7M  1.5G   1% /run
    /dev/mapper/systemVG-LVRoot   28G  1.4G   25G   6% /
    tmpfs                        1.5G     0  1.5G   0% /sys/fs/cgroup
    tmpfs                        1.5G  1.7M  1.5G   1% /var/lock
    tmpfs                        1.5G  1.7M  1.5G   1% /var/run
    /dev/sda1                    194M   32M  152M  18% /boot

Outcomes