Posts Tagged HP-UX

Identify PV device in HP-UX 11.31

In HP-UX 11.31, LVM doesn’t use “ctd’ (ie: /dev/rdsk/c2t1d0), but DSF to balance the throughput between many device paths., so if you need identify what physical device represent that logical device, you can use ioscan, for example:

server@root:/root # vgdisplay -v vg00
--- Volume groups ---
VG Name                     /dev/vg00
VG Write Access             read/write
VG Status                   available
Max LV                      255
Cur LV                      12
Open LV                     12
Max PV                      16
Cur PV                      1
Act PV                      1
Max PE per PV               4385
VGDA                        2
PE Size (Mbytes)            16
Total PE                    4375
Alloc PE                    3998
Free PE                     377
Total PVG                   0
Total Spare PVs             0
Total Spare PVs in use      0
VG Version                  1.0
VG Max Size                 1122560m
VG Max Extents              70160


--- Logical volumes ---
LV Name                     /dev/vg00/lvol1
LV Status                   available/syncd
LV Size (Mbytes)            2000
Current LE                  125
Allocated PE                125
Used PV                     1


LV Name                     /dev/vg00/lvol2
LV Status                   available/syncd
LV Size (Mbytes)            16384
Current LE                  1024
Allocated PE                1024
Used PV                     1

(...)

LV Name                     /dev/vg00/lvol12
LV Status                   available/syncd
LV Size (Mbytes)            5120
Current LE                  320
Allocated PE                320
Used PV                     1

--- Physical volumes ---
PV Name                     /dev/disk/disk4
PV Status                   available
Total PE                    4375
Free PE                     377
Autoswitch                  On
Proactive Polling           On

Note that the pv name is “disk4”, not c2t1d3.

With ioscan you can reverse map it:

server@root:/root # ioscan -m dsf
Persistent DSF           Legacy DSF(s)
========================================
/dev/rdisk/disk3         /dev/rdsk/c2t1d0
/dev/rdisk/disk4         /dev/rdsk/c2t0d0
/dev/rdisk/disk5         /dev/rdsk/c0t0d0

Now we know that the “disk4″ is the physical disk located in 12/0/1/1/0.0.0

root@brux0044:/root # ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
========================================================================
disk 1298 12/0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 73.4GMAP3735NC
                         /dev/dsk/c2t0d0 /dev/rdsk/c2t0d0

, , ,

No Comments

Check powerpath links in HP-UX

To check if the powerpath links are up in HP-UX, you can use the following command:

# powermt display dev=all

 

, , ,

No Comments

Lock an user account in HP-UX

To lock an user account in HP-UX, you can use the following command:

# /usr/lbin/modprpw -m alock=YES USER

, ,

No Comments

Merge many depots

When you have many depot files, you can create a single big depot and install it instead of install one by one. Let’s assume that you need install the following depots, and they are all located in the directory /tmp/install/depots:

autoconf-2.64-hppa-11.11.depot bison-2.4.1-hppa-11.11.depot gawk-3.1.7-hppa-11.11.depot sed-4.2.1-hppa-11.11.depot tcltk-8.5.7-hppa-11.11.depot texinfo-4.13-hppa-11.11.depot zip-3.0-hppa-11.11.depot

To create a single depot, run the follow commands:
# cd /tmp/install/ for i in `ls depots/*.depot` ;do swcopy -s /tmp/install/$i \* @/tmp/install/big;done

Now, to install it, you can use:
# swinstall -s /tmp/install/big

 

, , ,

No Comments

Listing installed packages in HP-UX

To list all installed packages on HP-UX, you can use the following command:

# swlist -l

 

,

No Comments