Disk Management - Walkthrough

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Walkthrough: Disk Management

(Additional Information: appendices_help_book, self_monitoring_help_book, manuals)

Requirements

1) IBM InfoSphere™ Guardium® Collector Hardware or Software Appliance


2) IBM InfoSphere™ Guardium® Version: 8+
3) IBM InfoSphere™ Guardium® Account: admin

Assumptions

1) We will assume that the presentation: 4.7 – Advanced Monitoring has been reviewed
2) We will assume that the laboratory: 4.8 – Advanced Monitoring has been conducted
3) We will assume that the Buffer Usage Monitor Technical Documents have been reviewed
4) We will assume that the Guardium® Web Interface has been started and is working correctly
5) We will assume the use of Linux NET-SNMP libraries for SNMP Polling

Outline

In this technical document we will learn how to manage the Guardium® Collector
appliance disk usage (including database disk usage) from the following perspectives:

a) Viewing Disk Information


b) Interpreting Database Disk Information
c) Preventing Appliance Lockup: Nanny, CLI, Alerting [TBA]
d) Reducing Disk Usage: Archive and Purging [TBA]
e) Reducing Disk Usage: File Cleanup [TBA]
f) Simulating High Disk Usage: Virtual Machine [TBA]

Viewing Disk Information

There are a number of methods by which we can obtain information about disk capacity,
usage, and available space on the collector appliance. In this section we will examine each of
these methods:

■ CLI: Commands
■ SNMP: Polling
■ Reports: Buffer Usage Monitor, Enterprise Buffer Usage Monitor
■ GUI: Status Monitor

CLI Commands

To obtain database disk information via the appliance CLI, we can issue any of the following
commands:

■ CLI> support show db-status used <m | %>


■ CLI> support show db-status free <m | %>

Values are displayed either as: percentage (%) or megaBytes (m)


Tip: The above commands can be used on any type of appliance (collector, aggregator, central
manager, etc.); however, the means by which values are calculated is differs on some types of
appliances (please see the section: 'Interpreting Disk Information' of this document).

To obtain disk information via the CLI, we can use the Static Reports feature of the CLI diag
command:

■ CLI> diag
■ diag CLI> 2 System Static Reports

The report may take a few minutes to build; however, once it is ready, scroll partially down the
screen and we will see disk partition and size information:

Tip: The static reports option in the CLI diag utility is a great way to double-check the
partition layout on an appliance. In this manner you can double-check the values returned by
other disk information options (i.e. Buffer Usage Monitor, other CLI commands, and SNMP)
to ensure they are the values one would expect.
Alternatively, we can also obtain more granular disk and database information via the diag
utility using the following commands:

■ CLI> diag
■ diag CLI> 3 System Interactive Queries
■ diag CLI> 2 List Folder
■ diag CLI> select a folder from the list

Of the listed folders, /var/lib/mysql is perhaps one of the more interesting, as it lists the
database files (which are used in database usage/available calculations).
Similarly, the Summarize Folder option in System Interactive queries of diag will also yield a
summary of disk partition/size information as well as a summarized breakdown by major
folder

SNMP Polling

To obtain disk information via SNMP polling, we can make use of the UCD-SNMP-MIB
supported by the appliance. Disk information is stored under the following nodes:

Information Label OID Instance(s) Units


.1 (/ partition)
Disk Usage dskUsed 1.3.6.1.4.1.2021.9.1.8 Bytes
.2 (/var partition)
.1 (/ partition)
Disk Available dskAvail 1.3.6.1.4.1.2021.9.1.7 Bytes
.2 (/var partition)

Hence, as per the self-monitoring presentation, 4.7 – Advanced Monitoring, and laboratory, 4.8
– Advanced Monitoring, we can obtain disk information by polling any of the above nodes
or their instances using one of the following:

