UnixPedia : HPUX / LINUX / SOLARIS: 2013

Monday, December 23, 2013

HPUX : VGEXPORT AND VGREMOVE

what is the difference between vgexport and vgremove

The man pages says:

With vgexport you remove all VG configuration from the system without touching the disks itself, this means all data will remain on the disks.
With vgremove you first have to remove the LVOLs, then the VG itself.
This will remove the VG definition from the system and the VG structure (including data) from the disks.

Tuesday, December 17, 2013

HPUX : VALIDATING THE ROOT DISK CONFIGURATION

[root@mickey:/.root]#
#-> efi_ls -d /dev/disk/disk5_p1
FileName                             Last Modified             Size
EFI/                                  10/15/2008                  0
startup.nsh                           11/ 7/2008                296

total space 523218944 bytes, free space 519446528 bytes

[root@mickey:/.root]#
#-> efi_ls -d  /dev/disk/disk22_p1
FileName                             Last Modified             Size
EFI/                                  12/11/2013                  0
startup.nsh                           12/11/2013                296

total space 523218944 bytes, free space 519446528 bytes

[root@mickey:/.root]#
#-> lifls -l /dev/disk/disk5_p2
volume ISL10 data size 7984 directory size 8 08/06/27 23:56:28
filename   type   start   size     implement  created
===============================================================
ISL        -12800 584     242      0          07/01/10 17:13:32
AUTO       -12289 832     1        0          07/01/10 17:13:32
HPUX       -12928 840     1024     0          07/01/10 17:13:32
PAD        -12290 1864    1468     0          07/01/10 17:13:33
LABEL      BIN    3336    8        0          08/11/07 09:40:17
[root@mickey:/.root]#
#-> lifls -l /dev/disk/disk22_p2
volume ISL10 data size 7984 directory size 8 13/01/22 03:23:09
filename   type   start   size     implement  created
===============================================================
ISL        -12800 584     242      0          13/01/22 03:23:09
AUTO       -12289 832     1        0          13/01/22 03:23:09
HPUX       -12928 840     1024     0          13/01/22 03:23:09
PAD        -12290 1864    1468     0          13/01/22 03:23:09
LABEL      BIN    3336    8        0          13/12/11 12:09:54
[root@mickey:/.root]#
#-> efi_cp -d /dev/disk/disk22_p1 -u /EFI/HPUX/AUTO /tmp/xx; cat /tmp/xx
boot vmunix
[root@mickey:/.root]#
#-> efi_cp -d /dev/disk/disk5_p1 -u /EFI/HPUX/AUTO /tmp/xx; cat /tmp/xx
boot vmunix -lq
[root@mickey:/.root]#
#-> lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
        /dev/disk/disk5_p2 -- Boot Disk
        /dev/disk/disk22_p2 -- Boot Disk
Boot: lvol1     on:     /dev/disk/disk5_p2
                        /dev/disk/disk22_p2
Root: lvol3     on:     /dev/disk/disk5_p2
                        /dev/disk/disk22_p2
Swap: lvol2     on:     /dev/disk/disk5_p2
                        /dev/disk/disk22_p2
Dump: lvol2     on:     /dev/disk/disk5_p2, 0

[root@mickey:/stand]#
#-> setboot -v
Primary bootpath : 0/4/1/0.0x5000c5000bbf5ae1.0x0 (/dev/rdisk/disk22)
HA Alternate bootpath : 0/4/1/0.0x5000c5000c9e1449.0x0 (/dev/rdisk/disk5)
Alternate bootpath : 0/4/2/0 (LAN Interface)

Autoboot is ON (enabled)
Hyperthreading : ON
               : ON (next boot)

TEST            CURRENT        DEFAULT
----            -------        -------
all             on             on
  SELFTESTS     on             on
    early_cpu   on             on
    late_cpu    on             on
  FASTBOOT      on             on
    Platform    on             on
    Full_memory on             on
  Memory_init   on             on
  IO_HW         on             on
  Chipset       on             on
[root@mickey:/stand]#
#-> cat /stand/bootconf
l  /dev/disk/disk22_p2
l  /dev/disk/disk5_p2
[root@mickey:/stand]#

Friday, December 13, 2013

HPUX : FIND OUT THE DISK WE WERE BOOTED FROM

Method to determine From which disks we were booted the system or system got booted.

[root@mickey:/.root]#
#-> uname -a
HP-UX mickey B.11.23 U ia64 2507335133 unlimited-user license
[root@mickey:/.root]#
#-> ll /dev/dsk/ | grep $(echo "bootdev/x"|adb /stand/vmunix /dev/kmem | awk '/0x/ {print substr($1,5)}')
brw-r-----   1 bin        sys         31 0x006002 Nov 23  2006 c0t6d0s2
cr--------   1 root       root       203 0x006002 Jan 24  2007 c0t6d0s2.pt
[root@mickey:/.root]#
#-> setboot -v
Primary bootpath : 0/0/0/2/0.6.0
HA Alternate bootpath : <none>
Alternate bootpath : 0/0/6/1/0.8.0

Autoboot is ON (enabled)
TEST            CURRENT        DEFAULT
----            -------        -------
all             partial        partial
  SELFTESTS     on             on
    early_cpu   on             on
    late_cpu    on             on
  FASTBOOT      on             on
    Platform    on             on
    Full_memory on             on
  Memory_init   on             on
  IO_HW         off            off
  Chipset       on             on
[root@mickey:/.root]#
#-> ioscan -fnH 0/0/0/2/0.6.0
Class     I  H/W Path       Driver S/W State   H/W Type     Description
=======================================================================
disk      1  0/0/0/2/0.6.0  sdisk CLAIMED     DEVICE       HP 73.4GMAX3073NC
                           /dev/dsk/c0t6d0     /dev/dsk/c0t6d0s2   /dev/rdsk/c0t6d0    /dev/rdsk/c0t6d0s2
                           /dev/dsk/c0t6d0s1   /dev/dsk/c0t6d0s3   /dev/rdsk/c0t6d0s1  /dev/rdsk/c0t6d0s3
[root@mickey:/.root]#
#->

Thursday, December 5, 2013

HPUX :HP-UX 11I V3 - "IO_REDIRECT_DSF" CANNOT PERFORM REDIRECTION ISSUE



Issue

# io_redirect_dsf -d /dev/disk/disk14 -n /dev/disk/disk28
/dev/disk/disk14 is being used. Cannot perform redirection.
Solution
/usr/sbin/io_redirect_dsf is actually a script that you can look at.
It is using iostat to check if the disk is still in use. If the disk is not in use, it uses rmsf and ioinit to reassign the device file.

#iostat

  device    bps    sps   msps

     disk14     17    2.2    1.0
If the disk shows up in iostat , there is no chance to redirect it. If tried to rmsf this device file, a device busy message is obtained. If a system is not patched well, disks will show up in iostat , even if they are not used.
There is also a bug in the older io_redirect_dsf scripts:

# what /usr/sbin/io_redirect_dsf
io_redirect_dsf:
 io_redirect_dsf $Date: 2008/10/21 01:56:37 $Revision: r11.31_hot/4 PATCH_11.31 (PHCO_38991)
If there is no patch PHCO_38991 or later installed, then install the patch. This patch only replaces the io_redirect_dsf script and can be installed on-line.
Other reasons could be that they are still activated in LVM or VxVM.
For LVM use pvchange -a n /dev/disk/disk14
For VxVM use vxprint to see if the disk is configured. Use vxdiskadm (a menue driven utility) to remove the disk.
Also try to kill the disk_em monitor if nothing else helps.


