Tips and Tricks site for advanced HP-UX Engineers

24 Jul 15 Single user vg00 reconfiguration for a san boot hp-ux system

San boot system.

HBA has to be replaced.

Then you have to boot single user mode to re-establish all your paths.

Procedure authored by my colleague Mahesh Koduru

Before you start make sure you have a current map file hosted on root filesystem.

“Reboot the server and follow these steps :
Interrupt the boot and boot the system in maintenance mode.

fs0:\EFI\HPUX> hpux

HPUX> boot -lm –lq vmunix This will bring the System into Maintance mod

#vgdisplay vg00 The VG should be in deactivated Mod

#ll /dev/*/group Collect the Group file

#vgexport -p -s -m /dev/vg00 Keep the Map file in present directory , ie root

# ll
#vgexport -v /dev/vg00

#mkdir -m 755 /dev/vg00
#mknod /dev/vg00/group c 64 0x030000 ##This is an example your major/minor number may vary
#vgimport -s -N -m /dev/vg00 ## The -N is B.11.31 only to convert to agile storage
#vgchange -a y vg00
#mount -a Mount only Root filesystems

#setboot Check and correct setboot issues

#lvlnboot -v vg00 Check and correct lvlnboot issues , lvrmboot command can be used if needed

#/usr/sbin/lvlnboot -v
# lvlnboot -r /dev/vg00 Execute for fixing Boot Labels
# lvlnboot -r /dev/vg00/lvol3
# lvlnboot -b /dev/vg00/lvol1
# lvlnboot -s /dev/vg00/lvol2
# lvlnboot -d /dev/vg00/lvol2
# lvlnboot -v
# lvlnboot -R

Note: Comment the swap in fstab and then issue below command.
# shutdown -ry 0

30 Apr 15 Quick guide to configuring secondary hp-ux swap

I always have to look at Google for this.

To make this site more comprehensive, here it is.

disk5 is designated as swap disk, size 128 GB. Server has 64 GB of RAM.

pvcreate /dev/rdisk/disk5
vgcreate -p 10 -l 10 /dev/vgswap /dev/disk/disk5

vgdisplay /dev/vgswap
vgdisplay -v /dev/vgswap
lvcreate -l 32767 -n lv_swap /dev/vgswap
swapinfo -tam
swapon -p 2 /dev/vgswap/lv_swap
vi /etc/fstab
/dev/vgswap/lv_swap … swap pri=2 0 0

swapinfo -tam
dev 24576 0 24576 0% 0 – 1 /dev/vg00/lvol2
dev 131068 0 131064 0% 0 – 2 /dev/vgswap/lv_swap
reserve – 290 -290
memory 62330 7566 54764 12%
total 217974 7856 210114 4% – 0 –

A reboot test is recommended where possible.

Tags: , , , ,

26 Feb 14 scsimgr task: removing a LUN

scsimgr is the tool of choice for getting rid of storage that is in the HP-UX kernel and the underlying storage has been pulled by your storage administrator. In this case the lun has been marked as FAILED.

HP-UX 11.31, any Operating Environment, though these tasks go easier if the OE is more current.

scsimgr lun_map> /tmp/lun_map.out


        LUN PATH INFORMATION FOR LUN : /dev/rdisk/disk3436


Total number of LUN paths     = 2

World Wide Identifier(WWID)    = 0x60000970000192605240533039434139


LUN path : lunpath2275

Class                         = lunpath

Instance                      = 2275

Hardware path                 = 0/0/0/5/0/0/1.0x500009720851e1ad.0x446e000000000000

SCSI transport protocol       = fibre_channel

State                         = UNOPEN

Last Open or Close state      = FAILED


LUN path : lunpath2274

Class                         = lunpath

Instance                      = 2274

Hardware path                 = 0/0/0/8/0/0/1.0x500009720851e191.0x446e000000000000

SCSI transport protocol       = fibre_channel

State                         = UNOPEN

Last Open or Close state      = FAILED


scsimgr replace_wwid -D /dev/rdisk/disk3436

echo $?

Zero is good, non-zero probably means you are booting.