Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
  Previous   Contents   Next 
   
 
Chapter 23

Monitoring and Error Reporting (Tasks)

When Solaris Volume Manager encounters a problem, such as being unable to write to a volume due to physical errors at the slice level, it changes the status of the volume so system administrators can stay informed. However, unless you regularly check the status in the Solaris Volume Manager graphical user interface through the Solaris Management Console, or by running the metastat command, you might not see these status changes in a timely fashion.

This chapter provides information about various monitoring tools available for Solaris Volume Manager, including the Solaris Volume Manager SNMP agent, which is a subagent of the Solstice Enterprise Agents™ monitoring software. In addition to configuring the Solaris Volume Manager SNMP agent to report SNMP traps, you can create a shell script to actively monitor many Solaris Volume Manager functions. Such a shell script can run as a cron job and be valuable in identifying issues before they become problems.

This is a list of the information in this chapter:

Solaris Volume Manager Monitoring and Reporting (Task Map)

The following task map identifies the procedures needed to manage Solaris Volume Manager error reporting.

Task

Description

Instructions

Set the mdmonitord daemon to periodically check for errors

Set the error-checking interval used by the mdmonitord daemon by editing the /etc/rc2.d/S95svm.sync file.

"Setting the mdmonitord Command for Periodic Error Checking"

Configure the Solaris Volume Manager SNMP agent

Edit the configuration files in the /etc/snmp/conf directory so Solaris Volume Manager will throw traps appropriately, to the correct system.

"Configuring the Solaris Volume Manager SNMP Agent"

Monitor Solaris Volume Manager with scripts run by the cron command

Create or adapt a script to check for errors, then run the script from the cron command.

"Monitoring Solaris Volume Manager with a cron Job"

Setting the mdmonitord Command for Periodic Error Checking

Solaris Volume Manager includes the /usr/sbin/mdmonitord daemon, which is a program that checks Solaris Volume Manager volumes for errors. By default, this program checks all volumes for errors only when an error is detected (for example, through a write error) on a volume. However, you can set this program to actively check for errors at an interval you specify.

How to Configure the mdmonitord Command for Periodic Error Checking

The /etc/rc2.d/S95svm.sync script starts the mdmonitord command at boot time. Edit the /etc/rc2.d/S95svm.sync script to add a time interval for periodic checking.

  1. Become superuser.

  2. Edit the /etc/rc2.d/S95svm.sync script and change the line that starts the mdmonitord command by adding a - t flag and the number of seconds between checks.

           if [ -x $MDMONITORD ]; then
                    $MDMONITORD -t 3600
                    error=$?
                    case $error in
                    0)      ;;
                    *)      echo "Could not start $MDMONITORD. Error $error."
                            ;;
                    esac
            fi

  3. Stop and restart the mdmonitord command to activate your changes.

    # /etc/rc2.d/S95svm.sync stop
    # /etc/rc2.d/S95svm.sync start

For more information, see mdmonitord(1M).

Solaris Volume Manager SNMP Agent Overview

The Solaris Volume Manager SNMP trap agent requires both the core packages SUNWlvmr and SUNWlvma and the Solstice Enterprise Agent packages. Those packages include the following:

  • SUNWmibii

  • SUNWsacom

  • SUNWsadmi

  • SUNWsasnm

  • SUNWsasnx

These packages are part of the Solaris operating environment and are normally installed by default unless the package selection was modified at install time or a minimal set of packages was installed. After you confirm that all five packages are available (by using the pkginfo pkgname command, as in pkginfo SUNWsasnx), you need to configure the Solaris Volume Manager SNMP agent, as described in the following section.

Configuring the Solaris Volume Manager SNMP Agent

The Solaris Volume Manager SNMP agent is not enabled by default. Use the following procedure to enable SNMP traps.

How to Configure the Solaris Volume Manager SNMP Agent

  1. Become superuser.

  2. Move the /etc/snmp/conf/mdlogd.rsrc- configuration file to /etc/snmp/conf/mdlogd.rsrc.
    # mv /etc/snmp/conf/mdlogd.rsrc- /etc/snmp/conf/mdlogd.rsrc

  3. Edit the /etc/snmp/conf/mdlogd.acl file to specify which hosts should receive SNMP traps. Look in the file for the following:
            trap = {
                 {
                    trap-community = SNMP-trap
                    hosts = corsair
                    {
                        enterprise = "Solaris Volume Manager"
                        trap-num = 1, 2, 3
                    }
    Change the line that containshosts = corsair to specify the host name that you want to receive Solaris Volume Manager SNMP traps. For example, to send SNMP traps to lexicon, you would edit the line to hosts = lexicon. If you want to include multiple hosts, provide a comma-delimited list of host names, as in hosts = lexicon, idiom.

  4. Also edit the /etc/snmp/conf/snmpdx.acl file to specify which hosts should receive the SNMP traps.

    Find the block that begins with trap = and add the same list of hosts that you added in the previous step. This section might be commented out with #'s. If so, you must remove the # at the beginning of the required lines in this section. Additional lines in the trap section are also commented out, but you can leave those lines alone or delete them for clarity. After uncommenting the required lines and updating the hosts line, this section could look like this:
    ###################
    # trap parameters #
    ###################
    
    trap = {
      {
            trap-community = SNMP-trap
            hosts =lexicon
            {
              enterprise = "sun"
              trap-num = 0, 1, 2-5, 6-16
            }
    #       {
    #         enterprise = "3Com"
    #         trap-num = 4
    #       }
    #       {
    #         enterprise = "snmp"
    #         trap-num = 0, 2, 5
    #       }
    #  }
    #  {
    #       trap-community = jerry-trap
    #       hosts = jerry, nanak, hubble
    #       {
    #         enterprise = "sun"
    #         trap-num = 1, 3
    #       }
    #       {
    #         enterprise = "snmp"
    #         trap-num = 1-3
    #       }
      }
    }


    Note - Make sure that you have the same number of opening and closing brackets in the /etc/snmp/conf/snmpdx.acl file.


  5. Add a new Solaris Volume Manager section to the /etc/snmp/conf/snmpdx.acl file, inside the section you that uncommented in the previous step.

            trap-community = SNMP-trap
            hosts = lexicon
            {
              enterprise = "sun"
              trap-num = 0, 1, 2-5, 6-16
            }
            {
                enterprise = "Solaris Volume Manager"
                trap-num = 1, 2, 3
            }
    Note that the added four lines are placed immediately after the enterprise = "sun" block.

  6. Append the following line to the /etc/snmp/conf/enterprises.oid file:

    "Solaris Volume Manager"                           "1.3.6.1.4.1.42.104"

  7. Stop and restart the Solstice Enterprise Agents server.

    # /etc/init.d/init.snmpdx stop
    # /etc/init.d/init.snmpdx start


Note - Whenever you upgrade your Solaris operating environment, you will probably need to edit the/etc/snmp/conf/enterprises.oid file and append the line in Step 6 again, then restart the Solaris Enterprise Agents server.


 
 
 
  Previous   Contents   Next