[root@EARTH:/.root]#
#->  io_redirect_dsf -d /dev/disk/disk4 -n /dev/disk/disk22
/dev/disk/disk4 is being used. Cannot perform redirection.
[root@EARTH:/.root]#

#-> ioscan -m lun | grep -i DG146BB976
disk      4  64000/0xfa00/0x0    esdisk  NO_HW       DEVICE       offline  HP      DG146BB976
disk      5  64000/0xfa00/0x1    esdisk  CLAIMED     DEVICE       online   HP      DG146BB976
disk     22  64000/0xfa00/0xf3   esdisk  CLAIMED     DEVICE       online   HP      DG146BB976
[root@EARTH:/var/adm/install-logs]#

#->  ioscan -m lun /dev/disk/disk22  <---- NDEW DISK PATH
Class     I  Lun H/W Path  Driver  S/W State   H/W Type     Health  Description
======================================================================
disk     22  64000/0xfa00/0xf3   esdisk  CLAIMED     DEVICE       online  HP      DG146BB976
             0/4/1/0.0x5000c5000bbf5ae1.0x0
                      /dev/disk/disk22      /dev/disk/disk22_p1   /dev/disk/disk22_p2   /dev/disk/disk22_p3   /dev/rdisk/disk22     /dev/rdisk/disk22_p1  /dev/rdisk/disk22_p2  /dev/rdisk/disk22_p3
[root@EARTH:/var/adm/install-logs]#

#-> ioscan -m lun /dev/disk/disk4   <---- OLD DISK PATH
Class     I  Lun H/W Path  Driver  S/W State   H/W Type     Health   Description
=======================================================================
disk      4  64000/0xfa00/0x0   esdisk  NO_HW       DEVICE       offline  HP      DG146BB976
             0/4/1/0.0x5000c5000c9cae01.0x0
                      /dev/disk/disk4      /dev/disk/disk4_p1   /dev/disk/disk4_p2   /dev/disk/disk4_p3   /dev/rdisk/dis

#-> pvdisplay /dev/disk/disk22
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/disk/disk22" belongs.
pvdisplay: Cannot display physical volume "/dev/disk/disk22".
[root@EARTH:/var/adm/install-logs]#
#-> pvdisplay /dev/disk/disk4
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/disk/disk4" belongs.
pvdisplay: Cannot display physical volume "/dev/disk/disk4".
[root@EARTH:/var/adm/install-logs]#

 

Wednesday, December 4, 2013

HPUX :ERROR: SWM TERMINATED WITH ERRORS WITHOUT REBOOTING THE SYSTEM

while installing the RMP patch bundle on the 11.31 versoin. Session via which
installatin is runing gor terminated , which left the patch in installed state.
it Seems that it has build the new kernal. but could not configure the patches
and left in installed state.


command used for RMP instalaltion :
update-ux -i -s ignite.fish.com:/var/opt/ignite/depots/GLOBAL/fishupd11-31-may2013
----

lrwxr-xr-x   1 root       root            15 Dec  4 13:49 system -> nextboot/system
-rw-r--r--   1 root       sys           6098 Jul 27 09:48 system.prev
-rwxr-xr-x   3 root       sys        148157736 Dec  4 13:06 vmunix
[root@donald:/stand]#


[root@donald:/var/adm/sw]#
#-> tail -f update-ux.log
         chmod 544 /usr/lbin/sw/post_execute/patch_cleanup
NOTE:    Running swm
NOTE:    Output is logged to '/var/opt/swm/swm.log'
         /opt/swm/transition/bin/swm oeupdate -s
         ignite.fish.com:/var/opt/ignite/depots/GLOBAL/fishupd11-31-may2013 -i
ERROR:   SWM terminated with errors without rebooting the system. See
         /var/opt/swm/swm.log for details.
NOTE:    One or more errors encountered. Take appropriate corrective action
         and re-run update-ux to complete the update.
=======  Wed Dec 4 13:31:50 EST 2013 END update-ux
[root@donald:/var/adm/sw]#

       * Installing fileset "vmProvider.VM-PROV-CORE,r=B.06.20" (1094 of 1094).
ERROR:   Exiting due to hang-up signal.

=======  12/04/13 14:14:34 EST  BEGIN Operating Environment Update (user=root)
         (jobid=000005)

       * Reading Source Depot(s)
       * Source depot:
         ignite.fish.com:/var/opt/ignite/depots/GLOBAL/fishupd11-31-may2013
       * Reading Target System's Installed Product Database (IPD)
       * Target IPD:   donald
       * Choosing Operating Environment
ERROR:   An attempt has been made to select software that does not include an
         Operating Environment (OE).  At least one OE must be selected for OE
         update operations.
       * Choosing Operating Environment failed with 1 error.
       * Choosing Operating Environment
ERROR:   An attempt has been made to select software that does not include an
         Operating Environment (OE).  At least one OE must be selected for OE
       

         HP reccommeded to run :
         #swlist -l fileset -a state |grep -i installed |wc -l
         1064
         #swconfig \*
         #after this it put all the patches in configure state.
         #swlist -l fileset -a state |grep -i installed |wc -l
         0
         #for verification server has been rebooted. And it came clean.

Sunday, December 1, 2013

HPUX :HPUX -IS /STAND/VMUNIX.PREV (PREVIOUS KERNAL)

---- Main Menu ---------------------------------------------------------------
     Command                           Description
     -------                           -----------
     BOot [PRI|HAA|ALT|<path>]         Boot from specified path
     PAth [PRI|HAA|ALT] [<path>]       Display or modify a path
     SEArch [ALL|<cell>|<path>]        Search for boot devices
     ScRoll [ON|OFF]                   Display or change scrolling capability

     COnfiguration menu                Displays or sets boot values
     INformation menu                  Displays hardware information
     SERvice menu                      Displays service commands

     DIsplay                           Redisplay the current menu
     HElp [<menu>|<command>]           Display help for menu or command
     REBOOT                            Restart Partition
     RECONFIGRESET                     Reset to allow Reconfig Complex Profile
----
Main Menu: Enter command or menu > boot
     Primary Boot Path:  2/0/1/0/0.2
 Do you wish to stop at the ISL prompt prior to booting? (y/n) >> y
Initializing boot Device.
Boot IO Dependent Code (IODC) Revision 4
Boot Path Initialized.
HARD Booted.
ISL Revision A.00.43  Apr 12, 2000
ISL>
ISL> hpux -is /stand/vmunix
   Not an isl command or utility.
   Not an isl command or utility.
ISL> hpux -is /stand/vmunix.prev
Boot
: disk(2/0/1/0/0.2.0.0.0.0.0;0)/stand/vmunix.prev
11173888 + 2859008 + 10322208 start 0x20ab68

SCSI ULTRA320 0/3/2/0 INSTANCE 6:EXTERNAL SCSI BUS RESET


