(Optional) Increasing available disk space

A standard installation of Turbonomic on a VM image includes a MariaDB database server for historical data. If you enable embedded reports, the platform also uses TimescaleDB Postgres database to manage the reports data. For various reasons, you might find that the default storage capacity for your database services is not sufficient. In that case, you need to increase the available storage capacity.

A common reason to increase this capacity is to accommodate estimated needs for embedded reports. The storage requirements for embedded reports can change over time as your environment changes, or as you increase the number of targets you configure your your Turbonomic installation. For information about estimating embedded reports requirements, see Embedded reports storage requirement estimates.

A summary of the steps you will perform is:

  • Add a new disk to the VM

  • Rescan the scsi devices

  • Create a new LVM partition

  • Create a physical volume (pv)

  • Add the pv to the existing volume group (vg)

  • Extend the logical volume (lv)

  • Extend the file system to use the new lv

  • To increase storage for embedded reports, increase the XFS quota

    To increase space for MariaDB, you do not need to perform this step.

Logical volume management for Turbonomic storage

The platform uses Logical Volume Management (LVM) to manage the VM disks. To increase database storage, you should add a new disk to the VM, and then use it to extend the LVM logical volume, /dev/turbo/var_lib_mysql. This logical volume serves both the historical database and the embedded reports database.

Logical Volume Management example

Increasing storage

To increase the storage space available to your databases:

  1. Add a new disk to the VM.

    Use the steps for your VM datacenter to add a new disk to the VM. Turbonomic installs as a VMware or a Hyper-V VM. Refer to the documentation for your hypervisor for the steps to add a new disk.

  2. Open an SSH terminal session to your Turbonomic instance.

    Log in with the System Administrator that you set up when you installed Turbonomic:

    • Username: turbo

    • Password: [your_private_password]

  3. Rescan the scsi devices.

    To make sure the new disk is available, rescan the scsi devices and then list your block devices.

    echo "- - -" > /sys/class/scsi_disk//0\:0\:0\:0/device/rescan

    To check for the new disk, run the command:

    lsblk

    The new disk should appear with a name similar to /dev/sdc. If you don't see the new disk, try this alternative to force a rescan:

    • Check the number of scsi host devices that are on your VM.

      ls /sys/class/scsi_host

      You should see a list of devices, such as host0, host1, host2... hostn

    • Scan each device.

      For each device run the command (where <hostn> is a numbered host device such as host0 or host1):

      echo "- - -" > /sys/class/scsi_host/host0/scan
    • List the block devices.

      Run lsblk again to list the block devices.
  4. Create a new LVM partition.

    Assuming the new disk is named /dev/sdc1, run the command:

    cfdisk /dev/sdc1

    Then run the operations:

    • new
    • primary
    • confirm size
    • change type to 8E
    • write
    • quit
  5. Create the Physical Volume (pv).

    Assuming the new disk is named /dev/sdc1, run the command:

    pvcreate /dev/sdc1
  6. Add the new pv to the existing Volume Group.

    Assuming the new disk is named /dev/sdc1, run the command:

    vgextend /dev/ibmturbo /dev/sdc1
  7. Extend the Logical Volume (lv) to use the free space in the new pv.

    First list the physical extents (PE) that are available. Run the command:

    vgdisplay

    The output is similar to the following example:

    Free  PE / Size       128000 / 500.00 GiB

    In this example, 128000 is the amount to extend the lv. For this example, run the command:

    lvextend -l +128000 /dev/ibmturbo/var_lib_mysql
  8. Extend the XFS file system to use all the current lv space.

    Before you extend the XFS, view the free disk space and record the number. To verify that you have increased the available space, you will compare this value to the free space after you have extended XFS. Run the command:

    df -h

    Then extend the XFS capacity:

    xfs_growfs /dev/ibmturbo/var_lib_mysql

    Then list the updated free disk space and compare it to your original number:

    df -h
  9. If you are increasing capacity for embedded reports, extend the XFS quota for the TimescaleDB.

    To increase space for MariaDB, you do not need to perform this step.

    To increase capacity for the Timescale DB, you need to increase the quota for that process by the amount you want. The quota name is Postgresql.

    For example, assume you added a 400 GB volume, and the current Postgresql quota is 400 GB. In that case, you could increase the quota to 800 GB. Following this example, run the command:

    xfs_quota -x -c 'limit -p bhard=800g Postgresql' /var/lib/dbs

    To see the current quotas set for /var/lib/dbs, run the command:

    xfs_quota -xc 'report -pbih' /var/lib/dbs