ITEM: Q9347L
Error notification for LVM_SA_PVMISS
How to setup error notification when a PV is declared missing
When a physical volume is declared missing, AIX logs an error,
LVM_SA_PVMISS, to the error log. However, unless the system
administrator is periodically checking the error log, this error can go
for some time without being detected. The situation where this will
occur most often is if the physical volume that has "disappeared" is
part of a mirrored volume group and there is still one good copy
available to the system. In this situation, the users will not notice
anything wrong because there is still one good copy of the data they
are accessing.
Many system administrators would like to be automatically notified of
this type of situation and it is possible to setup automatic error
notification when the LVM_SA_PVMISS error is generated. This fax
describes the steps to take to add error notification to the ODM and how
to setup a sample script to perform the type of error notification you
would like to have on your system. These steps, if implemented as
below, will send a message to the console and send mail to the root user
whenever the LVM_SA_PVMISS error is generated.
NOTE: You must be logged in as root to perform these steps.
1) Make a backup copy of the errnotify ODM file:
cd /etc/objrepos
cp errnotify errnotify.MMDDYY (where MMDDYY is the current date)
2) Create a file, /usr/lib/ras/pvmiss.add, that contains the following
stanza:
For AIX 3.2, use the following stanza:
errnotify:
en_pid = 0
en_name = ""
en_persistenceflg = 1
en_label = "LVM_SA_PVMISS" en_crcid = 0
en_class = ""
en_type = ""
en_alertflg = ""
en_resource = ""
en_rtype = ""
en_rclass = ""
en_method = "/usr/lib/ras/pvmiss.notify $1 $2 $3 $4 $5 $6 $7 $8 $9"
In AIX Version 4.1, there are a couple of changes to the Error Notify
Class:
- There is a new field added to the Class. This field, en_symptom,
is reserved for future use.
- The system's objects are specified by the Error ID instead of the
Error Label. The Error ID (en_crcid) must be specified in decimal.
The hexadecimal value of the error can be looked up in the
/usr/include/sys/errids.h file and then converted to decimal with
the bc command.
There is a migration method provided to automatically convert the
AIX Version 3.2 version of the Error Notify Class to the AIX Version
4.1 version if the customer uses the migration method to install
their machines.
For AIX 4.1, use the following stanza:
errnotify:
en_pid = 0
en_name = ""
en_persistenceflg = 1
en_label = ""
en_crcid = 3420574117
en_class = ""
en_type = ""
en_alertflg = ""
en_resource = ""
en_rtype = ""
en_rclass = ""
en_symptom = ""
en_method = "/usr/lib/ras/pvmiss.notify $1 $2 $3 $4 $5 $6 $7 $8 $9"
The Error ID (en_crcid) for this example was determined by using the
following steps:
\# grep LVM_SA_PVMISS /usr/include/sys/errids.h
--> \#define ERRID_LVM_SA_PVMISS 0xcbe1d1a5
\# echo "ibase=16\\nCBE1D1A5" | bc
--> 3420574117
NOTE: $1 - $9 are automatically expanded by the error notification
daemon as arguments to the notify method.
$1 The sequence number from the error log entry
$2 The error ID from the error log entry
$3 The error class from the error log entry
$4 The error type from the error log entry
$5 The alert flags value from the error log entry
$6 The resource name from the error log entry
$7 The resource type from the error log entry
$8 The resource class from the error log entry
$9 The error label from the error log entry.
3) Create the file /usr/lib/ras/pvmiss.notify with the following
contents:
\#!/bin/ksh
exec 3>/dev/console
print -u3 "\\007"
print -u3 - "-------------------------------------------------------------"
print -u3 "WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!"
print -u3 ""
print -u3 "Desc: PHYSICAL VOLUME DECLARED MISSING. PLEASE SEE ERRPT."
print -u3 ""
print -u3 "Error Label: $9"
print -u3 "Sequence number: $1"
print -u3 "Error ID: $2"
print -u3 "Error Class: $3"
print -u3 "Error Type: $4"
print -u3 "Resource Name: $6"
print -u3 "Resource Type: $7"
print -u3 "Resource Class: $8"
print -u3 - "-------------------------------------------------------------"
print -u3 "\\007"
mail -s "PHYSICAL VOLUME DECLARED MISSING" root \<\<-EOF
-----------------------------------------------------------------------
WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!
Desc: PHYSICAL VOLUME DECLARED MISSING. PLEASE SEE ERRPT.
Error Label: $9
Sequence number: $1
Error ID: $2
Error Class: $3
Error Type: $4
Resource Name: $6
Resource Type: $7
Resource Class: $8
-----------------------------------------------------------------------
EOF
4) Set the appropriate permissions on /usr/lib/ras/pvmiss.notify:
chmod 755 /usr/lib/ras/pvmiss.notify
5) Add the errnotify stanza for LVM_SA_PVMISS to the ODM:
odmadd /usr/lib/ras/pvmiss.add
The system should now be setup to run the /usr/lib/ras/pvmiss.notify
script whenever the LVM_SA_PVMISS error occurs. The pvmiss.notify
script sends a message to the console and also sends mail to root.
This script can be modified to take the specific actions the system
administrator would like to invoke when this error occurs. The
errnotify ODM file can also be further modified to respond to
additional error conditions. These modifications would be up to the
system administrator.
Support Line: Error notification for LVM_SA_PVMISS ITEM: Q9347L
Dated: February 1995 Category: N/A
This HTML file was generated 99/06/24~13:30:37
Comments or suggestions?
Contact us