After SCSI PCI card replacement on the server Micky, below messages were seen in the syslog and dmesg : and disk were seen in no_hw
status.
Below step were tried to fix the issue :
1-Connectoin between server and DAS were checked : OK
2-Server were reboot to see the disk status : Still disk are missing and no_hw status in ioscan.
3-MSA30 was reboot (make sure it not shared among other servers.) : still did not resovle the issue.
Issue found :
After card replacement the path of SCSI card has been change, to resolve the issue it has been reset to old one.
dmesg/syslog
Dec  1 04:16:24 Mickey vmunix:    errors.  The error entries will be lost until the cause of
Dec  1 04:16:24 Mickey vmunix:    the excessive error logging is corrected.
Dec  1 04:16:24 Mickey vmunix:    Use oserrlogd(1M) man page for further details.
Dec  1 04:16:27 Mickey vmunix: SCSI Ultra320 0/3/2/1 instance 7:      External SCSI bus reset detected.       Condition cleared, no intervention required.
Dec  1 04:16:37 Mickey vmunix: SCSI Ultra320 0/3/2/0 instance 6:      IO Type : MPT Domain Validation IO has timed-out.       Target ID: 0, LUN ID: 0.       Inquiry Command - CDB: 12 00 00 00 40 00
Dec  1 04:16:38 Mickey vmunix: SCSI Ultra320 0/3/2/0 instance 6:      External SCSI bus reset detected.       Condition cleared, no intervention required.
Dec  1 04:16:27 Mickey vmunix: SCSI Ultra320 0/3/2/1 instance 7:      External SCSI bus reset detected.       Condition cleared, no intervention required.
Dec  1 04:17:13 Mickey vmunix: SCSI Ultra320 0/3/2/1 instance 7:      External SCSI bus reset detected.       Condition cleared, no intervention required.
Dec  1 04:17:29 Mickey vmunix: DIAGNOSTIC SYSTEM WARNING:
Dec  1 04:17:29 Mickey vmunix:    The diagnostic logging facility is no longer receiving excessive
Dec  1 04:17:27 Mickey vmunix: SCSI Ultra320 0/3/2/0 instance 6:      External SCSI bus reset detected.       Condition cleared, no intervention required.
Dec  1 04:17:29 Mickey vmunix:    errors .  21  error entries were lost.
Dec  1 04:17:29 Mickey vmunix: SCSI Ultra320 0/3/2/1 instance 7:      External SCSI bus reset detected.       Condition cleared, no intervention required.
Dec  1 04:17:39 Mickey vmunix:    The diagnostic logging facility has started receiving excessive
Dec  1 04:17:39 Mickey vmunix:    errors.  The error entries will be lost until the cause of
Dec  1 04:17:39 Mickey vmunix:    the excessive error logging is corrected.
Dec  1 04:17:39 Mickey vmunix: DIAGNOSTIC SYSTEM WARNING:
Dec  1 04:17:39 Mickey vmunix:    Use oserrlogd(1M) man page for further details.
Dec  1 04:17:39 Mickey vmunix: SCSI Ultra320 0/3/2/0 instance 6:      External SCSI bus reset detected.       Condition cleared, no intervention required.
Dec  1 04:17:41 Mickey vmunix: SCSI Ultra320 0/3/2/1 instance 7:      External SCSI bus reset detected.       Condition cleared, no intervention required.
Dec  1 04:17:53 Mickey vmunix: SCSI Ultra320 0/3/2/1 instance 7:      External SCSI bus reset detected.       Condition cleared, no intervention required.
Dec  1 04:18:37 Mickey vmunix: SCSI Ultra320 0/3/2/1 instance 7:      External SCSI bus reset detected.       Condition cleared, no intervention required.

HPUX : INTERRUPTING THE BOOT PROCESS

If you’ve suspected something in the boot process and don’t want to continue with it, or it just seems to hang, you can press CTRL + / and it just stops and will give you a login prompt.
, but now I wanted to emphasize that it is also working for other services. Note that in the boot phase CTRL + C is ineffective, but CTRL + / will send a SIGQUIT signal and so the system won’t proceed. You will be presented with a prompt, and any init scripts after that phase won’t be started, so you might not get all the services running on the system.

Sunday, November 24, 2013

HPUX : THE AUTO PATH COMMAND-LINE INTERFACE (CLI)

HP Auto Path provides automatic input/output (I/O) path failover, failback,
recovery, and load balancing for host systems configured with multiple host adapters and connections to a disk array.Auto Path provides enhanced data availability with these features:
• automatic path failover to an alternate path
• automatic path recovery after failed path is serviced 
• automatic failback when a path recovers from failure
• dynamic load-balancing over multiple paths
• command-line user interface (CLI) for Auto Path management
• ability to reestablish previous load-balancing policy after reboot


autopath - Secure Path Management Utility.

 DESCRIPTION
      Secure Path product provides the interface to manage and retrieve
      information about the devices that belong to the supported HP
      StorageWorks Active-Active disk arrays.

      autopath is a management utility that provides a command line user
      interface to monitor and manage devices, storage systems, and paths to
      units that belong to the supported HP StorageWorks Active-Active disk
      arrays. Autopath interacts with the 'hpap' Secure Path driver for
      performing these tasks.

      The autopath utility:

      + displays device information including the alternative paths to end
      LUN

      + includes or excludes supported active-active disk arrays from Secure
      Path control

      + includes or excludes supported active-active disk array types from
      Secure Path control

      + adds or deletes devices from Secure Path control

      + restores device paths after their recovery from failures

      + sets options such as load balancing, preferred path and infinite
      retry for supported devices.

      + preserves the array and lun specific persistance settings across
      reboots

      + discovers devices added online

      + sets read optimization for EVA-AA disk array devices. EVA-AA arrays
      include EVA 3000/4000/5000/6000/8000/4100/6100/8100/4400 disk arrays.

      + enables or disables proactive path monitoring for faster recognition
      of failed and recovered paths

      + creates and manages virtual device special files for all Secure Path
      devies
 




through the CLI
The HP Auto Path software performs dynamic load balancing of data flow
through multiple paths. It detects multiple paths to each logical device and
distributes the data load among the paths for optimum performance.
The user interface lets a system administrator define load balancing policies
and preferred paths, and view device path information. Auto Path manages
paths according to the balancing policy, ensuring that no single path is a
performance bottleneck.
The Auto Path command-line interface (CLI) can be used only on hosts
connected to devices with the Auto Path driver installed. The commands
supported by this interface and the syntax are described here:
autopath display
autopath help
autopath recover
autopath retrieve
autopath set_lbpolicy
autopath set_prefpath
 Syntax autopath set_lbpolicy policy path
policy The load balance policy name:
NLB no load balance policy
RR round robin
SQL shortest queue length
SST shortest service time
path The physical device path.
Description The autopath set_lbpolicy command sets the load balance policy for the
specified device path.
Example HP $ autopath set_lbpolicy RR /dev/dsk/c0t0d0
autopath: Load Balance Policy set successfully for /dev/dsk/c0t0d0

HPUX : STRIPED MIRRORS ARE NOT SUPPORTED.


Error :
#-> lvextend -m 1 /dev/vg_jjclglp1/oradat01  /dev/dsk/c82t0d0 /dev/dsk/c82t0d1 /dev/dsk/c82t0d2
Striped mirrors are not supported. To enable mirroring options (-m, -M, -c),
do not specify the striping options (-i, -I) when creating logical volumes.

Extent-based  mirroring in stripe with 10024K size in hpux 11.11 is not supported.
To copy the data  , create a new filesystem and copy the data  offline and start the DB on new file system
 But in case 11.31v
