Installing from a multi-platform depot to an alternate root on HP-UX

Some depots from HP (notably the Java packages from http://software.hp.com/) contain filesets for multiple OS versions or even processor architectures. Installing them normally works fine, as the appropriate filesets are automatically selected and the others ignored. However, problems can arise when installing to an alternate root directory. The key is to pull only the filesets you need from the supplied depot and create a custom depot.

For instance, suppose we have a depot with one bundle:

[0]testserver:/var/adm/crash> swlist -d -l bundle -s /var/adm/crash/jdk15_15021_pa.depot
# Initializing...
# Contacting target "testserver"...
#
# Target:  testserver:/var/adm/crash/jdk15_15021_pa.depot
#

  Java15JDK     1.5.0.21.00    Java 1.5 JDK for HP-UX

And that bundle has two products:

[0]testserver:/var/adm/crash> swlist -d -l product -s /var/adm/crash/jdk15_15021_pa.depot
# Initializing...
# Contacting target "testserver"...
#
# Target:  testserver:/var/adm/crash/jdk15_15021_pa.depot
#

  Jdk15         1.5.0.21.00    Java 1.5 JDK
  Jre15         1.5.0.21.00    Java 1.5 JRE

And those products are made up of filesets; some for HP-UX 11.11, some for HP-UX 11.23, and some for HP-UX 11.31:

[0]testserver:/var/adm/crash> swlist -d -a software_spec -l fileset -s /var/adm/crash/jdk15_15021_pa.depot
# Initializing...
# Contacting target "testserver"...
#
# Target:  testserver:/var/adm/crash/jdk15_15021_pa.depot
#

# Jdk15                 Jdk15,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP
  Jdk15.JDK15           Jdk15.JDK15,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
  Jdk15.JDK15           Jdk15.JDK15,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.23_PA
  Jdk15.JDK15           Jdk15.JDK15,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.31_PA
  Jdk15.JDK15-COM       Jdk15.JDK15-COM,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
  Jdk15.JDK15-DEMO      Jdk15.JDK15-DEMO,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
  Jdk15.JDK15-PA20      Jdk15.JDK15-PA20,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
  Jdk15.JDK15-PA20W     Jdk15.JDK15-PA20W,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
# Jre15                 Jre15,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP
  Jre15.JRE15           Jre15.JRE15,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
  Jre15.JRE15           Jre15.JRE15,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.23_PA
  Jre15.JRE15           Jre15.JRE15,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.31_PA
  Jre15.JRE15-COM       Jre15.JRE15-COM,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
  Jre15.JRE15-COM-DOC   Jre15.JRE15-COM-DOC,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
  Jre15.JRE15-PA20      Jre15.JRE15-PA20,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
  Jre15.JRE15-PA20-HS   Jre15.JRE15-PA20-HS,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
  Jre15.JRE15-PA20W     Jre15.JRE15-PA20W,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
  Jre15.JRE15-PA20W-HS  Jre15.JRE15-PA20W-HS,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64

(hint, check the “fa=” part of the line for the intended OS version. “fa” means fileset architecture.)

We can construct a swcopy command to select and copy only the filesets we need to a new depot. The easiest way I’ve found for the Java depots is to first select the JRE version we need and then the JDK version as such:

[0]testserver:/var/adm/crash> sudo swcopy -p -s /var/adm/crash/jdk15_15021_pa.depot \
Jre15.JRE15,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64 \
Jdk15.JDK15,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64 \
@ /var/adm/crash/jdk15_15021_11.11

=======  01/26/11 10:56:33 CST  BEGIN swcopy SESSION (non-interactive)
         (jobid=testserver-0286)

       * Session started for user "root@testserver".

       * Beginning Selection
       * Target connection succeeded for
         "testserver:/var/adm/crash/jdk15_15021_11.11".
       * Source:                 /var/adm/crash/jdk15_15021_pa.depot
       * Targets:                testserver:/var/adm/crash/jdk15_15021_11.11
       * Software selections:
           + Java15JDK,r=1.5.0.21.00,a=HP-UX_B.11.00_32/64,v=HP
             Jdk15.JDK15,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
           + Jdk15.JDK15-COM,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
           + Jdk15.JDK15-PA20,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
           + Jdk15.JDK15-PA20W,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
             Jre15.JRE15,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
           + Jre15.JRE15-COM,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
           + Jre15.JRE15-COM-DOC,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
           + Jre15.JRE15-PA20,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
           + Jre15.JRE15-PA20-HS,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
           + Jre15.JRE15-PA20W,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
           + Jre15.JRE15-PA20W-HS,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
       * A "+" indicates an automatic selection due to dependency or
         the automatic selection of a patch or reference bundle.
       * Selection succeeded.


       * Beginning Analysis
       * Session selections have been saved in the file
         "/home/kris/.sw/sessions/swcopy.last".
       * The analysis phase succeeded for
         "testserver:/var/adm/crash/jdk15_15021_11.11".
       * Analysis succeeded.


NOTE:    More information may be found in the agent logfile using the
         command "swjob -a log testserver-0286 @
         testserver:/var/adm/crash/jdk15_15021_11.11".

=======  01/26/11 10:56:37 CST  END swcopy SESSION (non-interactive)
         (jobid=testserver-0286)

As we can see, just by specifying those two filesets the rest of the ones needed due to dependencies were automatically selected. We can go ahead and rerun that without the -p (preview) flag to create the new depot that contains only filesets for HP-UX 11.11.

[0]testserver:/var/adm/crash> sudo swcopy -s /var/adm/crash/jdk15_15021_pa.depot \
Jre15.JRE15,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64 \
Jdk15.JDK15,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64 \
@ /var/adm/crash/jdk15_15021_11.11

=======  01/26/11 11:06:53 CST  BEGIN swcopy SESSION (non-interactive)
         (jobid=testserver-0288)

       * Session started for user "root@testserver".

       * Beginning Selection
       * Target connection succeeded for
         "testserver:/var/adm/crash/jdk15_15021_11.11".
       * Source:                 /var/adm/crash/jdk15_15021_pa.depot
       * Targets:                testserver:/var/adm/crash/jdk15_15021_11.11
       * Software selections:
           + Java15JDK,r=1.5.0.21.00,a=HP-UX_B.11.00_32/64,v=HP
             Jdk15.JDK15,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
           + Jdk15.JDK15-COM,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
           + Jdk15.JDK15-PA20,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
           + Jdk15.JDK15-PA20W,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
             Jre15.JRE15,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
           + Jre15.JRE15-COM,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
           + Jre15.JRE15-COM-DOC,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
           + Jre15.JRE15-PA20,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
           + Jre15.JRE15-PA20-HS,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
           + Jre15.JRE15-PA20W,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
           + Jre15.JRE15-PA20W-HS,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
       * A "+" indicates an automatic selection due to dependency or
         the automatic selection of a patch or reference bundle.
       * Selection succeeded.


       * Beginning Analysis and Execution
       * Session selections have been saved in the file
         "/home/kris/.sw/sessions/swcopy.last".
       * The analysis phase succeeded for
         "testserver:/var/adm/crash/jdk15_15021_11.11".
       * The execution phase succeeded for
         "testserver:/var/adm/crash/jdk15_15021_11.11".
       * Analysis and Execution succeeded.


NOTE:    More information may be found in the agent logfile using the
         command "swjob -a log testserver-0288 @
         testserver:/var/adm/crash/jdk15_15021_11.11".

=======  01/26/11 11:07:13 CST  END swcopy SESSION (non-interactive)
         (jobid=testserver-0288)

[0]testserver:/var/adm/crash> swlist -d -l bundle -l product -l fileset -a software_spec -s /var/adm/crash/jdk15_15021_11.11
# Initializing...
# Contacting target "testserver"...
#
# Target:  testserver:/var/adm/crash/jdk15_15021_11.11
#

#
# Bundle(s):
#

# Java15JDK                             Java15JDK,r=1.5.0.21.00,a=HP-UX_B.11.00_32/64,v=HP
# Java15JDK.Jdk15                       Jdk15,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP
  Java15JDK.Jdk15.JDK15                 Jdk15.JDK15,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
  Java15JDK.Jdk15.JDK15-COM             Jdk15.JDK15-COM,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
  Java15JDK.Jdk15.JDK15-PA20            Jdk15.JDK15-PA20,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
  Java15JDK.Jdk15.JDK15-PA20W           Jdk15.JDK15-PA20W,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
# Java15JDK.Jre15                       Jre15,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP
  Java15JDK.Jre15.JRE15                 Jre15.JRE15,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
  Java15JDK.Jre15.JRE15-COM             Jre15.JRE15-COM,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
  Java15JDK.Jre15.JRE15-COM-DOC         Jre15.JRE15-COM-DOC,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
  Java15JDK.Jre15.JRE15-PA20            Jre15.JRE15-PA20,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
  Java15JDK.Jre15.JRE15-PA20-HS         Jre15.JRE15-PA20-HS,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
  Java15JDK.Jre15.JRE15-PA20W           Jre15.JRE15-PA20W,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
  Java15JDK.Jre15.JRE15-PA20W-HS        Jre15.JRE15-PA20W-HS,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64

At this point installing from the new depot to the alternate root directory will work just fine.

[0]testserver:/var/adm/crash> sudo swinstall -x mount_all_filesystems=false \
-s /var/adm/crash/jdk15_15021_11.11 Jdk15 Jre15 \
@ /apps/java/java150/jdk150_21

=======  01/26/11 12:01:20 CST  BEGIN swinstall SESSION
         (non-interactive) (jobid=testserver-0290)

       * Session started for user "root@testserver".

       * Beginning Selection
       * "testserver:/apps/java/java150/jdk150_21":  This target does not
         exist and will be created.
       * Source connection succeeded for
         "testserver:/var/adm/crash/jdk15_15021_11.11".
       * Source:                 /var/adm/crash/jdk15_15021_11.11
       * Targets:                testserver:/apps/java/java150/jdk150_21
       * Software selections:
           + Java15JDK,r=1.5.0.21.00,a=HP-UX_B.11.00_32/64,v=HP
             Jdk15.JDK15,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
             Jdk15.JDK15-COM,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
             Jdk15.JDK15-PA20,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
             Jdk15.JDK15-PA20W,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
             Jre15.JRE15,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
             Jre15.JRE15-COM,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
             Jre15.JRE15-COM-DOC,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
             Jre15.JRE15-PA20,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
             Jre15.JRE15-PA20-HS,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
             Jre15.JRE15-PA20W,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
             Jre15.JRE15-PA20W-HS,r=1.5.0.21.00,a=HP-UX_B.11.11_32/64,v=HP,fr=1.5.0.21.00,fa=HP-UX_B.11.11_32/64
       * A "+" indicates an automatic selection due to dependency or
         the automatic selection of a patch or reference bundle.
       * Selection succeeded.


       * Beginning Analysis and Execution
       * Session selections have been saved in the file
         "/home/kris/.sw/sessions/swinstall.last".
       * "testserver:/apps/java/java150/jdk150_21":  There will be no
         attempt to mount filesystems that appear in the filesystem
         table.
WARNING: "testserver:/apps/java/java150/jdk150_21":  1 postinstall or
         postremove scripts had warnings.
       * Analysis and Execution succeeded.


NOTE:    More information may be found in the agent logfile using the
         command "swjob -a log testserver-0290 @
         testserver:/apps/java/java150/jdk150_21".

=======  01/26/11 12:02:21 CST  END swinstall SESSION (non-interactive)
         (jobid=testserver-0290)

[0]testserver:/var/adm/crash> ll /apps/java/java150/jdk150_21
total 0
drwxr-xr-x   4 root       sys             96 Jan 26 12:01 .
drwxr-xr-x   6 root       sys             96 Jan 26 12:00 ..
dr-xr-xr-x   3 bin        bin             96 Jan 26 12:01 opt
drwxr-xr-x   3 root       sys             96 Jan 26 12:00 var

[0]testserver:/var/adm/crash> /apps/java/java150/jdk150_21/opt/java1.5/bin/java -version
java version "1.5.0.21"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0.21-_09_nov_2010_08_03)
Java HotSpot(TM) Server VM (build 1.5.0.21 jinteg:11.09.10-10:26 PA2.0 (aCC_AP), mixed mode) 
Advertisements

