Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
Applies to SUSE Linux Enterprise Server 11 SP4 11 SP4

12 Storage Enclosure LED Utilities for MD Software RAIDs

Storage enclosure LED Monitoring utility (ledmon(8)) and LED Control (ledctl(8)) utility are Linux user space applications that use a broad range of interfaces and protocols to control storage enclosure LEDs. The primary usage is to visualize the status of Linux MD software RAID devices created with the mdadm utility. The ledmon daemon monitors the status of the drive array and updates the status of the drive LEDs. The ledctl utility allows you to set LED patterns for specified devices.

12.1 Supported LED Management Protocols

These LED utilities use the SGPIO (Serial General Purpose Input/Output) specification (Small Form Factor (SFF) 8485) and the SCSI Enclosure Services (SES) 2 protocol to control LEDs. They implement the International Blinking Pattern Interpretation (IBPI) patterns of the SFF-8489 specification for SGPIO. The IBPI defines how the SGPIO standards are interpreted as states for drives and slots on a backplane and how the backplane should visualize the states with LEDs.

Some storage enclosures do not adhere strictly to the SFF-8489 specification. An enclosure processor might accept an IBPI pattern but not blink the LEDs according to the SFF-8489 specification, or the processor might support only a limited number of the IBPI patterns.

LED management (AHCI) and SAF-TE protocols are not supported by the ledmon and ledctl utilities.

12.2 Supported Storage Enclosure Systems

The ledmon and ledctl applications have been verified to work with Intel storage controllers such as the Intel AHCI controller and Intel SAS controller. Beginning in SUSE Linux Enterprise Server 11 SP3, they also support PCIe-SSD (solid state disk) enclosure LEDs to control the storage enclosure status (OK, Fail, Rebuilding) LEDs of PCIe-SSD devices that are part of an MD software RAID volume. The applications might also work with the IBPI-compliant storage controllers of other vendors (especially SAS/SCSI controllers); however, other vendors’ controllers have not been tested.

12.3 Storage Enclosure LED Monitor Service (ledmon(8))

The ledmon application is a daemon process that constantly monitors the state of MD software RAID devices or the state of block devices in a storage enclosure or drive bay. Only a single instance of the daemon should be running at a time. The ledmon application is part of Intel Enclosure LED Utilities.

The state is visualized on LEDs associated with each slot in a storage array enclosure or a drive bay. The application monitors all software RAID devices and visualizes their state. It does not provide a way to monitor only selected software RAID volumes.

The ledmon application supports two types of LED systems: A two-LED system (Activity LED and Status LED) and a three-LED system (Activity LED, Locate LED, and Fail LED). This tool has the highest priority when accessing the LEDs.

12.3.1 Syntax

ledmon [options]

Issue the command as the root user or as user with root privileges.

12.3.2 Options

-c, --confg=path

Sets a path to local configuration file. If this option is specified, the global configuration file and user configuration file have no effect.

-l, --log=path

Sets a path to local log file. If this user-defined file is specified, the global log file /var/log/ledmon.log is not used.

-t, --interval=seconds

Sets the time interval between scans of sysfs. The value is given in seconds. The minimum is 5 seconds. The maximum is not specified.

<--quiet|--error|--warning|--info|--debug|--all>

Specifies the verbose level. The level options are specified in the order of no information to the most information. Use the --quiet option for no logging. Use the --all option to log everything. If you specify more then one verbose option, the last option in the command applies.

-h, --help

Prints the command information to the console, then exits.

-v, --version

Displays version of ledmon and information about the license, then exits.

12.3.3 Files

/var/log/ledmon.log

Global log file, used by ledmon application. To force logging to a user-defined file, use the -l option.

~/.ledctl

User configuration file, shared between ledmon and all ledctl application instances.

/etc/ledcfg.conf

Global configuration file, shared between ledmon and all ledctl application instances.

12.3.4 Known Issues

The ledmon daemon does not recognize the PFA (Predicted Failure Analysis) state from the SFF-8489 specification. Thus, the PFA pattern is not visualized.

12.4 Storage Enclosure LED Control Application (ledctl(8))

The Enclosure LED Application (ledctl(8)) is a user space application that controls LEDs associated with each slot in a storage enclosure or a drive bay. The ledctl application is a part of Intel Enclosure LED Utilities.

When you issue the command, the LEDs of the specified devices are set to a specified pattern and all other LEDs are turned off. User must have root privileges to use this application. Because the ledmon application has the highest priority when accessing LEDs, some patterns set by ledctl might have no effect if ledmon is running (except the Locate pattern).

The ledctl application supports two types of LED systems: A two-LED system (Activity LED and Status LED) and a three-LED system (Activity LED, Fail LED, and Locate LED).

12.4.1 Syntax

ledctl [options] pattern_name=list_of_devices

Issue the command as the root user or as user with root privileges.

12.4.2 Pattern Names

The ledctl application accepts the following names for pattern_name argument, according to the SFF-8489 specification.

locate