"The following feature is new with the HP-UX 11i v3 release of MirrorDisk/UX:
â ¢ Striped Mirrors: In previous releases, LVM supported a limited extent-based striped mirror
functionality, as described in the lvcreate(1M) manpage. This type of striped mirror required
the stripe size to be a multiple of extent size. In HP-UX 11i v3, LVM supports mirroring of
striped logical volumes with the entire range of stripe sizes. The lvcreate command
options -m and -i/-I can be used together, and the -m option of the lvextend and
lvreduce commands can be applied to striped logical volumes."

 

Friday, November 22, 2013

HPUX : SAS PHYSICAL DISK REPLACEMENT PROCEDURE WITH LVM MIRRORING


SAS HP-UX 11.23 LVM Disk Replacement Procedure

SAS Physical Disk Replacement Procedure With LVM Mirroring

HP-UX 11.23 Only

Send feedback to This technical work is published by Jay Duffield (jay.duffield@hp.com)

Overview

SAS controllers use a different addressing scheme than parallel SCSI like U320 or SCSI-2.  Where SCSI ID and therefore disk slot numbers were important, SAS uses a unique address of the disks themselves to identify the disks as part of a LUN (logical unit) or an HP-UX special device file like /dev/dsk/c0t0d0.  You can take a disk out of one slot (referred to as bays) and put it in a different slot or bay.  The controller finds it and presents the disk to the O/S with the same special device file.  This does complicate the procedure needed for replacing a failed disk.

When a disk fails, and a new disk is put into the same bay that the failed disk came out of, the SAS controller knows it is a different disk by its SAS address.  The O/S driver assigns the next available target for the hardware path (viewed with ioscan) and special device file if insf -e is executed.  The sasmgr(1M) command must be used with the replace_tgt command to replace the special device file used by LVM with the hardware path to the new disk.

Running sasmgr replace_tgt is very simple as long as there are no I/Os pending or no I/O drivers that have the special device file open for reading/writing.  This is rarely the case however, and LVM will continue to try to access that special device file waiting for the failed disk to return.

You must stop all access to the special device file first by executing pvchange to deactivate that physical volume.  Once the new disk is inserted, create the EFI partitions, and vgcfgrestore the LVM information onto section 2.  As an alternative, you can unmirror the volume group and vgreduce the bad disk from the volume group.  Following is the procedure using pvchange and vgcfgrestore to replace a mirrored boot disk in vg00.  It is noted which steps are not necessary for non-bootable volume groups.

 # ioscan -kfnH 0/4/1/0

Class        I  H/W Path        Driver    S/W State   H/W Type     Description

===============================================================================

escsi_ctlr   0  0/4/1/0         sasd      CLAIMED     INTERFACE    HP  PCI/PCI-X SAS MPT Adapter

                               /dev/sasd0

ext_bus      1  0/4/1/0.0.0     sasd_vbus CLAIMED     INTERFACE    SAS Device Interface

target       2  0/4/1/0.0.0.2   tgt       CLAIMED     DEVICE

disk         3  0/4/1/0.0.0.2.0   sdisk     CLAIMED     DEVICE       HP      DG072A9BB7

                               /dev/dsk/c1t2d0   /dev/rdsk/c1t2d0

target       3  0/4/1/0.0.0.3   tgt       CLAIMED     DEVICE

disk         4  0/4/1/0.0.0.3.0   sdisk     CLAIMED     DEVICE       HP      DG072A9BB7

                               /dev/dsk/c1t3d0   /dev/rdsk/c1t3d0

target       4  0/4/1/0.0.0.4   tgt       CLAIMED     DEVICE

disk         5  0/4/1/0.0.0.4.0   sdisk     CLAIMED     DEVICE       HP      DG036A8B5B

                               /dev/dsk/c1t4d0     /dev/rdsk/c1t4d0

                               /dev/dsk/c1t4d0s1   /dev/rdsk/c1t4d0s1

                               /dev/dsk/c1t4d0s2   /dev/rdsk/c1t4d0s2

                               /dev/dsk/c1t4d0s3   /dev/rdsk/c1t4d0s3

target       5  0/4/1/0.0.0.7   tgt       CLAIMED     DEVICE

disk         8  0/4/1/0.0.0.7.0   sdisk     CLAIMED     DEVICE       HP      DG036A9BB6

                               /dev/dsk/c1t7d0     /dev/rdsk/c1t7d0

                               /dev/dsk/c1t7d0s1   /dev/rdsk/c1t7d0s1

                               /dev/dsk/c1t7d0s2   /dev/rdsk/c1t7d0s2

                               /dev/dsk/c1t7d0s3   /dev/rdsk/c1t7d0s3

target       6  0/4/1/0.0.0.10  tgt       CLAIMED     DEVICE

disk        11  0/4/1/0.0.0.10.0  sdisk     CLAIMED     DEVICE       HP      IR Volume

                               /dev/dsk/c1t10d0   /dev/rdsk/c1t10d0

 # sasmgr get_info -D /dev/sasd0 -q lun=all -q lun_locate

/dev/rdsk/c1t2d0          0/4/1/0.0.0.2.0           1     3     OFF

/dev/rdsk/c1t3d0          0/4/1/0.0.0.3.0           1     4     OFF

/dev/rdsk/c1t4d0          0/4/1/0.0.0.4.0           1     5     OFF

/dev/rdsk/c1t7d0          0/4/1/0.0.0.7.0           1     8     OFF

RAID VOL ID is 4 :

/dev/rdsk/c1t10d0         0/4/1/0.0.0.10.0

Physical disks in volume are :

        1     1     OFF           HP            DG072A9BB7         HPD0

        1     2     OFF           HP            DG072A9BB7         HPD0

Turn on the disks locator LED to ensure the correct disk is removed.

# sasmgr set_attr -D /dev/sasd0 -q lun=/dev/rdsk/c1t4d0 -q locate_led=on

Locate LED set to ON.

# sasmgr get_info -D /dev/sasd0 -q lun=all -q lun_locate

/dev/rdsk/c1t2d0          0/4/1/0.0.0.2.0           1     3     OFF

/dev/rdsk/c1t3d0          0/4/1/0.0.0.3.0           1     4     OFF

/dev/rdsk/c1t4d0          0/4/1/0.0.0.4.0           1     5     ON

/dev/rdsk/c1t7d0          0/4/1/0.0.0.7.0           1     8     OFF

RAID VOL ID is 4 :

/dev/rdsk/c1t10d0         0/4/1/0.0.0.10.0

Physical disks in volume are :

        1     1     OFF           HP            DG072A9BB7         HPD0

        1     2     OFF           HP            DG072A9BB7         HPD0

 

Procedure

At this point the disk in bay 5 fails or is pulled out of the server to simulate a failure.  A new disk is inserted in the same bay.  The server should not be rebooted or taken down between the time the disk fails and the time the new disk is inserted.  If the server has been rebooted for any reason, check to be sure you have at least revision B.11.23.03.01 of the SerialSCSI-00 fileset. Click here to jump to the bottom of this document for more information.

1.  Identify the location of the failed disk highlighted in red, the mirror of that disk in blue, and the new replacement disk is in dark red.  Note below that NO_HW indicates a disk that is no longer accessible to the O/S.

# ioscan -fnH 0/4/1/0

Class        I  H/W Path        Driver    S/W State   H/W Type     Description

===============================================================================

escsi_ctlr   0  0/4/1/0         sasd      CLAIMED     INTERFACE    HP  PCI/PCI-X SAS MPT Adapter

                               /dev/sasd0