Viewing Symmetrix FA port flags

# symcfg -sid 3288 list -FA 8C -P 0

Symmetrix ID: 000190103288

           S Y M M E T R I X    F I B R E   D I R E C T O R S

    Dir    Port  WWN               VCM      Volume Set   Pnt to Pnt
                                   Enabled  Addressing

    FA-8C   0    5006048AD52FBE07  Yes      No           Yes

where sid is the serial number of the array in question, FA is the FA, and P is the FA port.

Note, Volume Set Addressing should be on for FA ports used by HP-UX servers.

Decoding device names from vmunix errors in syslog

Your HP-UX server has a failed local drive.  Luckily you are using MirrorDisk/UX, so the problem is more annoying than anything.  You find the error because of entries like the following in syslog.log:

Jan 13 02:50:22 hostname vmunix: SCSI: Async write error -- dev: b 31 0x022000, errno: 126, resid: 8192,
Jan 13 02:50:22 hostname vmunix:   blkno: 45699672, sectno: 91399344, offset: 3846791168, bcount: 8192.
Jan 13 02:50:22 hostname vmunix:   blkno: 45699128, sectno: 91398256, offset: 3846234112, bcount: 8192.
Jan 13 02:50:22 hostname vmunix: SCSI: Read error -- dev: b 31 0x022000, errno: 126, resid: 1024,
Jan 13 02:50:22 hostname vmunix: SCSI: Async write error -- dev: b 31 0x022000, errno: 126, resid: 8192,
Jan 13 02:50:22 hostname vmunix:   blkno: 8, sectno: 16, offset: 8192, bcount: 1024.
Jan 13 02:50:22 hostname vmunix: LVM: VG 64 0x000000: PVLink 31 0x022000 Failed! The PV is not accessible.
Jan 13 02:50:22 hostname vmunix:
Jan 13 02:50:22 hostname vmunix: LVM: VG 64 0x000000: PVLink 31 0x022000 Recovered.
Jan 13 03:06:32 hostname vmunix: LVM: Failed to automatically resync PV 1f022000  error: 5
Jan 13 03:14:07 hostname vmunix: LVM: Failed to automatically resync PV 1f022000  error: 5
Jan 13 03:26:57 hostname vmunix: LVM: Failed to automatically resync PV 1f022000  error: 5
Jan 13 03:32:45 hostname vmunix: LVM: Failed to automatically resync PV 1f022000  error: 5
Jan 13 03:50:19 hostname vmunix: LVM: Failed to automatically resync PV 1f022000  error: 5
Jan 13 03:55:19 hostname vmunix: LVM: Failed to automatically resync PV 1f022000  error: 5
Jan 13 03:59:27 hostname vmunix: LVM: Failed to automatically resync PV 1f022000  error: 5