Turns on the Locate LED associated with the specified devices or empty slots. This state is used to identify a slot or drive.

locate_off

Turns off the Locate LED associated with the specified devices or empty slots.

normal

Turns off the Status LED, Failure LED, and Locate LED associated with the specified devices.

off

Turns off only the Status LED and Failure LED associated with the specified devices.

ica, degraded

Visualizes the In a Critical Array pattern.

rebuild, rebuild_p

Visualizes the Rebuild pattern. This supports both of the rebuild states for compatibility and legacy reasons.

ifa, failed_array

Visualizes the In a Failed Array pattern.

hotspare

Visualizes the Hotspare pattern.

pfa

Visualizes the Predicted Failure Analysis pattern.

failure, disk_failed

Visualizes the Failure pattern.

ses_abort

SES-2 R/R ABORT

ses_rebuild

SES-2 REBUILD/REMAP

ses_ifa

SES-2 IN FAILED ARRAY

ses_ica

SES-2 IN CRITICAL ARRAY

ses_cons_check

SES-2 CONS CHECK

ses_hotspare

SES-2 HOTSPARE

ses_rsvd_dev

SES-2 RSVD DEVICE

ses_ok

SES-2 OK

ses_ident

SES-2 IDENT

ses_rm

SES-2 REMOVE

ses_insert

SES-2 INSERT

ses_missing

SES-2 MISSING

ses_dnr

SES-2 DO NOT REMOVE

ses_active

SES-2 ACTIVE

ses_enable_bb

SES-2 ENABLE BYP B

ses_enable_ba

SES-2 ENABLE BYP A

ses_devoff

SES-2 DEVICE OFF

ses_fault

SES-2 FAULT

12.4.3 Pattern Translation

When a non-SES-2 pattern is sent to a device in an enclosure, the pattern is automatically translated to the SCSI Enclosure Services (SES) 2 pattern as shown in Table 12.1, “Translation between Non-SES-2 Patterns and SES-2 Patterns”.

Table 12.1: Translation between Non-SES-2 Patterns and SES-2 Patterns

Non-SES-2 Pattern

SES-2 Pattern

locate

ses_ident

locate_off

ses_ident

normal

ses_ok

off

ses_ok

ica

ses_ica

degraded

ses_ica

rebuild

ses_rebuild

rebuild_p

ses_rebuild

ifa

ses_ifa

failed_array

ses_ifa

hotspare

ses_hotspare

pfa

ses_rsvd_dev

failure

ses_fault

disk_failed

ses_fault

12.4.4 List of Devices

When you issue the ledctl command, the LEDs of the specified devices are set to the specified pattern and all other LEDs are turned off. The list of devices can be provided in one of two formats:

  • A list of devices separated by a comma and no spaces

  • A list in curly braces with devices separated by a space

If you specify multiple patterns in the same command, the device list for each pattern can use the same or different format. For examples that show the two list formats, see Section 12.4.7, “Examples”.

A device is a path to file in the /dev directory or in the /sys/block directory. The path can identify a block device, an MD software RAID device, or a container device. For a software RAID device or a container device, the reported LED state is set for all of the associated block devices.

The LEDs of devices listed in list_of_devices are set to the given pattern pattern_name and all other LEDs are turned off.

12.4.5 Options

-c, --confg=path

Sets a path to local configuration file. If this option is specified, the global configuration file and user configuration file have no effect.

-l, --log=path

Sets a path to local log file. If this user-defined file is specified, the global log file /var/log/ledmon.log is not used.

--quiet

Turns off all messages sent to stdout or stderr out. The messages are still logged to local file and the syslog facility.

-h, --help

Prints the command information to the console, then exits.

-v, --version

Displays version of ledctl and information about the license, then exits.

12.4.6 Files

/var/log/ledctl.log

Global log file, used by all instances of the ledctl application. To force logging to a user-defined file, use the -l option.

~/.ledctl

User configuration file, shared between ledmon and all ledctl application instances.

/etc/ledcfg.conf

Global configuration file, shared between ledmon and all ledctl application instances.

12.4.7 Examples

To locate a single block device:

ledctl locate=/dev/sda

To turn off the Locate LED off for a single block device:

ledctl locate_off=/dev/sda

To locate disks of an MD software RAID device and to set a rebuild pattern for two of its block devices at the same time:

ledctl locate=/dev/md127 rebuild={ /sys/block/sd[a-b] }

To turn off the Status LED and Failure LED for the specified devices:

ledctl off={ /dev/sda /dev/sdb }

To locate three block devices:

ledctl locate=/dev/sda,/dev/sdb,/dev/sdc

ledctl locate={ /dev/sda /dev/sdb /dev/sdc }

12.5 Enclosure LED Utilities Configuration File (ledctl.conf(5))

The ledctl.conf file is the configuration file for the Intel Enclosure LED Utilities. The utilities do not use a configuration file at the moment. The name and location of file have been reserved for feature improvements.

12.6 Additional Information

See the following resources for details about the LED patterns and monitoring tools:

Print this page