ext_bus      1  0/4/1/0.0.0     sasd_vbus CLAIMED     INTERFACE    SAS Device Interface

target       2  0/4/1/0.0.0.2   tgt       CLAIMED     DEVICE

disk         3  0/4/1/0.0.0.2.0   sdisk     CLAIMED     DEVICE       HP      DG072A9BB7

                               /dev/dsk/c1t2d0   /dev/rdsk/c1t2d0

target       3  0/4/1/0.0.0.3   tgt       CLAIMED     DEVICE

disk         4  0/4/1/0.0.0.3.0   sdisk     CLAIMED     DEVICE       HP      DG072A9BB7

                               /dev/dsk/c1t3d0   /dev/rdsk/c1t3d0

target       4  0/4/1/0.0.0.4   tgt       NO_HW       DEVICE

disk         5  0/4/1/0.0.0.4.0   sdisk     NO_HW       DEVICE       HP      DG036A8B5B

                               /dev/dsk/c1t4d0     /dev/rdsk/c1t4d0

                               /dev/dsk/c1t4d0s1   /dev/rdsk/c1t4d0s1

                               /dev/dsk/c1t4d0s2   /dev/rdsk/c1t4d0s2

                               /dev/dsk/c1t4d0s3   /dev/rdsk/c1t4d0s3

target       5  0/4/1/0.0.0.7   tgt       CLAIMED     DEVICE

disk         8  0/4/1/0.0.0.7.0   sdisk     CLAIMED     DEVICE       HP      DG036A9BB6

                               /dev/dsk/c1t7d0     /dev/rdsk/c1t7d0

                               /dev/dsk/c1t7d0s1   /dev/rdsk/c1t7d0s1

                               /dev/dsk/c1t7d0s2   /dev/rdsk/c1t7d0s2

                               /dev/dsk/c1t7d0s3   /dev/rdsk/c1t7d0s3

target       6  0/4/1/0.0.0.10  tgt       CLAIMED     DEVICE

disk        11  0/4/1/0.0.0.10.0  sdisk     CLAIMED     DEVICE       HP      IR Volume

                               /dev/dsk/c1t10d0   /dev/rdsk/c1t10d0

target       7  0/4/1/0.0.0.11  tgt       CLAIMED     DEVICE

disk        12  0/4/1/0.0.0.11.0  sdisk     CLAIMED     DEVICE       HP      DG036A8B5B

# sasmgr get_info -D /dev/sasd0 -q lun=all -q lun_locate

/dev/rdsk/c1t2d0          0/4/1/0.0.0.2.0           1     3     OFF

/dev/rdsk/c1t3d0          0/4/1/0.0.0.3.0           1     4     OFF

/dev/rdsk/c1t7d0          0/4/1/0.0.0.7.0           1     8     OFF

RAID VOL ID is 4 :

/dev/rdsk/c1t10d0         0/4/1/0.0.0.10.0

Physical disks in volume are :

        1     1     OFF           HP            DG072A9BB7         HPD0

        1     2     OFF           HP            DG072A9BB7         HPD0

# sasmgr get_info -D /dev/sasd0 -q raid

Thu Dec 14 14:59:28 2006

---------- PHYSICAL DRIVES ----------

LUN dsf              SAS Address          Enclosure    Bay      Size(MB)

/dev/rdsk/c1t2d0     0x500000e012691cb2     1            3      70007

/dev/rdsk/c1t3d0     0x500000e0126926d2     1            4      70007

/dev/rdsk/c1t7d0     0x500000e01263fcc2     1            8      34732

---------- LOGICAL DRIVE 4 ----------

Raid Level                                         : RAID 1

Volume sas address                                 : 0x611d224fa01c82

Device Special File                                : /dev/rdsk/c1t10d0

Raid State                                         : OPTIMAL

Raid Status Flag                                   : ENABLED

Raid Size                                          : 34000

Rebuild Rate                                       : 20.00 %

Rebuild Progress                                   : 100.00 %

Participating Physical Drive(s) :

SAS Address         Enc   Bay   Size(MB)      Type            State

0x500000e01268e312   1     1    70007         SECONDARY       ONLINE

0x500000e012691ee2   1     2    70007         PRIMARY         ONLINE

# sasmgr replace_tgt -D /dev/sasd0 -q old_dev=/dev/dsk/c1t4d0 -q new_tgt_hwpath=0/4/1/0.0.0.11.0

WARNING: This is a DESTRUCTIVE operation.

This might result in failure of current I/O requests.

Do you want to continue ?(y/n) [n]...

ERROR: Unable to replace target: Device busy

2.  The reason this command fails is because LVM is still trying to access /dev/dsk/c1t4d0s2, since it is part of vg00.

# vgdisplay -v vg00

--- Volume groups ---

VG Name                     /dev/vg00

VG Write Access             read/write

VG Status                   available

Max LV                      255

Cur LV                      8

Open LV                     8

Max PV                      16

Cur PV                      2

Act PV                      2

Max PE per PV               4238

VGDA                        4

PE Size (Mbytes)            8

Total PE                    8456

Alloc PE                    6008

Free PE                     2448

Total PVG                   0

Total Spare PVs             0

Total Spare PVs in use      0

   --- Logical volumes ---

   LV Name                     /dev/vg00/lvol1

   LV Status                   available/stale

   LV Size (Mbytes)            304

   Current LE                  38

   Allocated PE                76

   Used PV                     2

   LV Name                     /dev/vg00/lvol2

   LV Status                   available/syncd

   LV Size (Mbytes)            4096

   Current LE                  512

   Allocated PE                1024

   Used PV                     2

   LV Name                     /dev/vg00/lvol3

   LV Status                   available/stale

   LV Size (Mbytes)            560

   Current LE                  70

   Allocated PE                140

   Used PV                     2

   LV Name                     /dev/vg00/lvol4

   LV Status                   available/stale

   LV Size (Mbytes)            200

   Current LE                  25

   Allocated PE                50

   Used PV                     2

   LV Name                     /dev/vg00/lvol5

   LV Status                   available/stale

   LV Size (Mbytes)            24

   Current LE                  3

   Allocated PE                6

   Used PV                     2

   LV Name                     /dev/vg00/lvol6

   LV Status                   available/stale

   LV Size (Mbytes)            6568

   Current LE                  821

   Allocated PE                1642

   Used PV                     2

   LV Name                     /dev/vg00/lvol7

   LV Status                   available/stale

   LV Size (Mbytes)            6584

   Current LE                  823

   Allocated PE                1646

   Used PV                     2

   LV Name                     /dev/vg00/lvol8

   LV Status                   available/stale

   LV Size (Mbytes)            5696

   Current LE                  712

   Allocated PE                1424

   Used PV                     2

   --- Physical volumes ---

   PV Name                     /dev/dsk/c1t7d0s2

   PV Status                   available

   Total PE                    4228

   Free PE                     1224

   Autoswitch                  On

   PV Name                     /dev/dsk/c1t4d0s2

   PV Status                   unavailable

   Total PE                    4228

   Free PE                     1224

   Autoswitch                  On

3.  The "PV Status" shows it as "unavailable," but LVM is still waiting for that disk to return.  Therefore, it is necessary to stop access to the special device file before the sasmgr replace_tgt command will work.  First pvchange -a n /dev/dsk/c1t4d0s2 to deactivate the physical volume.  Then use the sasmgr replace_tgt command to switch the special device file to the new disk.

