Content-type: text/html Man page of volnotify


Section: Maintenance Commands (8)
Index Return to Main Contents


volnotify - Display Logical Storage Manager (LSM) configuration events  


/usr/sbin/volnotify [-icfdD] [-w wait-time] [-g diskgroup] [-n number] [-t timeout]



The following options are recognized: Display disk group import, deport, and disable events. Display disk group change events. Display plex, volume, and disk detach events. Display disk change events. Use a diagnostic-mode connection to vold. This allows the receipt of events when vold is running in disabled mode. Access to configuration information is limited when vold is running in disabled mode. For most applications, it is better to let volnotify print events only when vold is running in enabled mode. Display waiting events after wait_time seconds with no other events. Restrict displayed events to those in the indicated disk group. The disk group can be specified either as a disk group name or a disk group ID. Display the indicated number of vold events, then exit. Events that are not generated by vold (i.e., connect, disconnect and waiting events) do not count towards the number of counted events and will not cause an exit to occur. Display events for up to timeout seconds, then exit. The -n and -t options can be combined to specify a maximum number of events and a maximum timeout to wait before exiting.

If none of the -i, -c, -f, or -d options are specified, then default to printing all event types. If a disk group is specified with -g, display only disk group-related events.


The volnotify utility displays events related to disk and configuration changes, as managed by the Logical Storage Manager configuration daemon, vold. volnotify displays requested event types until killed by a signal, until a given number of events have been received, or until a given number of seconds have passed.

Each event is displayed as a single-line output record on the standard output. Displayed events are:

A connection was established with vold. This event type is displayed immediately after successful startup and initialization of volnotify. A connected event is also displayed if the connection to vold is lost, and then regained. A connected event displayed after a reconnection indicates that some events may have been lost. The connection to vold was lost. This normally results from vold being stopped (such as by voldctl stop) or killed by a signal. In response to a disconnection, volnotify displays a disconnected event and then waits until a reconnection succeeds. A connected event is then displayed.

A disconnected event is also printed if vold is not accessible at the time volnotify is started. In this case the disconnected event precedes the first connected event. Due to internal buffer overruns, or other possible problems, some events may have been lost. vold was changed to disabled mode. Most configuration information will be unavailable until vold is changed back to enabled mode. vold was changed to enabled mode. All configuration information should now be retrievable. vold disabled and vold enabled events can be retrieved only when using diagnostic-mode connections to the vold diagnostic portal. Use -D to obtain a regular diagnostic mode connection. If the -w option is specified, a waiting event is displayed after a defined period with no other events. Shell scripts can use waiting messages to collect groups of related, or at least nearly simultaneous, events. This can make shell scripts more efficient. This can also provide some scripts with better input since sets of detach events, in particular, often occur in groups that scripts can relate together. This is particularly important given that a typical shell script will block until volnotify produces output, thus requiring output to indicate the end of a possible sequence of related events. The disk group named groupname was imported. The disk group ID of the imported disk group is groupid. The named disk group was deported. The disk group ID of the imported disk group is groupid. The named disk group was disabled. A disabled disk group cannot be changed, and its records cannot be printed with volprint. However, some volumes in a disabled disk group may still be usable, although it is unlikely that the volumes will be usable after a system reboot. A disk group will be disabled as a result of excessive failures. A disk group will be disabled if the last disk in the disk group fails, or if errors occur when writing to all configuration and log copies in the disk group. A change was made to the configuration for the named disk group. The transaction ID for the update was groupid. The named plex, in the named disk group, was detached as a result of an I/O failure detected during normal volume I/O, or disabled as a result of a detected disk failure. The named volume, in the named disk group, was detached as a result of an I/O failure detected during normal volume I/O, or as a result of a detected disk failure. Usually, only plexes are detached as a result of volume I/O failure. However, if the last plex in a volume is disabled by a total disk failure, then the volume will be detached. The named disk, with device access name accessname and disk media name medianame was disconnected from the named disk group as a result of an apparent total disk failure. Total disk failures are checked for when plexes are detached by kernel failures, or, explicitly, by the voldisk check operation (see voldisk(8)). The disk header changed for the disk with a device access name of accessname. The disk group name and ID of the disk are groupname and groupid, respectively. The displayed groupname and groupid strings will be ``-'' or blank if the disk is not currently in an imported disk group.


The volnotify utility exits with a nonzero status if an error is encountered while communicating with vold. See volintro(8) for a list of standard exit codes.


The following example shell script will send mail to root for all detected plex, volume, and disk detaches:

checkdetach() {
     d=`volprint -AQdF '%name %nodarec' |
        awk '$2=="on" {print " " $1}'`
     p=`volprint -AQpe 'pl_kdetach || pl_nodarec' -F ' %name'`
     v=`volprint -AQvF ' %name' -e \
     "((any aslist.pl_kdetach==true) ||
        (any aslist.pl_nodarec)) &&
        !(any aslist.pl_stale==false)"`
     if [ ! -z "$d" ] || [ ! -z "$p" ] || [ ! -z "$v" ]
             cat <<EOF Failures have been detected by the Logical Storage Manager: EOF
            [ -z "$d" ] || echo "\\nfailed disks:\\n$d"
            [ -z "$p" ] || echo "\\nfailed plexes:\\n$p"
            [ -z "$v" ] || echo "\\nfailed volumes:\\n$v"
        ) | mailx -s "Logical Storage Manager failures" root
    fi } volnotify -f -w 30 | while read code more do
    case $code in
    waiting) checkdetach;;
    esac done



volintro(8), vold(8), voltrace(8)




This document was created by man2html, using the manual pages.
Time: 02:40:40 GMT, October 02, 2010