UnixPedia : HPUX / LINUX / SOLARIS: December 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.