# pvchange -a n /dev/dsk/c1t4d0s2

Warning: Detaching a physical volume reduces the availability of data

within the logical volumes residing on that disk.

Prior to detaching a physical volume or the last available path to it,

verify that there are alternate copies of the data

available on other disks in the volume group.

If necessary, use pvchange(1M) to reverse this operation.

Physical volume "/dev/dsk/c1t4d0s2" has been successfully changed.

# vgdisplay -v vg00

--- Volume groups ---

VG Name                     /dev/vg00

VG Write Access             read/write

VG Status                   available

Max LV                      255

Cur LV                      8

Open LV                     8

Max PV                      16

Cur PV                      2

Act PV                      1

Max PE per PV               4238

VGDA                        2

PE Size (Mbytes)            8

Total PE                    4228

Alloc PE                    3004

Free PE                     1224

Total PVG                   0

Total Spare PVs             0

Total Spare PVs in use      0

   --- Logical volumes ---

   LV Name                     /dev/vg00/lvol1

   LV Status                   available/syncd

   LV Size (Mbytes)            304

   Current LE                  38

   Allocated PE                38

   Used PV                     2

   LV Name                     /dev/vg00/lvol2

   LV Status                   available/syncd

   LV Size (Mbytes)            4096

   Current LE                  512

   Allocated PE                512

   Used PV                     2

   LV Name                     /dev/vg00/lvol3

   LV Status                   available/syncd

   LV Size (Mbytes)            560

   Current LE                  70

   Allocated PE                70

   Used PV                     2

   LV Name                     /dev/vg00/lvol4

   LV Status                   available/syncd

   LV Size (Mbytes)            200

   Current LE                  25

   Allocated PE                25

   Used PV                     2

   LV Name                     /dev/vg00/lvol5

   LV Status                   available/syncd

   LV Size (Mbytes)            24

   Current LE                  3

   Allocated PE                3

   Used PV                     2

   LV Name                     /dev/vg00/lvol6

   LV Status                   available/syncd

   LV Size (Mbytes)            6568

   Current LE                  821

   Allocated PE                821

   Used PV                     2

   LV Name                     /dev/vg00/lvol7

   LV Status                   available/syncd

   LV Size (Mbytes)            6584

   Current LE                  823

   Allocated PE                823

   Used PV                     2

   LV Name                     /dev/vg00/lvol8

   LV Status                   available/syncd

   LV Size (Mbytes)            5696

   Current LE                  712

   Allocated PE                712

   Used PV                     2

   --- Physical volumes ---

   PV Name                     /dev/dsk/c1t7d0s2

   PV Status                   available

   Total PE                    4228

   Free PE                     1224

   Autoswitch                  On

 

   PV Name                     /dev/dsk/c1t4d0s2

   PV Status                   unavailable

   Total PE                    4228

   Free PE                     1224

   Autoswitch                  On

 

4.  Now /dev/dsk/c1t4d0 is free, and we can assign the new disk to special device file /dev/dsk/c1t4d0.  Be sure you do not use the "-k" option to ioscan, so that the hardware is rescanned for changes.

# sasmgr replace_tgt -D /dev/sasd0 -q old_dev=/dev/dsk/c1t4d0 -q new_tgt_hwpath=0/4/1/0.0.0.11.0

WARNING: This is a DESTRUCTIVE operation.

This might result in failure of current I/O requests.

Do you want to continue ?(y/n) [n]...

LUN has been replaced with new Target.

# ioscan -fnC disk

Class        I  H/W Path        Driver         S/W State   H/W Type     Description

====================================================================================

disk         0  0/0/2/1.0.16.0.0  sdisk          CLAIMED     DEVICE       TEAC    DV-28E-N

                               /dev/dsk/c0t0d0   /dev/rdsk/c0t0d0

disk         3  0/4/1/0.0.0.2.0   sdisk          CLAIMED     DEVICE       HP      DG072A9BB7

                               /dev/dsk/c1t2d0   /dev/rdsk/c1t2d0

disk         4  0/4/1/0.0.0.3.0   sdisk          CLAIMED     DEVICE       HP      DG072A9BB7

                               /dev/dsk/c1t3d0   /dev/rdsk/c1t3d0

disk         5  0/4/1/0.0.0.4.0   sdisk          CLAIMED     DEVICE       HP      DG036A8B5B

                               /dev/dsk/c1t4d0     /dev/rdsk/c1t4d0

                               /dev/dsk/c1t4d0s1   /dev/rdsk/c1t4d0s1

                               /dev/dsk/c1t4d0s2   /dev/rdsk/c1t4d0s2

                               /dev/dsk/c1t4d0s3   /dev/rdsk/c1t4d0s3

disk         8  0/4/1/0.0.0.7.0   sdisk          CLAIMED     DEVICE       HP      DG036A9BB6

                               /dev/dsk/c1t7d0     /dev/rdsk/c1t7d0

                               /dev/dsk/c1t7d0s1   /dev/rdsk/c1t7d0s1

                               /dev/dsk/c1t7d0s2   /dev/rdsk/c1t7d0s2

                               /dev/dsk/c1t7d0s3   /dev/rdsk/c1t7d0s3

disk        11  0/4/1/0.0.0.10.0  sdisk          CLAIMED     DEVICE       HP      IR Volume

                               /dev/dsk/c1t10d0   /dev/rdsk/c1t10d0

disk        12  0/4/1/0.0.0.11.0  sdisk          NO_HW       DEVICE       HP      DG036A8B5B

Notice that the S/W State of the H/W Path 0/4/1/0.0.0.4.0 changed to CLAIMED, and the S/W State of the H/W Path 0/4/1/0.0.0.11.0 changed to NO_H/W. The hardware path 0/4/1/0.0.0.11.0 will remain in the ioscan output until the next reboot.

5.  Now you must restore LVM mirroring to the new disk.  If this is a bootable volume group, it involves creating the EFI partitions and formatting partition 1; changing the autoboot file if this was the mirror (not necessary for the primary disk); and, restoring the LVM information to section 2 of the disk.

If your volume group is NOT a bootable volume group like vg00, skip to step 12.

Note: Only necessary for vg00.  This confirms that no EFI partitions exist on the new disk.

# idisk /dev/rdsk/c1t4d0

idisk version: 1.31

idisk: Primary partition information not valid.

Run idisk with -r option to restore.

6.  Note: Only necessary for vg00.  Create a template file of the EFI partition parameters.

# cat <<EOF > /tmp/partitionfile

> 3

> EFI 500MB

> HPUX 100%

> HPSP 400MB

> EOF

7.  Note: Only necessary for vg00.  Create the EFI partitions using the template.

# idisk -wf /tmp/partitionfile /dev/rdsk/c1t4d0

idisk version: 1.31

********************** WARNING ***********************

If you continue you may destroy all data on this disk.

Do you wish to continue(yes/no)? yes