■ UCD-SNMP-MIB::dskUsed or 1.3.6.1.4.1.2021.9.1.8
■ UCD-SNMP-MIB::dskAvail or 1.3.6.1.4.1.2021.9.1.7
■ UCD-SNMP-MIB::dskUsed.1 or 1.3.6.1.4.1.2021.9.1.8.1
■ UCD-SNMP-MIB::dskUsed.2 or 1.3.6.1.4.1.2021.9.1.8.2
■ UCD-SNMP-MIB::dskAvail.1 or 1.3.6.1.4.1.2021.9.1.7.1
■ UCD-SNMP-MIB::dskAvail.2 or 1.3.6.1.4.1.2021.9.1.7.2

To poll all disk usage or available information at once (i.e. all instances), we can respectively
poll the dskUsed (8) or dskAvail (7) nodes directly via the NET-SNMP walk command:

■ snmpwalk -v 1 -c guardiumsnmp <appliance_ip> UCD-SNMP-MIB::dskUsed


■ snmpwalk -v 1 -c guardiumsnmp <appliance_ip> 1.3.6.1.4.1.2021.9.1.7
Tip: If there is no explicit /var partition, the corresponding instance node will be empty.

Alternatively, to obtain disk information about a single partition (node instance), we can utilize
the SNMP GET PDU of the NET-SNMP library:

■ snmpget -v 1 -c guardiumsnmp <appliance_ip> UCD-SNMP-MIB::dskUsed.2


■ snmpget -v 1 -c guardiumsnmp <appliance_ip> 1.3.6.1.4.1.2021.9.1.7.1

Tip: Ensure that appropriate libraries and the MIB files are installed in order to leverage
appliance SNMP polling capabilities.

Reports

As per the Buffer Usage Monitor technical document, disk information and database disk
information can be obtained directly from the report.

Guardium Monitor → Buffer Usage Monitor


Guardium Monitor → Enterprise Buffer Monitor Usage

Database (MySQL) disk usage – displayed as a percentage


Disk usage (/ and /var) – # of 1M Blocks (MegaByte – powers of 1024)

Note: Currently disk usage (/var and / partitions is actually disk available on the report).
Tip: If using a Central Manager appliance, use the Enterprise Buffer Usage monitor instead.

Status Monitor
The status monitor displays the available disk space in GigaBytes (GB), as well as used
database disk space as a percentage: System View → Current Status Monitor

Interpreting Database Disk Information

It is important to note that the way in which database disk usage is calculated varies depending
on the type of appliance (i.e. collector vs aggregator), as well as the method utilized to view
the information (i.e. CLI vs Buffer Usage Monitor vs Status Monitor). Let us now discuss how
database disk usage is calculated for each of the above scenarios.

For collector appliances, database disk usage is always calculated in the same manner,
regardless of the method (CLI, Buffer Usage Monitor, or Status Monitor):

% Used = ([Size – Available] / [current auto-extend max]) * 100

Size = Current Maximum Size of the MySQL Tablespace (ibdata1)


Available = Current Available Space in the MySQL Tablespace
Auto-extend Max = Potential Maximum space to which the Tablespace can automatically
grow based on disk size. This value is also automatically adjusted based
on the size of the /var partition; if the /var partition is unavailable, the /
(root) partition size is used instead. This value is always equal to 50% of
of the total # of blocks of /var or / partition (not free blocks).

For aggregator appliances, database disk usage is calculated in a similar manner, however, the
percentage of the /var or / partition that is utilized varies according to the method.

CLI> support show db-status used %

% Used = [Size] *100 / [Disk Total]

Size = Total space used by all MySQL database files (tablespace and logs)
Disk Total = 75% of /var partition. In this case, if there is no /var partition the / partition will
not be used instead.

Buffer Usage Monitor and Status Monitor

% Used = [Size] *100 / [Disk Total]

Size = Total space used by all MySQL database files (tablespace and logs)
Disk Total = 50% of /var partition. In this case, if there is no /var partition the / partition will
not be used instead.

Note: In all of the above cases, prior to percentage calculations, megaBytes are used.

You might also like