Archive
Howto enable HP-UX 11iv3 agile naming mode in VxVM
By default Veritas Volume Manager uses HP-UX legacy naming scheme instead of the agile view one, of course for any HP-UX Sysadim this is completely unacceptable ;-) below is a small procedure to change this behavior.
Display VxVM disk information and get the current naming scheme.
root@robin:~# vxdisk list DEVICE TYPE DISK GROUP STATUS c0t0d0s2 auto:LVM - - LVM c0t1d0 auto:LVM - - LVM c0t2d0 auto:cdsdisk labdg01 labdg online c0t3d0 auto:cdsdisk labdg02 labdg online c0t4d0 auto:cdsdisk labdg03 labdg online c0t5d0 auto:none - - online invalid c0t6d0 auto:none - - online invalid c0t7d0 auto:none - - online invalid c0t8d0s2 auto:hpdisk rootdisk01 rootdg online c0t9d0s2 auto:hpdisk rootdisk02 rootdg online root@robin:~# root@robin:~# vxddladm get namingscheme NAMING_SCHEME PERSISTENCE MODE =============================================== OS Native Yes Legacy root@robin:~#
As you can see the mode is se tot legacy and the disks are shown with their legacy device names. To change this use again the vxddladm command.
root@robin:~# vxddladm set namingscheme=osn mode=new
The parameter used are namingscheme and mode. The available option for the first are:
- ebn – Enclosure based names.
- osn – Operative system names.
If ebn is used neither legacy mode nor new mode can be set since hardware names provided by the disk array will be used so use osn as namingscheme.
The second parameter is mode and of course defines which naming model will be used in the osn naming scheme. The following three values can be set:
- default
- legacy
- new
Now check the chancge by executing vxdisk and vxddladm commands.
root@robin:~# vxdisk list DEVICE TYPE DISK GROUP STATUS disk4_p2 auto:LVM - - LVM disk6 auto:LVM - - LVM disk8 auto:cdsdisk labdg01 labdg online disk10 auto:cdsdisk labdg02 labdg online disk12 auto:cdsdisk labdg03 labdg online disk14 auto:none - - online invalid disk16 auto:none - - online invalid disk18 auto:none - - online invalid disk20_p2 auto:hpdisk rootdisk01 rootdg online disk22_p2 auto:hpdisk rootdisk02 rootdg online root@robin:~# root@robin:~# vxddladm get namingscheme NAMING_SCHEME PERSISTENCE MODE =============================================== OS Native Yes New root@robin:~#
Of course the naming scheme can be set back to the legacy scheme using the same procedure.
Juanma.
Identifying the HP EVA LUNs on HP-UX 11iv3
Yesterday’s post about CLARiiON reminded me a similar issue I observed when the storage array is an HP EVA. If you ask for the disk serial number with scsimgr you always get the same number, in fact this number is the serial of the HSV controller.
The key to match your disk in the HP-UX host with the LUN provided by the EVA arrays is the wwid attribute of the disk.
root@ignite:/ # scsimgr get_attr -D /dev/rdisk/disk10 -a wwid
SCSI ATTRIBUTES FOR LUN : /dev/rdisk/disk10
name = wwid
current = 0x600508b40006cb700000600008bb0000
default =
saved =
root@ignite:/ #
If you look for this value in Command View will see that is the same as the World Wide LUN Name and the UUID.
### UPDATE ###
Thanks to my friend Jean and to Greg who reminded me that like Greg said in his comment is much easier to match the Word Wide LUN Name with the evainfo tool. Thanks to both of you :-)
root@hpux-server # evainfo -aP Devicefile Array WWNN Capacity Controller/Port/Mode /dev/rdisk/disk20 5001-4380-04C7-2D90 6005-08B4-000F-3EED-0000-5000-003A-0000 204800MB Ctl-A/FP-2/Optimized /dev/rdisk/disk21 5001-4380-04C7-2D90 6005-08B4-000F-3EED-0000-5000-0042-0000 204800MB Ctl-A/FP-1/Optimized /dev/rdisk/disk22 5001-4380-04C7-2D90 6005-08B4-000F-3EED-0000-5000-004A-0000 20480MB Ctl-A/FP-1/Optimized /dev/rdisk/disk23 5001-4380-04C7-2D90 6005-08B4-000F-3EED-0000-5000-004E-0000 71680MB Ctl-A/FP-2/Optimized /dev/rdisk/disk24 5001-4380-04C7-2D90 6005-08B4-000F-3EED-0000-5000-0052-0000 10240MB Ctl-A/FP-1/Optimized /dev/rdisk/disk25 5001-4380-04C7-2D90 6005-08B4-000F-3EED-0000-5000-0056-0000 10240MB Ctl-A/FP-1/Optimized /dev/rdisk/disk26 5001-4380-04C7-2D90 6005-08B4-000F-3EED-0000-5000-005A-0000 20480MB Ctl-A/FP-1/Optimized /dev/rdisk/disk27 5001-4380-04C7-2D90 6005-08B4-000F-3EED-0000-5000-005E-0000 245760MB Ctl-A/FP-1/Optimized
Where can I get EVAinfo? Like Greg said EVAinfo is distributed on the HP StorageWorks Storage System Scripting Utility CD (SSSU) since 8.0 version. Unfortunately I couldn’t find, yet, a public download URL but the CD is distributed with the hardware so if you own an EVA is probably you already have the media.
Thanks to Jean, man it seems that I owe you more than a couple of beers ;-D, here it is the URL of the CD. You will find the EVAinfo utility inside the HP StorageWorks Command View SSSU v9.2 software ISO.
https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=CommandViewEVA9.2
Juanma.
Howto identify the EMC LUN ID in HP-UX 11iv3 – CLARiiON arrays
In my previous post about EMC storage I showed a procedure to identify the ID of LUN presented to an 11iv3 host without Powerpath, which is not recommended to be installed on 11.31. I stated that I only did test the procedure with Symmetrix DMX arrays.
Jean Mesquida, a reader of this blog and a friend, tried the same procedure with CLARiiON cabinets and discovered that it didn’t work because the serial number attribute was the same for every disk. After that he performed some tests and provided a similar solution using to the EMC tool inquiry.
The inquiry utility can be downloaded in the following URL:
ftp://ftp.emc.com/pub/symm3000/inquiry/
Following are his results, all credit of this post goes to him I’m just publishing his work here. I also want to thank my friend Jesus at EMC who confirmed Jean’s procedure. Many thanks to both of you, without people like you this blog wouldn’t be possible :-)
And now the procedure:
Launch an inq against the CLARiiON array.
[hpux-server]root:/ #/usr/local/bin/inq -clariion Inquiry utility, Version V7.3-891 (Rev 2.0) (SIL Version V6.5.2.0 (Edit Level 891) Copyright (C) by EMC Corporation, all rights reserved. For help type inq -h. ................................................................ ------------------------------------------------------------------------------------------------- DEVICE :VEND :PROD :REV :SER NUM :CAP(kb) :VLU :CLUN:State ------------------------------------------------------------------------------------------------- ... /dev/rdsk/c7t0d1 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 83886080: 1: 2a:ASSIGNED /dev/rdsk/c7t0d2 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 83886080: 2: 2b:ASSIGNED /dev/rdsk/c7t0d3 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 5242880: 3: 2c:ASSIGNED /dev/rdsk/c7t0d4 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 5242880: 4: 2d:ASSIGNED /dev/rdsk/c7t0d5 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 5242880: 5: 2e:ASSIGNED /dev/rdsk/c7t0d6 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 5242880: 6: 2f:ASSIGNED /dev/rdsk/c7t0d7 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 419430400: 7: 30:ASSIGNED /dev/rdsk/c8t0d1 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 83886080: 1: 2a:ASSIGNED /dev/rdsk/c8t0d2 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 83886080: 2: 2b:ASSIGNED /dev/rdsk/c8t0d3 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 5242880: 3: 2c:ASSIGNED /dev/rdsk/c8t0d4 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 5242880: 4: 2d:ASSIGNED /dev/rdsk/c8t0d5 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 5242880: 5: 2e:ASSIGNED /dev/rdsk/c8t0d6 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 5242880: 6: 2f:ASSIGNED /dev/rdsk/c8t0d7 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 419430400: 7: 30:ASSIGNED /dev/rdsk/c9t0d1 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 83886080: 1: 2a:ASSIGNED /dev/rdsk/c9t0d2 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 83886080: 2: 2b:ASSIGNED /dev/rdsk/c9t0d3 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 5242880: 3: 2c:ASSIGNED /dev/rdsk/c9t0d4 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 5242880: 4: 2d:ASSIGNED /dev/rdsk/c9t0d5 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 5242880: 5: 2e:ASSIGNED /dev/rdsk/c9t0d6 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 5242880: 6: 2f:ASSIGNED /dev/rdsk/c9t0d7 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 419430400: 7: 30:ASSIGNED /dev/rdsk/c10t0d1 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 83886080: 1: 2a:ASSIGNED /dev/rdsk/c10t0d2 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 83886080: 2: 2b:ASSIGNED /dev/rdsk/c10t0d3 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 5242880: 3: 2c:ASSIGNED /dev/rdsk/c10t0d4 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 5242880: 4: 2d:ASSIGNED /dev/rdsk/c10t0d5 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 5242880: 5: 2e:ASSIGNED /dev/rdsk/c10t0d6 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 5242880: 6: 2f:ASSIGNED /dev/rdsk/c10t0d7 :DGC :CX4-240WDR5 :HP03 :Ch2 CONT : 419430400: 7: 30:ASSIGNED ...
We are going to use the last disk (c10t0d7). Take a look at the CLUN column, this column gives the LUN ID (0×30=48 for instance) on the Clariion array. So is Jean understanding, and I fully agree with him, that c10t0d7 disk match the 48 LUN on this CLARiiON array.
Finally, and to be more accurate, I modified the title of the other post to reflect that is only for Symmetrix arrays.
Juanma.
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.
New HP-UX release, new HPVM, new features… same odd naming convention
Last month HP released the last update of HP-UX 11iv3, the Update 6 or the March 2010 Update or 11.36… I decided some time ago to do not try to understand why we have a so stupid naming scheme for HP-UX.
Anyway, putting aside the philosophical rambling, HP-UX 11iv3 update 6 is here and it came full of new features. The following ones stand out, at least for me.
- Improved system boot time thanks to RCEnhancement, Oliver wrote about it several weeks ago, until this release it was available in the Software Depot and now is included in the install media.
- New DRD version capable of synchronize the clone with the running system.
- LVM updated to version 2.2. With this version we have logical volume snapshots, can’t wait to try this :-D, logical volume migration within the same VG through the new lvmove command and boot support for LVM 2.2 volume groups, this is very cool because until this release the vg00 was stuck in LVM 1.0. Ignite-UX have also been updated to take advantage of this feature and we’ll be asked to choose between LVM 1.0 and LVM 2.2 bootable volume groups.
This release comes bundled with the new HPVM version, the 4.2, which also adds a bunch of new features. To name a few.
- Automatic memory reallocation.
- Capacity of suspend and resume a guest.
- Support for CVM/CFS backing stores for HPVM Serviceguard cluster packages.
- Encryption of the data during Online VM migration.
- AVIO support for Veritas Volume Manager based backing stores.
In short, there are a lot of new interesting features, a lot issues have also been fixed and as I said at the beginning we still have to live with an odd naming scheme but in the end I’m quite happy with this new release at least in theory because I didn’t have the opportunity to try it yet but I will do very soon since I’m planning to deploy HPVM 4.2 in the near future. In fact my HPVM 3.5 to 4.1 migration project has become a 3.5 to 4.2 migration, how cool is that eh! ;-)
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.
Linux LVM commands in HP-UX
Some of the features I always liked about the Linux LVM2 implementation are the lvs, vgs and pvs command. with this simple commands a short list of the LVs, VGs and PVs active on the system can be obtained.
www04:~ # vgs VG #PV #LV #SN Attr VSize VFree vgwww01 1 6 0 wz--n- 39.75G 6.25G vgbbdd 3 3 0 wz--n- 94.25G 0 vgsys 1 6 0 wz--n- 34.74G 1.25G www04:~ #
In HP-UX there is nothing similar available, well since HP-UX 11.31 and LVM2 a “-F” option has been added to produce a formated, more script friendly list but is not very “human readable”.
[root@nfscl02] ~ # vgdisplay -vF vg00 vg_name=/dev/vg00:vg_write_access=read,write:vg_status=available:max_lv=255:cur_lv=9:open_lv=9:max_pv=16:cur_pv=1:act_pv=1:max_pe_per_pv=4353:vgda=2:pe_size=32:total_pe=4322:alloc_pe=1539:free_pe=2783:total_pvg=0:total_spare_pvs=0:total_spare_pvs_in_use=0:vg_version=1.0:vg_max_size=2228736m:vg_max_extents=69648 lv_name=/dev/vg00/lvol1:lv_status=available,syncd:lv_size=1856:current_le=58:allocated_pe=58:used_pv=1 lv_name=/dev/vg00/lvol2:lv_status=available,syncd:lv_size=8192:current_le=256:allocated_pe=256:used_pv=1 lv_name=/dev/vg00/lvol3:lv_status=available,syncd:lv_size=1504:current_le=47:allocated_pe=47:used_pv=1 lv_name=/dev/vg00/lvol4:lv_status=available,syncd:lv_size=512:current_le=16:allocated_pe=16:used_pv=1 lv_name=/dev/vg00/lvol5:lv_status=available,syncd:lv_size=8192:current_le=256:allocated_pe=256:used_pv=1 lv_name=/dev/vg00/lvol6:lv_status=available,syncd:lv_size=5024:current_le=157:allocated_pe=157:used_pv=1 lv_name=/dev/vg00/lvol7:lv_status=available,syncd:lv_size=5024:current_le=157:allocated_pe=157:used_pv=1 lv_name=/dev/vg00/lvol8:lv_status=available,syncd:lv_size=8704:current_le=272:allocated_pe=272:used_pv=1 lv_name=/dev/vg00/lv_crash:lv_status=available,syncd:lv_size=10240:current_le=320:allocated_pe=320:used_pv=1 pv_name=/dev/disk/disk1_p2:pv_status=available:total_pe=4322:free_pe=2783:autoswitch=On:proactive_polling=On [root@nfscl02] ~ #
Because of this I decided to write three scripts to emulate the behavior of vgs, lvs and pvs on my HP-UX servers. This scripts take advantage of the mentioned LVM2 “-F” switch so they will not work on HP-UX 11.23 or any other previous versions. If anyones recognize the “scripting” style is because I grab some parts of the code from Olivier’s ioscan_fc2.sh and adapted them to my needs so credit goes to him also :-)
- VGS: List the volume group on the /etc/lvmtab file, if the server is part of a cluster the volume groups active on other nodes will be showed as deactivated. With the “-v” switch single VGs can be queried.
root@cldpp01:~# ./vgs.sh VG PVs LVs Status Version VGSize Free vg00 1 9 available 1.0 135G 77G vgdpp 1 1 available,exclusive 1.0 49G 0G vgidbbck deactivated root@cldpp01:~# ./vgs.sh -v vgdpp VG PVs LVs Status Version VGSize Free vgdpp 1 1 available,exclusive 1.0 49G 0G root@cldpp01:~#
The code:
#!/sbin/sh
#
# vgs.sh - script to emulate the Linux LVM command vgs in HP-UX 11iv3
#
# (C) 2010 - Juan Manuel Rey (juanmanuel.reyportal@gmail.com)
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
version="v0.1 2010/02/15"
function usage
{
echo
echo "VGS for HP-UX ${version}"
echo
echo "Usage: vgs [-v vg_name]"
echo
exit 1
}
if [ ! "$(uname -r)" = "B.11.31" ]
then
echo "VGS for HP-UX only works on HP-UX 11iv3"
exit 1
fi
if [ "$1" ]
then
case "$1" in
-v) shift; [ "$1" = "" ] && usage || vg_name=${1};;
*) usage;;
esac
fi
vg_display="vgdisplay -F"
[ ! "${vg_name}" = "" ] && vg_display="vgdisplay -F ${vg_name}"
printf "%-10s %-5s %-5s %-20s %-8s %-6s %-5s\n" VG PVs LVs Status Version VGSize Free
eval ${vg_display} | while IFS=":" read vgdisplay
do
echo ${vgdisplay} | cut -d ":" -f 2 | cut -d "=" -f 2 | read status
if [ "${status}" = "deactivated" ]
then
status=deactivated
vg_size=""
vg_free=""
else
echo ${vgdisplay} | cut -d ":" -f 3 | cut -d "=" -f 2 | read status
echo ${vgdisplay} | cut -d ":" -f 13 | cut -d "=" -f 2 | read total_pe
echo ${vgdisplay} | cut -d ":" -f 12 | cut -d "=" -f 2 | read pe_size
echo ${vgdisplay} | cut -d ":" -f 15 | cut -d "=" -f 2 | read free_pe
vg_size="`/usr/bin/expr $total_pe \* $pe_size / 1024`G"
vg_free="`/usr/bin/expr $free_pe \* $pe_size / 1024`G"
fi
echo ${vgdisplay} | cut -d ":" -f 1 | cut -d "=" -f 2 | cut -d "/" -f 3 | read vg_name
echo ${vgdisplay} | cut -d ":" -f 8 | cut -d "=" -f 2 | read pvs
echo ${vgdisplay} | cut -d ":" -f 5 | cut -d "=" -f 2 | read lvs
echo ${vgdisplay} | cut -d ":" -f 19 | cut -d "=" -f 2 | read version
printf "%-10s %-5s %-5s %-20s %-8s %-6s %-5s\n" "${vg_name}" "${pvs}" "${lvs}" "${status}" "${version}" "${vg_size}" "${vg_free}"
done
- LVS: Like its Linux counterpart shows a list with every active logical volume. As in vgs with the -v switch you can ask the list of a specific volume group.
root@asoka:/# ./lvs.sh -v vg00 LV VG Status LVSize Permissions Mirrors Stripes Allocation lvol1 vg00 available,syncd 1G read,write 0 0 strict,contiguous lvol2 vg00 available,syncd 8G read,write 0 0 strict,contiguous lvol3 vg00 available,syncd 1G read,write 0 0 strict,contiguous lvol4 vg00 available,syncd 0G read,write 0 0 strict lvol5 vg00 available,syncd 20G read,write 0 0 strict lvol6 vg00 available,syncd 1G read,write 0 0 strict lvol7 vg00 available,syncd 5G read,write 0 0 strict lvol8 vg00 available,syncd 20G read,write 0 0 strict lv_crash vg00 available,syncd 9G read,write 0 0 strict root@asoka:/#
The code:
#!/sbin/sh
#
# lvs.sh - script to emulate the Linux LVM command lvs in HP-UX 11iv3
#
# (C) 2010 - Juan Manuel Rey (juanmanuel.reyportal@gmail.com)
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
version="v0.1 2010/02/15"
function usage
{
echo
echo "LVS for HP-UX ${version}"
echo
echo "Usage: lvs [-v vg_name]"
echo
exit 1
}
if [ ! "$(uname -r)" = "B.11.31" ]
then
echo "LVS for HP-UX only works on HP-UX 11iv3"
exit 1
fi
if [ "$1" ]
then
case "$1" in
-v) shift; [ "$1" = "" ] && usage || vg_name=${1};;
*) usage;;
esac
fi
lv_list="vgdisplay -vF | grep lv_name"
[ ! "${vg_name}" = "" ] && lv_list="vgdisplay -vF ${vg_name} | grep lv_name"
printf "%-30s %-12s %-17s %-6s %-10s %-7s %-8s %-8s %-7s\n" LV VG Status LVSize Permissions Mirrors Stripes Allocation
eval ${lv_list} | while IFS=":" read lvlist
do
echo ${lvlist} | cut -d ":" -f 1 | cut -d "/" -f 4 | read lv_name
echo ${lvlist} | cut -d ":" -f 1 | cut -d "=" -f 2 | read lv_long_name
lvdisplay -F ${lv_long_name} | cut -d ":" -f 2 | cut -d "/" -f 3 | read vg_name
lvdisplay -F ${lv_long_name} | cut -d ":" -f 4 | cut -d "=" -f 2 | read lv_status
lvdisplay -F ${lv_long_name} | cut -d ":" -f 3 | cut -d "=" -f 2 | read lv_perm
lvdisplay -F ${lv_long_name} | cut -d ":" -f 5 | cut -d "=" -f 2 | read lv_mirrors
lvdisplay -F ${lv_long_name} | cut -d ":" -f 11 | cut -d "=" -f 2 | read lv_stripes
lvdisplay -F ${lv_long_name} | cut -d ":" -f 14 | cut -d "=" -f 2 | read lv_allocation
lvdisplay -F ${lv_long_name} | cut -d ":" -f 8 | cut -d "=" -f 2 | read size_megs
lv_size="`/usr/bin/expr $size_megs / 1024`G"
printf "%-30s %-12s %-17s %-6s %-17s %-7s %-2s %-5s\n" "${lv_name}" "${vg_name}" "${lv_status}" "${lv_size}" "${lv_perm}" "${lv_mirrors}" "${lv_stripes}" "${lv_allocation}"
done
- PVS: And now the last one. List the activated physical volumes, if a VGs is not active on the current node its PVs wouldn’t be shown. Like in pvs and vgs there is a “-v” switch.
root@oracle:~# ./pvs.sh PV VG Status PVSize Free /dev/disk/disk1_p2 vg00 available 135G 48G /dev/disk/disk28 vgora available 1G 0G /dev/disk/disk29 vgora available 5G 0G /dev/disk/disk30 vgora available 3G 0G /dev/disk/disk31 vgora available 51G 1G /dev/disk/disk32 vgora available 1G 0G /dev/disk/disk37 vgora available 3G 0G /dev/disk/disk38 vgora available 6G 0G /dev/disk/disk43 vgoracli available 3G 0G /dev/disk/disk119 vgoracli available 2G 0G root@oracle:~#
And the code:
#!/sbin/sh
#
# pvs.sh - script to emulate the Linux LVM command pvs in HP-UX 11iv3
#
# (C) 2010 - Juan Manuel Rey (juanmanuel.reyportal@gmail.com)
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
version="v0.1 2010/02/15"
function usage
{
echo
echo "PVS for HP-UX ${version}"
echo
echo "Usage: pvs [-v vg_name]"
echo
exit 1
}
if [ ! "$(uname -r)" = "B.11.31" ]
then
echo "PVS for HP-UX only works on HP-UX 11iv3"
exit 1
fi
if [ "$1" ]
then
case "$1" in
-v) shift; [ "$1" = "" ] && usage || vg_name=${1};;
*) usage;;
esac
fi
pv_list="vgdisplay -vF | grep disk"
[ ! "${vg_name}" = "" ] && pv_list="vgdisplay -vF ${vg_name} | grep disk"
printf "%-20s %-10s %-20s %-6s %-5s\n" PV VG Status PVSize Free
eval ${pv_list} | while IFS=":" read pvlist
do
echo ${pvlist} | cut -d ":" -f 1 | cut -d "=" -f 2 | read pv_name
pvdisplay -F ${pv_name} | cut -d ":" -f 2 | cut -d "=" -f 2 | cut -d "/" -f 3 | read vg_name
pvdisplay -F ${pv_name} | cut -d ":" -f 3 | cut -d "=" -f 2 | read status
pvdisplay -F ${pv_name} | cut -d ":" -f 8 | cut -d "=" -f 2 | read total_pe
pvdisplay -F ${pv_name} | cut -d ":" -f 7 | cut -d "=" -f 2 | read pe_size
pvdisplay -F ${pv_name} | cut -d ":" -f 9 | cut -d "=" -f 2 | read free_pe
pv_size="`/usr/bin/expr $total_pe \* $pe_size / 1024`G"
pv_free="`/usr/bin/expr $free_pe \* $pe_size / 1024`G"
printf "%-20s %-10s %-20s %-6s %-5s\n" "${pv_name}" "${vg_name}" "${status}" "${pv_size}" "${pv_free}"
done
As always any comments, corrections and/or suggestions are welcome.
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
Configuring APA
Long time since my last post, Christmas you know ;-) BTW Merry Christmas and Happy New Year to all of you.
During this weeks I’ve been configuring APA failover groups in some of my blades and I thought It would be interesting to post how I did it. There are two ways to configure APA in HP-UX 11.31, through the SMH and with the nwmgr command. The screenshots are in Spanish since this is how the SMH of my servers are configured.
- SMH:
Log into the server SMH and go to Tools -> Network Interface Configuration -> Auto Port Aggregation.
Now click on Create Failover Group and select the interfaces to add, you can also configure the advanced parameters for the group, when you’re done click OK to finish the operation.
Now in the main page of APA the new group will be shown instead of the LAN interfaces the are part of the group:
And this is it, the new APA Failover Group is configured and completely transparent to the users. From this point you can show the information about the newly created APA interface.
- NWMGR command:
The nwmgr command has replaced the old lanscan, lanadmin and linkloop commands in 11.31. I have to say that I prefer this way instead of the SMH one to do any APA or LAN related tasks. SMH require the 2301 and 2381 ports to be open and accessible and this is not always possible mainly because security policies but to use nwmgr you only need access to the server through SSH.
To begin show the current configuration:
[root@ignite] ~ # nwmgr -g Name/ Interface Station Sub- Interface Related ClassInstance State Address system Type Interface ============== ========= ============== ======== ============== ========= lan2 DOWN 0x001E0B45E09A igelan 1000Base-SX lan0 UP 0x001E0B45E09C igelan 1000Base-SX lan900 lan1 UP 0x001E0B45E09D igelan 1000Base-SX lan900 lan3 DOWN 0x001E0B45E09B igelan 1000Base-SX lan900 UP 0x001E0B45E09C hp_apa hp_apa lan901 DOWN 0x000000000000 hp_apa hp_apa lan902 DOWN 0x000000000000 hp_apa hp_apa lan903 DOWN 0x000000000000 hp_apa hp_apa lan904 DOWN 0x000000000000 hp_apa hp_apa [root@ignite] ~ # nwmgr -g -S apa Class Mode Load Speed- Membership Instance Balancing Duplex ======== =========== ========= ==================== =========================== lan900 Not_Enabled LB_MAC 0 Mbps - lan901 Not_Enabled LB_MAC 0 Mbps - lan902 Not_Enabled LB_MAC 0 Mbps - lan903 Not_Enabled LB_MAC 0 Mbps - lan904 Not_Enabled LB_MAC 0 Mbps - [root@ignite] ~ #
Now proceed with the creation of the new failover group:
[root@ignite] ~ # nwmgr -a -S apa -c lan900 -A links=0,1 -A mode=LAN_MONITOR Addition of links 0, 1 to lan900 succeeded. [root@ignite] ~ # nwmgr -s -S apa -A all --saved --from cu [root@ignite] ~ #
Specific advanced parameters can also be set, in the example I used the parameters rapid_arp_count and poll_interval:
[root@ignite] / # nwmgr -a -S apa -c lan901 -A links=2,1,3 -A mode=LAN_MONITOR -A rapid_arp_count=5 -A poll_interval=0,500000 Addition of links 0, 1 to lan900 succeeded. [root@ignite] / # nwmgr -s -S apa -A all --saved --from cu [root@ignite] / #
To show the new config:
[root@ignite] ~ # nwmgr -g Name/ Interface Station Sub- Interface Related ClassInstance State Address system Type Interface ============== ========= ============== ======== ============== ========= lan2 DOWN 0x001E0B45E09A igelan 1000Base-SX lan0 UP 0x001E0B45E09C igelan 1000Base-SX lan900 lan1 UP 0x001E0B45E09D igelan 1000Base-SX lan900 lan3 DOWN 0x001E0B45E09B igelan 1000Base-SX lan900 UP 0x001E0B45E09C hp_apa hp_apa lan901 DOWN 0x000000000000 hp_apa hp_apa lan902 DOWN 0x000000000000 hp_apa hp_apa lan903 DOWN 0x000000000000 hp_apa hp_apa lan904 DOWN 0x000000000000 hp_apa hp_apa [root@ignite] ~ # netstat -ni Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll lo0 32808 127.0.0.0 127.0.0.1 10100925 0 10100956 0 0 lan900 1500 10.31.4.0 10.31.4.37 256 0 92 0 0 [root@ignite] ~ # [root@ignite] ~ # nwmgr -g -S apa Class Mode Load Speed- Membership Instance Balancing Duplex ======== =========== ========= ==================== =========================== lan900 LAN_MONITOR LB_HS 1 Gbps Full Duplex 0,1 lan901 Not_Enabled LB_MAC 0 Mbps - lan902 Not_Enabled LB_MAC 0 Mbps - lan903 Not_Enabled LB_MAC 0 Mbps - lan904 Not_Enabled LB_MAC 0 Mbps - [root@ignite] ~ # [root@ignite] ~ # nwmgr -S apa -I 900 Class Parent APA Mode Load Membership Instance PPA State Balancing ======== ====== =========== =========== ========= ============================= lan900 - Up LAN_MONITOR LB_HS 0,1 [root@ignite] ~ # [root@ignite] ~ # nwmgr -g -S apa -I 900 -v lan900 current values: Speed = 1 Gbps Full Duplex MTU = 1500 Virtual Maximum Transmission Unit = 0 MAC Address = 0x001e0b45e09c Network Management ID = 6 Features = Linkagg Interface IPV4 Recv CKO IPV4 Send CKO VLAN Support VLAN Tag Offload 64Bit MIB Support Load Distribution Algorithm = LB_HS Mode = LAN_MONITOR Parent PPA = - APA State = Up Membership = 0,1 Active Port(s) = 0 Ready Port(s) = 1 Not Ready Port(s) = - Connected Port(s) = 1 Polling Interval = 10000000 Dead Count = 3 Rapid ARP = on Rapid ARP Interval = 1.0 second(s) Rapid ARP Count = 10 Failover Policy = PRIORITY_BASED [root@ignite] ~ # ifconfig lan900 lan900: flags=1843<UP,BROADCAST,RUNNING,MULTICAST,CKO> inet 10.31.4.37 netmask ffffff00 broadcast 10.31.4.255 [root@ignite] ~ #
If you want to delete an existent failover group:
[root@ignite] ~ # nwmgr -d -S apa -A links=all -c lan900 --force Deletion of links all ports from lan900 succeeded. [root@ignite] ~ # nwmgr -s -S apa -A all --saved --from cu [root@ignite] ~ #
Or if you just want to remove a interface from the group:
[root@ignite] ~ # nwmgr -d -S apa -c lan901 -A links=1
And we are finished, I still have 11.23 systems and I want APA for them too so I will post how to do it with the lanadmin command.
See you next time.
Juanma.