EFI Primary Header:

        Signature                 = EFI PART

        Revision                  = 0x10000

        HeaderSize                = 0x5c

        HeaderCRC32               = 0x39aa64b6

        MyLbaLo                   = 0x1

        AlternateLbaLo            = 0x43d671f

        FirstUsableLbaLo          = 0x22

        LastUsableLbaLo           = 0x43d66fc

        Disk GUID                 = dfdf740c-8bb1-11db-8001-d6217b60e588

        PartitionEntryLbaLo       = 0x2

        NumberOfPartitionEntries  = 0xc

        SizeOfPartitionEntry      = 0x80

        PartitionEntryArrayCRC32  = 0x60502b29

  Primary Partition Table (in 512 byte blocks):

    Partition 1 (EFI):

        Partition Type GUID       = c12a7328-f81f-11d2-ba4b-00a0c93ec93b

        Unique Partition GUID     = dfdf75a6-8bb1-11db-8002-d6217b60e588

        Starting Lba              = 0x22

        Ending Lba                = 0xfa021

    Partition 2 (HP-UX):

        Partition Type GUID       = 75894c1e-3aeb-11d3-b7c1-7b03a0000000

        Unique Partition GUID     = dfdf75ec-8bb1-11db-8003-d6217b60e588

        Starting Lba              = 0xfa022

        Ending Lba                = 0x430e6fb

    Partition 3 (HPSP):

        Partition Type GUID       = e2a1e728-32e3-11d6-a682-7b03a0000000

        Unique Partition GUID     = dfdf7614-8bb1-11db-8004-d6217b60e588

        Starting Lba              = 0x430e6fc

        Ending Lba                = 0x43d66fb

EFI Alternate Header:

        Signature                 = EFI PART

        Revision                  = 0x10000

        HeaderSize                = 0x5c

        HeaderCRC32               = 0xedbd53ee

        MyLbaLo                   = 0x43d671f

        AlternateLbaLo            = 0x1

        FirstUsableLbaLo          = 0x22

        LastUsableLbaLo           = 0x43d66fc

        Disk GUID                 = dfdf740c-8bb1-11db-8001-d6217b60e588

        PartitionEntryLbaLo       = 0x43d66fe

        NumberOfPartitionEntries  = 0xc

        SizeOfPartitionEntry      = 0x80

        PartitionEntryArrayCRC32  = 0x60502b29

  Alternate Partition Table (in 512 byte blocks):

    Partition 1 (EFI):

        Partition Type GUID       = c12a7328-f81f-11d2-ba4b-00a0c93ec93b

        Unique Partition GUID     = dfdf75a6-8bb1-11db-8002-d6217b60e588

        Starting Lba              = 0x22

        Ending Lba                = 0xfa021

    Partition 2 (HP-UX):

        Partition Type GUID       = 75894c1e-3aeb-11d3-b7c1-7b03a0000000

        Unique Partition GUID     = dfdf75ec-8bb1-11db-8003-d6217b60e588

        Starting Lba              = 0xfa022

        Ending Lba                = 0x430e6fb

    Partition 3 (HPSP):

        Partition Type GUID       = e2a1e728-32e3-11d6-a682-7b03a0000000

        Unique Partition GUID     = dfdf7614-8bb1-11db-8004-d6217b60e588

        Starting Lba              = 0x430e6fc

        Ending Lba                = 0x43d66fb

Legacy MBR (MBR Signatures in little endian):

   MBR Signature = 0x8a73dfdf

Protective MBR

8.  Now the EFI partition is displayed when the ioscan -e option is used. If the system was rebooted before running the replace_tgt command, it will also be necessary to run "insf -eC disk" to create the special device files for the additional disk sections.

# ioscan -fneC disk

Class        I  H/W Path        Driver         S/W State   H/W Type     Description

====================================================================================

disk         0  0/0/2/1.0.16.0.0  sdisk          CLAIMED     DEVICE       TEAC    DV-28E-N

                               /dev/dsk/c0t0d0   /dev/rdsk/c0t0d0

disk         3  0/4/1/0.0.0.2.0   sdisk          CLAIMED     DEVICE       HP      DG072A9BB7

                               /dev/dsk/c1t2d0   /dev/rdsk/c1t2d0

        Acpi(HWP0002,PNP0A03,400)/Pci(1|0)/Sas(Addr500000E012691CB2, Lun0)

disk         4  0/4/1/0.0.0.3.0   sdisk          CLAIMED     DEVICE       HP      DG072A9BB7

                               /dev/dsk/c1t3d0   /dev/rdsk/c1t3d0

        Acpi(HWP0002,PNP0A03,400)/Pci(1|0)/Sas(Addr500000E0126926D2, Lun0)

disk         5  0/4/1/0.0.0.4.0   sdisk          CLAIMED     DEVICE       HP      DG036A8B5B

                               /dev/dsk/c1t4d0     /dev/rdsk/c1t4d0

                               /dev/dsk/c1t4d0s1   /dev/rdsk/c1t4d0s1

                               /dev/dsk/c1t4d0s2   /dev/rdsk/c1t4d0s2

                               /dev/dsk/c1t4d0s3   /dev/rdsk/c1t4d0s3

        Acpi(HWP0002,PNP0A03,400)/Pci(1|0)/Sas(Addr500000E011A8D382, Lun0)/HD(Part1,SigDFDF75A6-8BB1-11DB-8002-D6217B60E588)/\EFI\HPUX\HPUX.EFI

disk         8  0/4/1/0.0.0.7.0   sdisk          CLAIMED     DEVICE       HP      DG036A9BB6

                               /dev/dsk/c1t7d0     /dev/rdsk/c1t7d0

                               /dev/dsk/c1t7d0s1   /dev/rdsk/c1t7d0s1

                               /dev/dsk/c1t7d0s2   /dev/rdsk/c1t7d0s2

                               /dev/dsk/c1t7d0s3   /dev/rdsk/c1t7d0s3

        Acpi(HWP0002,PNP0A03,400)/Pci(1|0)/Sas(Addr500000E01263FCC2, Lun0)/HD(Part1,SigCFBF8B12-42CC-11DB-8002-D6217B60E588)/\EFI\HPUX\HPUX.EFI

disk        11  0/4/1/0.0.0.10.0  sdisk          CLAIMED     DEVICE       HP      IR Volume

                               /dev/dsk/c1t10d0   /dev/rdsk/c1t10d0

        Acpi(HWP0002,PNP0A03,400)/Pci(1|0)/Scsi(Pun4, Lun0)

disk        12  0/4/1/0.0.0.11.0  sdisk          NO_HW       DEVICE       HP      DG036A8B5B

9.  Note: Only necessary for vg00.  Format EFI partition #1.

# efi_fsinit -d /dev/rdsk/c1t4d0s1

10. Note: Only necessary for vg00.  Copy the bootable files to the EFI partition.

# mkboot -e -l /dev/rdsk/c1t4d0

11. Note: Only necessary for the mirrored disk of vg00 (listed as PV2 in lvdisplay -v output).  Create and copy the autofile to the EFI partition.

# echo "boot vmunix -lq" > /tmp/auto.lq

# efi_cp -d /dev/rdsk/c1t4d0s1 /tmp/auto.lq /EFI/HPUX/AUTO

# efi_ls -d /dev/rdsk/c1t4d0s1 /EFI/HPUX

FileName                             Last Modified             Size

.                                     12/14/2006                  0

..                                    12/14/2006                  0

HPUX.EFI                              12/14/2006             644703

NBP.EFI                               12/14/2006              24576

AUTO                                  12/14/2006                 16

total space 523251712 bytes, free space 519856128 bytes

12. Restore the LVM information to section 2 of the disk with vgcfgrestore.  Section 2 is only used for EFI partitioned disks.  If this is a non-bootable, data volume group disk, the special device file to use would simply be /dev/dsk/c1t4d0.