ioscan is showing all hard drives as claimed and vgdisplay -v is showing all PVs as available. How can you tell which of your drives is dieing?

The syslog errors above are identifying the device throwing the errors in terms of major and minor numbers. First let’s look at the SCSI errors:

SCSI: Async write error -- dev: b 31 0x022000

This is saying that the device in question is a block device (dev: b 31 0x022000), the major number is decimal 31 (dev: b 31 0x022000), and the minor number is hexadecimal 022000 (dev: b 31 0x022000). By greping a long directory listing of /dev/dsk for that minor number we find:

$ ll /dev/dsk | grep 022000
brw-r-----   1 bin        sys         31 0x022000 Feb  9  2003 c2t2d0

The erroring disk is c2t2d0.

The LVM errors are very similar. For example:

LVM: Failed to automatically resync PV 1f022000

The main difference here is that the major and minor numbers are squished together and the whole thing is shown in hexadecimal (1F in hex is 31 in dec).

 

Update – March 2, 2011 at 09:31:

The LVM errors also identify the affected volume group via major and minor number. For example:

LVM: VG 64 0x000000: PVLink 31 0x022000 Failed! The PV is not accessible.

In this error, 64 (VG 64 0x000000) is the major number for volume groups and 0x000000 (VG 64 0x000000) is the minor number for vg00.