Archive
Howto identify the EMC LUN ID in HP-UX 11iv3 – Symmetrix arrays
DISCLAIMER NOTE: This method is based only on my personal experience working with HP-UX 11iv2, 11iv3 and EMC Symmetrix. I tested it with near a hundred LUNs from a DMX-3 and with six different servers. As far as I know this isn’t an official or supported procedure neither from EMC nor from HP.
Every time the storage people add a new LUN to your servers from an EMC disk array they provide you with a Logical device ID (or LUN ID) to identify the disk with PowerPath. If you are in HP-UX 11iv2 no problem here, just run a simple powermt command and look for the new LUN.
[root@totoro] / # powermt display dev=all | more ... ... Symmetrix ID=000281150123 Logical device ID=0CED state=alive; policy=SymmOpt; priority=0; queued-IOs=0 ============================================================================== ---------------- Host --------------- - Stor - -- I/O Path - -- Stats --- ### HW Path I/O Paths Interf. Mode State Q-IOs Errors ============================================================================== 20 0/0/10/1/0.11.15.0.0.1.3 c7t1d3 SP A0 active alive 0 1 23 0/0/10/1/0.11.47.0.0.1.3 c8t1d3 SP B0 active alive 0 1 26 1/0/8/1/0.21.15.0.0.1.3 c10t1d3 SP A1 active alive 0 1 29 1/0/8/1/0.21.47.0.0.1.3 c11t1d3 SP B1 active alive 0 1 ... ...
But if you are in 11.31 you will find a small problem to perform this. PowerPath is not recommended in HP-UX 11iv3 because it can cause conflicts with the new native multiplathing of the v3.
You can use the trick of doing a simple ll -tr in the /dev/disk directory just after the hardware scan and the device file creation, but this way is valid only if you have one or two disks with the same size. What if you have several disks with multiple sizes and want to use each disk for a different VG and/or task? The storage people will only provide the LUN IDs but you will not have the tool to match those IDs with your disks.
Fortunately there is way to circumvent the lack of PowerPath in 11iv3. We are going to use the same disk as in the previous example, the 0CED.
First get the disks serial number with scsimgr.
[root@totoro] / # scsimgr get_attr -D /dev/rdisk/disk30 -a serial_number SCSI ATTRIBUTES FOR LUN : /dev/rdisk/disk30 name = serial_number current = "100123CED000" default = saved =
Take note of the serial number.
100123CED000
As you can see the last the last three digits of the LUN ID are included in the disk serial number and if look carefully will see also the four last digits the Symmetrix ID (0123) just after the LUN ID.
Juanma.
Coming back to the IVM world
Yes I have to admit it, it’s been a while since the last time I created an Integrity Virtual Machine. In my last job didn’t have HPVM and here the VMs were already running when I arrived. So a few weeks ago I decided to cut my teeth again with HPVM, specially since I am pushing forward very hard for an OS and HPVM version upgrade of the IVM cluster which is currently running HP-UX 11.23 with HPVM 3.5.
First logical step in order to get proficient again with IVM is to create a new virtual machine. I asked Javi, our storage guy, for a new LUN and after add it to my lab server I started the whole process.
Some of the steps are obvious for any HP-UX Sysadmin, like VGs and LVs creation, but I decided to show the commands in order to maintain some consistency across this how-to/checklist/what-ever-you-like-to-call-it.
- Create a volume group for the IVM virtual disks.
[root@hpvmhost] ~ # vgcreate -s 16 -e 6000 vg_vmtest /dev/dsk/c15t7d1 Volume group "/dev/vg_vmtest" has been successfully created. Volume Group configuration for /dev/vg_vmtest has been saved in /etc/lvmconf/vg_vmtest.conf [root@hpvmhost] ~ # [root@hpvmhost] ~ # vgextend vg_vmtest /dev/dsk/c5t7d1 /dev/dsk/c7t7d1 /dev/dsk/c13t7d1 Volume group "vg_vmtest" has been successfully extended. Volume Group configuration for /dev/vg_vmtest has been saved in /etc/lvmconf/vg_vmtest.conf [root@hpvmhost] ~ # vgdisplay -v vg_vmtest --- Volume groups --- VG Name /dev/vg_vmtest VG Write Access read/write VG Status available Max LV 255 Cur LV 0 Open LV 0 Max PV 16 Cur PV 1 Act PV 1 Max PE per PV 6000 VGDA 2 PE Size (Mbytes) 16 Total PE 3199 Alloc PE 0 Free PE 3199 Total PVG 0 Total Spare PVs 0 Total Spare PVs in use 0 --- Physical volumes --- PV Name /dev/dsk/c15t7d1 PV Name /dev/dsk/c5t7d1 Alternate Link PV Name /dev/dsk/c7t7d1 Alternate Link PV Name /dev/dsk/c13t7d1 Alternate Link PV Status available Total PE 3199 Free PE 3199 Autoswitch On Proactive Polling On [root@hpvmhost] ~ #
- Create one lvol for each disk you want to add to your virtual machine, of course these lvols must belong to the volume group previously created.
[root@hpvmhost] ~ # lvcreate -L 12000 -n ivm1d1 vg_vmtest Logical volume "/dev/vg_vmtest/ivm1d1" has been successfully created with character device "/dev/vg_vmtest/rivm1d1". Logical volume "/dev/vg_vmtest/ivm1d1" has been successfully extended. Volume Group configuration for /dev/vg_vmtest has been saved in /etc/lvmconf/vg_vmtest.conf [root@hpvmhost] ~ # [root@hpvmhost] ~ # lvcreate -L 12000 -n ivm1d2 vg_vmtest Logical volume "/dev/vg_vmtest/ivm1d2" has been successfully created with character device "/dev/vg_vmtest/rivm1d2". Logical volume "/dev/vg_vmtest/ivm1d2" has been successfully extended. Volume Group configuration for /dev/vg_vmtest has been saved in /etc/lvmconf/vg_vmtest.conf [root@hpvmhost] ~ #
- Now we’re going to do some real stuff. Create the IVM with the hpvmcreate command and use the hpvmstatus to check that everything went well :
[root@hpvmhost] ~ # hpvmcreate -P ivm1 -O hpux [root@hpvmhost] ~ # hpvmstatus -P ivm1 [Virtual Machine Details] Virtual Machine Name VM # OS Type State ==================== ===== ======= ======== ivm1 8 HPUX Off [Authorized Administrators] Oper Groups: Admin Groups: Oper Users: Admin Users: [Virtual CPU Details] #vCPUs Entitlement Maximum ====== =========== ======= 1 10.0% 100.0% [Memory Details] Total Reserved Memory Memory ======= ======== 2 GB 64 MB [Storage Interface Details] Guest Physical Device Adaptor Bus Dev Ftn Tgt Lun Storage Device ======= ========== === === === === === ========= ========================= [Network Interface Details] Interface Adaptor Name/Num PortNum Bus Dev Ftn Mac Address ========= ========== ========== ======= === === === ================= [Misc Interface Details] Guest Physical Device Adaptor Bus Dev Ftn Tgt Lun Storage Device ======= ========== === === === === === ========= ========================= serial com1 tty console [root@hpvmhost] ~ #
We have a new virtual machine created but with no resources at all.
If you have read the HPVM documentation, and you should, probably know that every resource can be assigned at this step but I like to add them later one by one.
Since now we’re going to use the hpvmstatus to verify every change made. This command can be invoked without options to show a general summary or can query a single virtual machine, a verbose option is also available with -V. Take a look of its man page to check more options.
- Add more CPU and RAM. The default values are 1 vCPU and 2GB of RAM, more can be assigned with hpvmmodify:
[root@hpvmhost] ~ # hpvmmodify -P ivm1 -c 2 [root@hpvmhost] ~ # hpvmmodify -P ivm1 -r 4G [root@hpvmhost] ~ # hpvmstatus [Virtual Machines] Virtual Machine Name VM # OS Type State #VCPUs #Devs #Nets Memory Runsysid ==================== ===== ======= ========= ====== ===== ===== ======= ======== oratest01 1 HPUX On (OS) 4 10 3 16 GB 0 oratest02 2 HPUX On (OS) 4 8 3 16 GB 0 sapvm01 3 HPUX Off 3 8 3 8 GB 0 sapvm02 4 HPUX Off 3 7 3 8 GB 0 sles01 5 LINUX On (OS) 1 4 3 4 GB 0 rhel01 6 LINUX Off 1 4 3 4 GB 0 hp-vxvm 7 HPUX On (OS) 2 17 3 6 GB 0 ivm1 8 HPUX Off 2 0 0 4 GB 0 [root@hpvmhost] ~ #
- With the CPUs and RAM finished it’s time to add the storage devices, as always we’re going to use hpvmmodify:
[root@hpvmhost] ~ # hpvmmodify -P ivm1 -a disk:scsi::lv:/dev/vg_vmtest/rivm1d1 [root@hpvmhost] ~ # hpvmmodify -P ivm1 -a disk:scsi::lv:/dev/vg_vmtest/rivm1d2 [root@hpvmhost] ~ # hpvmmodify -P ivm1 -a dvd:scsi::disk:/dev/rdsk/c1t4d0 [root@hpvmhost] ~ # hpvmstatus -P ivm1 [Virtual Machine Details] Virtual Machine Name VM # OS Type State ==================== ===== ======= ======== ivm1 8 HPUX Off [Authorized Administrators] Oper Groups: Admin Groups: Oper Users: Admin Users: [Virtual CPU Details] #vCPUs Entitlement Maximum ====== =========== ======= 2 10.0% 100.0% [Memory Details] Total Reserved Memory Memory ======= ======== 4 GB 64 MB [Storage Interface Details] Guest Physical Device Adaptor Bus Dev Ftn Tgt Lun Storage Device ======= ========== === === === === === ========= ========================= disk scsi 0 2 0 0 0 lv /dev/vg_vmtest/rivm1d1 disk scsi 0 2 0 1 0 lv /dev/vg_vmtest/rivm1d2 dvd scsi 0 2 0 2 0 disk /dev/rdsk/c1t4d0 [Network Interface Details] Interface Adaptor Name/Num PortNum Bus Dev Ftn Mac Address ========= ========== ========== ======= === === === ================= [Misc Interface Details] Guest Physical Device Adaptor Bus Dev Ftn Tgt Lun Storage Device ======= ========== === === === === === ========= ========================= serial com1 tty console [root@hpvmhost] ~ #
An important tip about the storage devices, remember that you have to use the character device file of the LV. If a block device is used you will get the following error:
[root@hpvmhost] ~ # hpvmmodify -P ivm1 -a disk:scsi::lv:/dev/vg_vmtest/ivm1d1 hpvmmodify: WARNING (ivm1): Expecting a character device file for disk backing file, but '/dev/vg_vmtest/ivm1d1' appears to be a block device. hpvmmodify: ERROR (ivm1): Illegal blk device '/dev/vg_vmtest/ivm1d1' as backing device. hpvmmodify: ERROR (ivm1): Unable to add device '/dev/vg_vmtest/ivm1d1'. hpvmmodify: Unable to create device disk:scsi::lv:/dev/vg_vmtest/ivm1d1. hpvmmodify: Unable to modify the guest. [root@hpvmhost] ~ #
- Virtual networking 1: First check the available virtual switches with hpvmnet:
[root@hpvmhost] / # hpvmnet Name Number State Mode NamePPA MAC Address IP Address ======== ====== ======= ========= ======== ============== =============== localnet 1 Up Shared N/A N/A vlan02 2 Up Shared lan3 0x000000000000 192.168.1.12 vlan03 3 Up Shared lan4 0x001111111111 10.10.3.4 [root@hpvmhost] / #
- Virtual Networking 2: Add a couple of vnics to the virtual machine.
[root@hpvmhost] / # hpvmmodify -P ivm1 -a network:lan:vswitch:vlan02 [root@hpvmhost] / # hpvmmodify -P ivm1 -a network:lan:vswitch:localnet [root@hpvmhost] / # [root@hpvmhost] / # hpvmstatus -P ivm1 [Virtual Machine Details] Virtual Machine Name VM # OS Type State ==================== ===== ======= ======== ivm1 8 HPUX Off [Authorized Administrators] Oper Groups: Admin Groups: Oper Users: Admin Users: [Virtual CPU Details] #vCPUs Entitlement Maximum ====== =========== ======= 2 10.0% 100.0% [Memory Details] Total Reserved Memory Memory ======= ======== 4 GB 64 MB [Storage Interface Details] Guest Physical Device Adaptor Bus Dev Ftn Tgt Lun Storage Device ======= ========== === === === === === ========= ========================= disk scsi 0 2 0 0 0 lv /dev/vg_vmtest/rivm1d1 disk scsi 0 2 0 1 0 lv /dev/vg_vmtest/rivm1d2 dvd scsi 0 2 0 2 0 disk /dev/rdsk/c1t4d0 [Network Interface Details] Interface Adaptor Name/Num PortNum Bus Dev Ftn Mac Address ========= ========== ========== ======= === === === ================= vswitch lan vlan02 8 0 0 0 56-e9-e3-09-6a-22 vswitch lan localnet 8 0 1 0 ae-d6-f7-fa-4e-3e [Misc Interface Details] Guest Physical Device Adaptor Bus Dev Ftn Tgt Lun Storage Device ======= ========== === === === === === ========= ========================= serial com1 tty console [root@hpvmhost] / #
- And we have an IVM ready to be used. To start it use the hpvmstart command and access its console with hpvmconsole, the interface is almost equal to GSP/MP.
[root@hpvmhost] ~ # hpvmstart -P ivm1
(C) Copyright 2000 - 2008 Hewlett-Packard Development Company, L.P.
Opening minor device and creating guest machine container
Creation of VM, minor device 3
Allocating guest memory: 4096MB
allocating low RAM (0-80000000, 2048MB)
/opt/hpvm/lbin/hpvmapp (/var/opt/hpvm/uuids/2b3b1198-2062-11df-9e06-001a4b07f002/vmm_config.current): Allocated 2147483648 bytes at 0x6000000100000000
allocating high RAM (100000000-180000000, 2048MB)
/opt/hpvm/lbin/hpvmapp (/var/opt/hpvm/uuids/2b3b1198-2062-11df-9e06-001a4b07f002/vmm_config.current): Allocated 2147483648 bytes at 0x6000000200000000
locking memory: 100000000-180000000
allocating datalogger memory: FF800000-FF840000 (256KB for 155KB)
/opt/hpvm/lbin/hpvmapp (/var/opt/hpvm/uuids/2b3b1198-2062-11df-9e06-001a4b07f002/vmm_config.current): Allocated 262144 bytes at 0x6000000300000000
locking datalogger memory
allocating firmware RAM (fff00000-fff20000, 128KB)
/opt/hpvm/lbin/hpvmapp (/var/opt/hpvm/uuids/2b3b1198-2062-11df-9e06-001a4b07f002/vmm_config.current): Allocated 131072 bytes at 0x6000000300080000
locked SAL RAM: 00000000fff00000 (8KB)
locked ESI RAM: 00000000fff02000 (8KB)
locked PAL RAM: 00000000fff04000 (8KB)
locked Min Save State: 00000000fff06000 (8KB)
locked datalogger: 00000000ff800000 (256KB)
Loading boot image
Image initial IP=102000 GP=67E000
Initialize guest memory mapping tables
Starting event polling thread
Starting thread initialization
Daemonizing....
hpvmstart: Successful start initiation of guest 'ivm1'
[root@hpvmhost] ~ #
[root@hpvmhost] ~ # hpvmconsole -P ivm1
vMP MAIN MENU
CO: Console
CM: Command Menu
CL: Console Log
SL: Show Event Logs
VM: Virtual Machine Menu
HE: Main Help Menu
X: Exit Connection
[ivm1] vMP> co
(Use Ctrl-B to return to vMP main menu.)
- - - - - - - - - - Prior Console Output - - - - - - - - - -
And we are finished. I’m not going through the installation process since it’s not the objective of this post and it is very well documented in the HP-UX documentation.
I really enjoyed this post, it has been very useful exercise in order to re-learn the roots of HPVM and a very good starting point for the HP-UX/HPVM upgrade I’m going to undertake during next weeks.
Juanma.
Machinfo on PA-RISC systems
When the HP-UX Itanium version was released it came with a very handy tool named machinfo. This command prints number and type of CPUs, amount of memory, firmware revision, serial number, machine id and many more useful information about the server. Sadly on PA-RISC we didn’t have something similar, of course there is print_manifest and I have to say that it’s quite a tool but I always loved the simplicity of machinfo.
Dozens of posts have been thrown throughout the years on ITRC Forums asking for a PA-RISC machinfo version and many workarounds and even some binaries have been posted.
I tried a lot of them but since I discovered Patrick Reut‘s version a couple of years ago I never used another one. It works on 11.11 and 11.23 systems, I tried on 10.20 but didn’t wok. The binary can found in this post as an attachment.
Here it an example output of the command:
root@tst1:/# which machinfo /usr/contrib/bin/machinfo root@tst1:/# ll /usr/contrib/bin/machinfo lrwx------ 1 root sys 34 Feb 17 10:15 /usr/contrib/bin/machinfo@ -> /usr/local/scripts/parisc_machinfo root@tst1:/# root@tst1:/# machinfo OS info: sysname = HP-UX nodename = sigtst1 release = B.11.23 version = U machine = 9000/800 idnumber = 11111111111 Platform info: model string = "9000/800/rp7420" machine id number = XXXXXXXXXXXXXX machine serial number = DEHxxxxxxxx CPU info Number of CPUs = 4 Clock speed = 1000 MHz processor family: 532 pa-2.0 processor model: 20 PA8900 Firmware info: Firmware revision = 22.2 Memory = 8165 MB (7 GB) Disk info: c0t6d0 : HP 146 GMA (size = 146GB) c0t5d0 : HP 146 GMA (size = 146GB) c45t0d1 : HP HS (size = 118GB) c45t0d4 : HP HS (size = 118GB) c45t0d5 : HP HS (size = 118GB) c45t0d7 : HP HS (size = 15GB) c45t1d0 : HP HS (size = 15GB) c47t0d1 : HP HS (size = 118GB) c47t0d4 : HP HS (size = 118GB) c47t0d5 : HP HS (size = 118GB) c47t0d7 : HP HS (size = 15GB) c47t1d0 : HP HS (size = 15GB) root@tst1:/#
Juanma.
Playing with lanadmin & lanscan
Current release of HP-UX, 11.31, has the handy nwmgr to handle networking tasks, but for years instead of nwmgr we’ve been playing with lanscan and lanadmin (linkloop as well) to perform many networking tasks on the 11.23 release and previous ones. And surely some of you, just like myself, still have 11iv2 systems up and running. Following is a small list of tips and tasks for lanadmin from one of my “how-to-do” files.
- Lanscan: Basically is used to get information about the LAN interfaces.
root@sap01:~# lanscan Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI Path Address In# State NamePPA ID Type Support Mjr# 0/0/0/1/0 0x001A4B07F002 0 UP lan0 snap0 1 ETHER Yes 119 0/0/0/1/1 0x001A4B07F003 1 UP lan1 snap1 2 ETHER Yes 119 0/0/1/1/0 0x0018FE2D7EE7 2 UP lan2 snap2 3 ETHER Yes 119 0/0/9/1/0 0x0018FE2D7EF4 3 UP lan3 snap3 4 ETHER Yes 119 0/0/10/1/0 0x000CFC0046B9 4 UP lan4 snap4 5 ETHER Yes 119 0/0/12/1/0 0x000CFC004672 5 UP lan5 snap5 6 ETHER Yes 119 LinkAgg0 0x000000000000 900 DOWN lan900 snap900 9 ETHER Yes 119 LinkAgg1 0x000000000000 901 DOWN lan901 snap901 10 ETHER Yes 119 LinkAgg2 0x000000000000 902 DOWN lan902 snap902 11 ETHER Yes 119 LinkAgg3 0x000000000000 903 DOWN lan903 snap903 12 ETHER Yes 119 LinkAgg4 0x000000000000 904 DOWN lan904 snap904 13 ETHER Yes 119 root@sap01:~#
A verbose version can be obtained with the -v switch, but for me this switch has a glitch since you can’t query for a single LAN card:
root@sap01:~# lanscan -v ------------------------------------------------------------------------------- Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI Path Address In# State NamePPA ID Type Support Mjr# 0/0/0/1/0 0x001A4B07F002 0 UP lan0 snap0 1 ETHER Yes 119 Extended Station LLC Encapsulation Address Methods 0x001A4B07F002 IEEE HPEXTIEEE SNAP ETHER NOVELL Driver Specific Information iether ------------------------------------------------------------------------------- ... root@sap01:~#
There are other options for lanscan that can be used to obtain more simple info in a “script friendly” list format:
root@sap01:~# lanscan -a 0x001A4B07F002 0x001A4B07F003 0x0018FE2D7EE7 0x0018FE2D7EF4 0x000CFC0046B9 0x000CFC004672 0x000000000000 0x000000000000 0x000000000000 0x000000000000 0x000000000000 root@sap01:~# lanscan -i lan0 snap0 lan1 snap1 lan2 snap2 lan3 snap3 lan4 snap4 lan5 snap5 lan900 snap900 lan901 snap901 lan902 snap902 lan903 snap903 lan904 snap904 root@sap01:~#
- Lanadmin: The lanadmin, acording to its man page, allow you to:
+ Display and change the station address.
+ Display and change the 802.5 Source Routing options (RIF).
+ Display and change the maximum transmission unit (MTU).
+ Display and change the speed setting.
+ Clear the network statistics registers to zero.
+ Display the interface statistics.
+ Display the interface usage information.
+ Reset the interface card, thus executing its self-test.
+ Configure VLANs on the cards that support VLAN.
It can be used in two ways, if invoked with no options from the shell it will present a menu style interface where different tasks can be performed. Following is am example to illustrate.
LOCAL AREA NETWORK ONLINE ADMINISTRATION, Version 1.0
Tue , Feb 9,2010 14:22:27
Copyright 1994 Hewlett Packard Company.
All rights are reserved.
Test Selection mode.
lan = LAN Interface Administration
menu = Display this menu
quit = Terminate the Administration
terse = Do not display command menu
verbose = Display command menu
Enter command: lan
LAN Interface test mode. LAN Interface PPA Number = 0
clear = Clear statistics registers
display = Display LAN Interface status and statistics registers
end = End LAN Interface Administration, return to Test Selection
menu = Display this menu
ppa = PPA Number of the LAN Interface
quit = Terminate the Administration, return to shell
reset = Reset LAN Interface to execute its selftest
specific = Go to Driver specific menu
Enter command: display
LAN INTERFACE STATUS DISPLAY
Tue , Feb 9,2010 14:22:31
PPA Number = 0
Description = lan0 HP PCI Core I/O 1000Base-T Release B.11.23.0712.01
Type (value) = ethernet-csmacd(6)
MTU Size = 1500
Speed = 1000000000
Station Address = 0x14c2650091
Administration Status (value) = up(1)
Operation Status (value) = up(1)
Last Change = 419
Inbound Octets = 120454615
Inbound Unicast Packets = 863761
Inbound Non-Unicast Packets = 4327
Inbound Discards = 0
Inbound Errors = 0
Inbound Unknown Protocols = 12
Outbound Octets = 145033817
Outbound Unicast Packets = 1285500
Outbound Non-Unicast Packets = 221
Outbound Discards = 0
Outbound Errors = 0
Outbound Queue Length = 0
Specific = 655367
Press to continue
Ethernet-like Statistics Group
Index = 1
Alignment Errors = 0
FCS Errors = 0
Single Collision Frames = 0
Multiple Collision Frames = 0
Deferred Transmissions = 0
Late Collisions = 0
Excessive Collisions = 0
Internal MAC Transmit Errors = 0
Carrier Sense Errors = 0
Frames Too Long = 0
Internal MAC Receive Errors = 0
LAN Interface test mode. LAN Interface PPA Number = 0
clear = Clear statistics registers
display = Display LAN Interface status and statistics registers
end = End LAN Interface Administration, return to Test Selection
menu = Display this menu
ppa = PPA Number of the LAN Interface
quit = Terminate the Administration, return to shell
reset = Reset LAN Interface to execute its selftest
specific = Go to Driver specific menu
Enter command:
When used with options from the command line lanadmin can perform the same tasks as as in the menu interface on each LAN card. Here are some of the most common features I’ve been using for years:
· Display interface info:
root@sap01:~# lanadmin -x card_info 1 *********** Version Information ********** Driver version: B.11.23.0712 Firmware version: N/A Chip version: 0x3 PCI Sub-System ID: 0x12a6 PCI Sub-Vendor ID: 0x103c Board Revision: D4503807 Software Key: 0 Engineering Date Code: A-4731 ********** Card Setting *********** Driver State: IETHER_ONLINE Auto Negotiation: On Flow Control: On Send Max Buf Descriptors: 1 Recv Max Buf Descriptors: 1 Send Coalesced Ticks: 150 Recv Coalesced Ticks: 0 root@sap01:~#
· Display Auto-Port Aggregation status:
root@sap01:~# lanadmin -x -v 900 Link Aggregate PPA # : 900 Number of Ports : 2 Ports PPA : 0 1 Link Aggregation State : LINKAGG MANUAL Load Balance Mode : Hot Standby (LB_HOT_STANDBY) root@sap01:~#
· Show speed settings:
root@sap01:/# lanadmin -x 1 Speed = 1000 Full-Duplex. Autonegotiation = On. root@sap01:/#
· Creating an Aggregation link:
roo@sap01:/# lanadmin -X -a 1 2 900
· Show load balancing algorithm in APA:
root@sap02:/etc# lanadmin -x -l 900 Load Balancing = Hot Standby (LB_HOT_STANDBY) root@sap02:/etc#
· Display MAC address:
root@sap01:~# lanadmin -a 1 Station Address = 0x001a4b07f003 root@sap01:~#
· Display driver and adapter statistics:
root@sap01:/# lanadmin -x stats drv 1 ****** Driver Statistics ****** In Packet Error 0 Out Packet Error 0 Loopback packets 44 Link Down events 0 ****** Host Command Statistics ****** nicCmdsDelMCastAddr 0 nicCmdsSetMACAddr 0 nicCmdsSetPromiscMode 0 nicCmdsSetMulticastMode 0 nicCmdsClearStats 1 ****** NIC Events Statistics ****** nicEventsFirmwareOperational 0 nicEventsStatsUpdated 0 nicEventsLinkStateChanged 1 nicEventsMCastListUpdated 0 ****** Interface Statistics ****** ifIndex 2 ifType 6 ifMtu 1500 ifSpeed 1000000000 ifAdminStatus 1 ifOperStatus 1 ifLastChange 36 ifInDiscards 0 ifInErrors 0 ifInUnknownProtos 87777 ifOutDiscards 0 ifOutErrors 0 ifOutQLen 0 ifInOctets_low 1205643914 ifInOctets_high 0 ifInUcastPkts_low 8695826 ifInUcastPkts_high 0 ifInMulticastPkts_low 0 ifInMulticastPkts_high 0 ifInBroadcastPkts_low 87777 ifInBroadcastPkts_high 0 ifOutOctets_low 1200310422 ifOutOctets_high 0 ifOutUcastPkts_low 8696015 ifOutUcastPkts_high 0 ifOutMulticastPkts_low 0 ifOutMulticastPkts_high 0 ifOutBroadcastPkts_low 0 ifOutBroadcastPkts_high 0 root@sap01:/#
· Show Vital Product Data, a really funny name ;-) don’t you think?
root@sap01:/# lanadmin -x vpd 0 *********** Vital Product Data ********** Product Description: PCI/PCI-X 10/100/1000BT Dual Ethernet Adapter Part Number: A7012-60601 Engineering Date Code: A-4731 Part Serial Number: 001A4B07F002 Misc. Information: 7.5W Mfd. Date: 4749 Checksum: 0xb EFI Version: 03048 ROM Firmware Version: N/A Asset Tag: N/A root@sap01:/#
· Show card type:
root@sap01:~# lanadmin -x type 1 1000Base-T root@sap01:~#
And we are finished. Probably I’m forgetting a more interesting uses of lanadmin if you have other everyday use please comment :-)
Juanma.
vg00 mirroring
This is a small cookbook about mirroring the vg00 I’ve compiled throughout the years, well it’s really more like a list with the commands but I believe it can be of usefulness for some of the newbies out there. It covers HP-UX 11.23 for PA-RISC and 11.23 and 11.31 for IA64.
- PA-RISC 11.23:
First initialize the disk.
root@ayane:/# pvcreate -f -B /dev/rdsk/c0t6d0
Now make the disk bootable writing the LIF header.
root@ayane:/# mkboot -l /dev/dsk/c0t6d0
And the LIF files, I’m using the unenforced quorum option because in my example the vg00 has only two PVs.
root@ayane:/# mkboot -a 'hpux -lq' /dev/dsk/c0t6d0
Add the new PV to vg00.
root@ayane:/# vgextend vg00 /dev/dsk/c0t6d0
Create the mirrors of the logical volumes within vg00 in the new PV.
root@ayane:/# for i in $(vgdisplay -v vg00 | grep "LV Name" | awk '{ print $3 };')
> do
> lvextend -m 1 $i /dev/dsk/c0t6d0
> done
When the mirror is finished.
root@ayane:/# lvlnboot -r /dev/vg00/lvol3 /dev/vg00 root@ayane:/# lvlnboot -b /dev/vg00/lvol1 /dev/vg00 root@ayane:/# lvlnboot -s /dev/vg00/lvol2 /dev/vg00 root@ayane:/# lvlnboot -d /dev/vg00/lvol2 /dev/vg00
Specify the new disk as alternate boot path and add it to /stand/bootconf.
root@ayane:/# setboot -a 0/0/0/3/0.6.0 root@ayane:/# cat /stand/bootconf l /dev/dsk/c0t5d0 l /dev/dsk/c0t6d0 root@ayane:/#
And it’s done. To check that everything correct.
root@ayane:/# vgdisplay -v vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 10
Open LV 10
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4384
VGDA 4
PE Size (Mbytes) 32
Total PE 8748
Alloc PE 4076
Free PE 4672
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
--- Logical volumes ---
.
.
.
--- Physical volumes ---
PV Name /dev/dsk/c0t5d0
PV Status available
Total PE 4374
Free PE 2336
Autoswitch On
Proactive Polling On
PV Name /dev/dsk/c0t6d0
PV Status available
Total PE 4374
Free PE 2336
Autoswitch On
Proactive Polling On
root@ayane:/#
root@ayane:/# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c0t5d0 (0/0/0/3/0.5.0) -- Boot Disk
/dev/dsk/c0t6d0 (0/0/0/3/0.6.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c0t5d0
/dev/dsk/c0t6d0
Root: lvol3 on: /dev/dsk/c0t5d0
/dev/dsk/c0t6d0
Swap: lvol2 on: /dev/dsk/c0t5d0
/dev/dsk/c0t6d0
Dump: lvol2 on: /dev/dsk/c0t5d0, 0
root@ayane:/#
root@ayane:/# setboot
Primary bootpath : 0/0/0/3/0.6.0
HA Alternate bootpath : 0/0/0/0/0.0.0
Alternate bootpath : 0/0/0/3/0.5.0
Autoboot is ON (enabled)
Autosearch is ON (enabled)
root@ayane:/#
root@ayane:/# lifls -l /dev/dsk/c0t6d0
volume ISL10 data size 7984 directory size 8 05/09/22 09:37:09
filename type start size implement created
===============================================================
HPUX -12928 584 1024 0 06/10/27 14:23:07
ISL -12800 1608 242 0 05/09/22 09:37:09
AUTO -12289 1856 1 0 05/09/22 09:37:09
PAD -12290 1864 1468 0 05/09/22 09:37:09
LABEL BIN 3336 8 0 07/07/17 19:42:29
root@ayane:/#
- Itanium 11.23:
The procedure of mirroring the vg00 in an Itanium HP-UX 11.23, although shares some part with the PA-RISC differs in some critical area. The main difference is the partitioning of the disk, the boot disks in an Integrity server must have an specific layout with three paritions:
- EFI
- HPUX
- HPSP (HP Service Partition)
Preparation of the disk:
root@asoka:/# touch /tmp/partitionfile root@asoka:/# cat <<EOF >> /tmp/partitionfile > 3 > EFI 500MB > HPUX 100% > HPSP 400MB > EOF root@asoka:/# cat partitionfile 3 EFI 500MB HPUX 100% HPSP 400MB root@asoka:/# root@asoka:/# idisk -wqf /tmp/partitionfile /dev/rdsk/c1t1d0
Make it bootable and copy the AUTO file. As it can be viewed in the example below an s<number_of_partition> has been added to the device in order to identify the partition in which the operation will be executed.
root@asoka:/# insf -eCdisk root@asoka:/# mkboot -e -l /dev/rdsk/c1t1d0 root@asoka:/# echo "boot vmunix -lq" >> /tmp/AUTO.lq root@asoka:/# efi_cp -d /dev/rdsk/c1t1d0s1 /tmp/AUTO.lq /EFI/HPUX/AUTO
Create the HPSP partition.
root@asoka:/# dd if=/dev/rdsk/c0t1d0s3 of=/dev/rdsk/c1t1d0s3 bs=1024k
Like in PA-RISC initialize the PV and add it to the VG.
root@asoka:/# pvreate -f -B /dev/rdsk/c1t1d0s2 root@asoka:/# vgextend vg00 /dev/dsk/c1t1d0s2
Mirror the Logical Volumes.
root@asoka:/# for i in $(vgdisplay -v vg00 | grep "LV Name" | awk '{ print $3 };')
> do
> lvextend -m 1 $i /dev/dsk/c1t1d0s2
> done
Set the content of the LABEL file, edit the /stand/bootconf like in the PA-RISC procedure and add the new disk as alternate HA bootpath.
root@asoka:/# setboot -h <HW_PATH>
To check that everything is properly configured you can use the same commands as in PA-RISC and the command idisk to check the correct partitioning of the disk.
root@asoka:/# idisk -p /dev/rdsk/c1t1d0 idisk version: 1.32 EFI Primary Header: Signature = EFI PART Revision = 0x10000 HeaderSize = 0x5c HeaderCRC32 = 0xa498de56 MyLbaLo = 0x1 MyLbaHi = 0x0 AlternateLbaLo = 0x88aacbf AlternateLbaHi = 0x0 FirstUsableLbaLo = 0x22 FirstUsableLbaHi = 0x0 LastUsableLbaLo = 0x88aac9c LastUsableLbaHi = 0x0 Disk GUID = 24e8312a-20cf-11dd-8001-d6217b60e588 PartitionEntryLbaLo = 0x2 PartitionEntryLbaHi = 0x0 NumberOfPartitionEntries = 0xc SizeOfPartitionEntry = 0x80 PartitionEntryArrayCRC32 = 0xae99dcc3 Primary Partition Table (in 512 byte blocks): Partition 1 (EFI): Partition Type GUID = c12a7328-f81f-11d2-ba4b-00a0c93ec93b Unique Partition GUID = 24e83378-20cf-11dd-8002-d6217b60e588 Starting Lba Lo = 0x22 Starting Lba Hi = 0x0 Ending Lba Lo = 0xfa021 Ending Lba Hi = 0x0 Partition 2 (HP-UX): Partition Type GUID = 75894c1e-3aeb-11d3-b7c1-7b03a0000000 Unique Partition GUID = 24e83396-20cf-11dd-8003-d6217b60e588 Starting Lba Lo = 0xfa022 Starting Lba Hi = 0x0 Ending Lba Lo = 0x87e2821 Ending Lba Hi = 0x0 Partition 3 (HPSP): Partition Type GUID = e2a1e728-32e3-11d6-a682-7b03a0000000 Unique Partition GUID = 24e833b4-20cf-11dd-8004-d6217b60e588 Starting Lba Lo = 0x87e2822 Starting Lba Hi = 0x0 Ending Lba Lo = 0x88aa821 Ending Lba Hi = 0x0 root@asoka:/#
- Itanium 11.31:
The 11.31 section will be short since the procedure is almost equal to the 11.23 one. You have to take into account that if you have migrated to the new agile view (and you should have ;-D ) a few things will change. The new agile view use _p1,_p2 and _p3 to identify the partitions of the disk instead of the classic s1, s2 & s3 and the paths will change from dsk/rdsk to disk/rdisk, the names of the devices as well.
A few of examples will show it.
root@piroko:/# efi_cp -d /dev/rdisk/disk4_p1 /tmp/AUTO.lq /EFI/HPUX/AUTO
root@piroko:/# pvcreate -fB /dev/rdisk/disk4_p2
root@piroko:/# vgextend rootvg /dev/disk/disk_p2
root@piroko:/# for i in $(vgdisplay -v vg00| grep "LV Name" | awk '{ print $3 };')
> do
> lvextend -m 1 $i /dev/disk/disk4_p2
> done
And we are done. As always every comment or correction will be welcome.
See you next time.
Juanma.
idisk version: 1.32EFI Primary Header:
Signature = EFI PART
Revision = 0×10000
HeaderSize = 0x5c
HeaderCRC32 = 0xa498de56
MyLbaLo = 0×1
MyLbaHi = 0×0
AlternateLbaLo = 0x88aacbf
AlternateLbaHi = 0×0
FirstUsableLbaLo = 0×22
FirstUsableLbaHi = 0×0
LastUsableLbaLo = 0x88aac9c
LastUsableLbaHi = 0×0
Disk GUID = 24e8312a-20cf-11dd-8001-d6217b60e588
PartitionEntryLbaLo = 0×2
PartitionEntryLbaHi = 0×0
NumberOfPartitionEntries = 0xc
SizeOfPartitionEntry = 0×80
PartitionEntryArrayCRC32 = 0xae99dcc3
Primary Partition Table (in 512 byte blocks):
Partition 1 (EFI):
Partition Type GUID = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
Unique Partition GUID = 24e83378-20cf-11dd-8002-d6217b60e588
Starting Lba Lo = 0×22
Starting Lba Hi = 0×0
Ending Lba Lo = 0xfa021
Ending Lba Hi = 0×0
Partition 2 (HP-UX):
Partition Type GUID = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
Unique Partition GUID = 24e83396-20cf-11dd-8003-d6217b60e588
Starting Lba Lo = 0xfa022
Starting Lba Hi = 0×0
Ending Lba Lo = 0x87e2821
Ending Lba Hi = 0×0
Partition 3 (HPSP):
Partition Type GUID = e2a1e728-32e3-11d6-a682-7b03a0000000
Unique Partition GUID = 24e833b4-20cf-11dd-8004-d6217b60e588
Starting Lba Lo = 0x87e2822
Starting Lba Hi = 0×0
Ending Lba Lo = 0x88aa821
Ending Lba Hi = 0×0