# vgcfgrestore -n vg00 /dev/rdsk/c1t4d0s2

Volume Group configuration has been restored to /dev/rdsk/c1t4d0s2

# pvchange -a y /dev/dsk/c1t4d0s2

Physical volume "/dev/dsk/c1t4d0s2" has been successfully changed.

13. Wait a couple minutes to give /dev/vg00/lvol1 a chance to sync. (reimage the mirror), and vgdisplay now shows that volume as "available/syncd" while the rest are still "available/stale" until they have been sync'd.  You must wait until all logical volumes are sync'd before attempting to reboot to test the mirror boot disk.

# vgdisplay -v vg00

--- Volume groups ---

VG Name                     /dev/vg00

VG Write Access             read/write

VG Status                   available

Max LV                      255

Cur LV                      8

Open LV                     8

Max PV                      16

Cur PV                      2

Act PV                      2

Max PE per PV               4238

VGDA                        4

PE Size (Mbytes)            8

Total PE                    8456

Alloc PE                    3004

Free PE                     5452

Total PVG                   0

Total Spare PVs             0

Total Spare PVs in use      0

   --- Logical volumes ---

   LV Name                     /dev/vg00/lvol1

   LV Status                   available/syncd

   LV Size (Mbytes)            304

   Current LE                  38

   Allocated PE                38

   Used PV                     2

   LV Name                     /dev/vg00/lvol2

   LV Status                   available/stale

   LV Size (Mbytes)            4096

   Current LE                  512

 Allocated PE                  512

   Used PV                     2

   LV Name                     /dev/vg00/lvol3

   LV Status                   available/stale

   LV Size (Mbytes)            560

   Current LE                  70

 Allocated PE                  70

   Used PV                     2

   LV Name                     /dev/vg00/lvol4

   LV Status                   available/stale

   LV Size (Mbytes)            200

   Current LE                  25

   Allocated PE                25

   Used PV                     2

   LV Name                     /dev/vg00/lvol5

   LV Status                   available/stale

   LV Size (Mbytes)            24

   Current LE                  3

   Allocated PE                3

   Used PV                     2

   LV Name                     /dev/vg00/lvol6

   LV Status                   available/stale

   LV Size (Mbytes)            6568

   Current LE                  821

   Allocated PE                821

   Used PV                     2

   LV Name                     /dev/vg00/lvol7

   LV Status                   available/stale

   LV Size (Mbytes)            6584

   Current LE                  823

   Allocated PE                823

   Used PV                     2

   LV Name                     /dev/vg00/lvol8

   LV Status                   available/stale

   LV Size (Mbytes)            5696

   Current LE                  712

   Allocated PE                712

   Used PV                     2

   --- Physical volumes ---

   PV Name                     /dev/dsk/c1t7d0s2

   PV Status                   available

   Total PE                    4228

   Free PE                     1224

   Autoswitch                  On

   PV Name                     /dev/dsk/c1t4d0s2

   PV Status                   available

   Total PE                    4228

   Free PE                     1224

   Autoswitch                  On

14. Note: Only necessary for vg00.  Rewrite the boot information to the EFI Boot Menu so the system will be able to boot from the new path.

# setboot

Primary bootpath : 0/4/1/0.0.0.7.0

HA Alternate bootpath : <none>

Alternate bootpath : <none>

Autoboot is ON (enabled)

# setboot -h 0/4/1/0.0.0.4.0

# setboot

Primary bootpath : 0/4/1/0.0.0.7.0

HA Alternate bootpath : 0/4/1/0.0.0.4.0

Alternate bootpath : 0/0/2/0

Autoboot is ON (enabled)

15. Note: Only necessary for vg00.  After all mirrored volumes are sync'd, reboot from the new disk to make sure everything works.  Interrupt the auto boot process and select the Alternate path from the EFI Boot Menu.

# cd /

# shutdown -r 0

SHUTDOWN PROGRAM

12/14/06 16:48:59 EST

Broadcast Message from LOGIN (console) Thu Dec 14 16:48:59...

SYSTEM BEING BROUGHT DOWN NOW ! ! !

.

.

.

Loading.: HP-UX HA Alternate Boot: 0/4/1/0.0.0.4.0

Starting: HP-UX HA Alternate Boot: 0/4/1/0.0.0.4.0

(C) Copyright 1999-2006 Hewlett-Packard Development Company, L.P.

All rights reserved

HP-UX Boot Loader for IPF  --  Revision 2.028

Press Any Key to interrupt Autoboot

\EFI\HPUX\AUTO ==> boot vmunix -lq

Seconds left till autoboot -   0

16. Note: Only necessary for vg00.  The boot device is listed in /var/adm/syslog/syslog.log, so confirm that the system was booted from the new path.

# grep "Boot device" /var/adm/syslog/syslog.log

Dec 14 16:53:40 hprx6600 vmunix: Boot device's HP-UX HW path is: 0/4/1/0.0.0.4.0

# sasmgr get_info -D /dev/sasd0 -q raid

Thu Dec 14 16:56:20 2006

---------- PHYSICAL DRIVES ----------

LUN dsf              SAS Address          Enclosure    Bay      Size(MB)

/dev/rdsk/c1t2d0     0x500000e012691cb2     1            3      70007

/dev/rdsk/c1t3d0     0x500000e0126926d2     1            4      70007

/dev/rdsk/c1t4d0     0x500000e011a8d382     1            5      34732

/dev/rdsk/c1t7d0     0x500000e01263fcc2     1            8      34732

---------- LOGICAL DRIVE 4 ----------

Raid Level                                         : RAID 1

Volume sas address                                 : 0x611d224fa01c82

Device Special File                                : /dev/rdsk/c1t10d0

Raid State                                         : OPTIMAL

Raid Status Flag                                   : ENABLED

Raid Size                                          : 34000

Rebuild Rate                                       : 20.00 %

Rebuild Progress                                   : 100.00 %

Participating Physical Drive(s) :

SAS Address         Enc   Bay   Size(MB)      Type            State

0x500000e01268e312   1     1    70007         SECONDARY       ONLINE

0x500000e012691ee2   1     2    70007         PRIMARY         ONLINE

 

End of Procedure

If the server has been rebooted for any reason, the special device file is stale and is no longer visible with ioscan, and the sasmgr replace_tgt will not work unless you have at least B.11.23.03.01 of the driver released January 2007.  Use swlist to check the software driver revision, and upgrade to B.11.23.03.01 or later.

# swlist -l bundle CommonIO

# Initializing...

# Contacting target "hprx6600"...

#

# Target: hprx6600:/

#

 

CommonIO B.11.23.03.01 CommonIO

 

# swlist -l bundle SerialSCSI-00

# Initializing...

# Contacting target "hprx6600"...

#

# Target: hprx6600:/

#

 

SerialSCSI-00 B.11.23.03.01 PCI-X SerialSCSI

 

This software can be obtained free from http://software.hp.com/.

 

>>HP-UX 11i general

  • HP-UX Common Bundle

  • HP-UX Serial SCSI Driver

Use swinstall(1M) to install the CommonIO bundle first which does not require a reboot.  Then install the SerialSCSI-00 driver which does require a reboot.  Once this is completed the sasmgr replace_tgt command will work, and the rest of the procedure can be followed from step 3.

 

Last updated: February 5, 2007

[Top]

This page has been accessed  times since December 18, 2006