Archive
HPUX-admin mailing list closing. Is the end of an era.
Today I received a mail from the HP-UX Admin mailing list. The subject was “[HPADM] final message, list shutting down permanently” and the body contained the following message:
“dear all,
i truly regret that i have to announce the end of operations of the “hpux-admin” mailing list as you all have known it for a long time.
The last few years i have virtually lost all support for this activity from management. No surprise there, as there are almost no HP-UX systems remaining in use within my organization. And now i am more or less ‘ordered’ to shutdown, because the location of the system(s) will no longer be available. It was a converted office room and will be converted back to normal office space shortly.
This, combined with the fact that traffic on the list has decreased to almost zero, has prompted me to take the inevitable decision and ‘pull the plug’ …
[HPADM] closing down …”
Must admit that the lack of traffic is completely true, the last year no more than a couple of dozens messages were sent to the list. But that fact doesn’t ease the pain of losing one of the few resources about HP-UX “out there” and one of the oldest. My personal gratitude and recognition to Bart Muyzer who has been running the list all these years.
It seems that the old mailing lists have no place in the 2.0 new world. Is the end of an era… not sure if I would like it.
Juanma.
Mapping VLAN to ports in HPVM
Long time since my last post about HP Integrity Virtual Machines, well you know I’ve been very occupied with vSphere and Linux but that doesn’t mean that I completely eliminate HP-UX from my life, on the contrary… HP-UX ROCKS! :-D
This is just a quick post on how to map a specific port of virtual switch to a specific VLAN. First retrieve the configuration of the vswitch.
[root@hpvmhost] ~ # hpvmnet -S devlan12 Name Number State Mode NamePPA MAC Address IP Address ======== ====== ======= ========= ======== ============== =============== devlan12 3 Up Shared lan4 0x000cfc0046b9 10.1.1.99 [Port Configuration Details] Port Port Port Untagged Number of Active VM Number State Adaptor VLANID Reserved VMs ======= ============ ======== ======== ============ ============ 1 Active lan none 1 oradev01 2 Active lan none 1 oradev02 3 Active lan none 1 oradev03 4 Active lan none 1 oradev04 5 Active lan none 1 nfstest01 6 Active lan none 1 linuxvm1 7 Active lan none 1 linuxvm2 [root@hpvmhost] ~ #
We are going to map the port 5 to the VLAN 120 in order to isolate the traffic of that NFS server from the other virtual machines that aren’t on the same VLAN. Again the command to use is hpmvnet.
[root@hpvmhost] ~ # hpvmnet -S devlan12 -u portid:5:vlanid:120
If you display again the HPVM network configuration for the devlan12 vswitch the change will appear under the Untagged VLANID column.
[root@hpvmhost] ~ # hpvmnet -S devlan12 Name Number State Mode NamePPA MAC Address IP Address ======== ====== ======= ========= ======== ============== =============== devlan12 3 Up Shared lan4 0x000cfc0046b9 10.1.1.99 [Port Configuration Details] Port Port Port Untagged Number of Active VM Number State Adaptor VLANID Reserved VMs ======= ============ ======== ======== ============ ============ 1 Active lan none 1 oradev01 2 Active lan none 1 oradev02 3 Active lan none 1 oradev03 4 Active lan none 1 oradev04 5 Active lan 120 1 nfstest01 6 Active lan none 1 linuxvm1 7 Active lan none 1 linuxvm2 [root@hpvmhost] ~ #
Juanma.
LVM and file system basics in HP-UX & Linux
Now that my daily work is more focused on Linux I found myself performing the same basic administration tasks in Linux that I’m used to do in HP-UX. Because of that I thought that a post explaining how the same basic file system and volume management operations are done in both operative systems was necessary, hope you like it :-)
This is going to be a very basic post intended only as a reference for myself and any other Sysadmin coming from either Linux or HP-UX that wants to know how things are done in the other side. Of course this post is no substitute of the official documentation and the corresponding man pages.
I used Red Hat Enterprise Linux 5.5 as the Linux version and 11iv3 as the HP-UX version.
The follwing topics will covered:
- Volume group creation.
- Logical volume operations.
- File system operations.
Volume group creation
Physical volume and volume group creation are the most basic tasks in LVM, both in Linux and HP-UX, but although command syntax is quite similar in both operative systems the whole process differs in many ways.
- HP-UX:
The example used is valid to 11iv2 and 11iv3 HP-UX versions, with the exception of the persistent DSFs you will have to substitute them for the corresponding legacy devices used in 11iv2.
First create the physical volumes.
root@hp-ux:/# pvcreate -f /dev/rdisk/disk10 Physical volume "/dev/rdisk/disk10" has been successfully created. root@hp-ux:/# root@hp-ux:/# pvcreate -f /dev/rdisk/disk11 Physical volume "/dev/rdisk/disk11" has been successfully created. root@hp-ux:/#
In /dev create a directory named as the new volume group, change the ownership to root:root and the permissions ot 755.
root@hp-ux:/# mkdir -p /dev/vg_new root@hp-ux:/# chown root:root /dev/vg_new root@hp-ux:/# chmod 755 /dev/vg_new
Go into the VG subdirectory and create the group device special file. For the Linux guys, in HP-UX each volume group must have a group device special file under its subdirectory in /dev. This group DSF is created with the mknod command, like any other DSFs the group file must have a major and a minor number.
For LVM 1.0 volume groups the major number must be 64 and for the LVM 2.0 one must be 128. Regarding the minor number, the first two digits will uniquely identify the volume group and the remaining digits must be 0000. In the below example we’re creating a 1.0 volume group.
root@hp-ux:/dev/vg_new# mknod group c 64 0x010000
Change the ownership to root:sys and the permissions to 640.
root@hp-ux:/dev/vg_new# chown root:sys group root@hp-ux:/dev/vg_new# chmod 640 group
And create the volume group with the vgcreate command, the arguments passed are the two physical volumes previously created and the size in megabytes of the physical extent. The last one is optional and if is not provided the default of 4MB will be automatically set.
root@hp-ux:/# vgcreate -s 16 vg_new /dev/disk/disk10 /dev/disk/disk11 Volume group "/dev/vg_new" has been successfully created. Volume Group configuration for /dev/vg_new has been saved in /etc/lvmconf/vg_new.conf root@hp-ux:/# root@hp-ux:/# vgdisplay -v vg_new --- Volume groups --- VG Name /dev/vg_new VG Write Access read/write VG Status available Max LV 255 Cur LV 0 Open LV 0 Max PV 16 Cur PV 2 Act PV 2 Max PE per PV 6000 VGDA 2 PE Size (Mbytes) 16 Total PE 26 Alloc PE 0 Free PE 26 Total PVG 0 Total Spare PVs 0 Total Spare PVs in use 0 --- Physical volumes --- PV Name /dev/disk/disk10 PV Status available Total PE 13 Free PE 13 Autoswitch On PV Name /dev/disk/disk11 PV Status available Total PE 13 Free PE 13 Autoswitch On root@hp-ux:/#
- Linux:
Create the physical volumes. Here it is where the first difference appears. In HP-UX a physical volume is composed by a whole disk, with the exception of boot disks in Itanium systems, but in Linux a physical volume can be a whole disk or a partition.
For the whole disk the process is pretty much the same as in HP-UX.
[root@rhel /]# pvcreate -f /dev/sdb Physical volume "/dev/sdb" successfully created [root@rhel /]# pvdisplay /dev/sdb "/dev/sdb" is a new physical volume of "204.00 MB" --- NEW Physical volume --- PV Name /dev/sdb VG Name PV Size 204.00 MB Allocatable NO PE Size (KByte) 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID Ngyz7I-Z2hL-8R3b-hzA3-qIVc-tZuY-DbCBYn [root@rhel /]#
If you decide to use partitions for the PVs the first, and obvious, thing to do is partition the disk. To setup the disk we’ll use the fdisk tool, following is an example session:
[root@rhel /]# fdisk /dev/sdc Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-204, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-204, default 204): Using default value 204 Command (m for help): t Selected partition 1 Hex code (type L to list codes): 8e Changed system type of partition 1 to 8e (Linux LVM) Command (m for help): p Disk /dev/sdc: 213 MB, 213909504 bytes 64 heads, 32 sectors/track, 204 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Device Boot Start End Blocks Id System /dev/sdc1 1 204 208880 8e Linux LVM Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. [root@rhel /]#
To explain the session first a new partition is created with the command n and the size of the partition is set (in this particular case we are using the whole disk); then we must change the partition type, which by default is set to Linux, to Linux LVM and to do that we use the command t and issue 8e as the corresponding hexadecimal code, the available values for the partition types can be shown by typing L.
Command (m for help): t Selected partition 1 Hex code (type L to list codes): L 0 Empty 1e Hidden W95 FAT1 80 Old Minix bf Solaris 1 FAT12 24 NEC DOS 81 Minix / old Lin c1 DRDOS/sec (FAT- 2 XENIX root 39 Plan 9 82 Linux swap / So c4 DRDOS/sec (FAT- 3 XENIX usr 3c PartitionMagic 83 Linux c6 DRDOS/sec (FAT- 4 FAT16 <32M 40 Venix 80286 84 OS/2 hidden C: c7 Syrinx 5 Extended 41 PPC PReP Boot 85 Linux extended da Non-FS data 6 FAT16 42 SFS 86 NTFS volume set db CP/M / CTOS / . 7 HPFS/NTFS 4d QNX4.x 87 NTFS volume set de Dell Utility 8 AIX 4e QNX4.x 2nd part 88 Linux plaintext df BootIt 9 AIX bootable 4f QNX4.x 3rd part 8e Linux LVM e1 DOS access a OS/2 Boot Manag 50 OnTrack DM 93 Amoeba e3 DOS R/O b W95 FAT32 51 OnTrack DM6 Aux 94 Amoeba BBT e4 SpeedStor c W95 FAT32 (LBA) 52 CP/M 9f BSD/OS eb BeOS fs e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a0 IBM Thinkpad hi ee EFI GPT f W95 Ext'd (LBA) 54 OnTrackDM6 a5 FreeBSD ef EFI (FAT-12/16/ 10 OPUS 55 EZ-Drive a6 OpenBSD f0 Linux/PA-RISC b 11 Hidden FAT12 56 Golden Bow a7 NeXTSTEP f1 SpeedStor 12 Compaq diagnost 5c Priam Edisk a8 Darwin UFS f4 SpeedStor 14 Hidden FAT16 <3 61 SpeedStor a9 NetBSD f2 DOS secondary 16 Hidden FAT16 63 GNU HURD or Sys ab Darwin boot fb VMware VMFS 17 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fc VMware VMKCORE 18 AST SmartSleep 65 Novell Netware b8 BSDI swap fd Linux raid auto 1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid fe LANstep 1c Hidden W95 FAT3 75 PC/IX be Solaris boot ff BBT Hex code (type L to list codes):
The changes are written with w.
Once the partitions are correctly created, setup the physical volumes.
[root@rhel /]# pvcreate -f /dev/sdc1 Physical volume "/dev/sdc1" successfully created [root@rhel /]# pvcreate -f /dev/sdd1 Physical volume "/dev/sdd1" successfully created [root@rhel /]# [root@rhel /]# pvs PV VG Fmt Attr PSize PFree /dev/sda2 sysvg lvm2 a- 19.88G 0 /dev/sdb lvm2 -- 204.00M 204.00M /dev/sdc1 lvm2 -- 203.98M 203.98M /dev/sdd1 lvm2 -- 203.98M 203.98M [root@rhel /]#
Now that the PVs are created we can proceed with the volume group creation.
[root@rhel /]# vgcreate vg_new /dev/sdc1 /dev/sdd1 Volume group "vg_new" successfully created [root@rhel /]# vgdisplay -v vg_new Using volume group(s) on command line Finding volume group "vg_new" /dev/hdc: open failed: No medium found --- Volume group --- VG Name vg_new System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 1 VG Access read/write VG Status resizable MAX LV 0 Cur LV 0 Open LV 0 Max PV 0 Cur PV 2 Act PV 2 VG Size 400.00 MB PE Size 4.00 MB Total PE 100 Alloc PE / Size 0 / 0 Free PE / Size 100 / 400.00 MB VG UUID lvrrnt-sHbo-eC8j-kC53-Mm5Z-IDDR-RJJtDr --- Physical volumes --- PV Name /dev/sdc1 PV UUID kD0jhk-ws8A-ke3L-a7nd-QucS-SAbH-BrmH28 PV Status allocatable Total PE / Free PE 50 / 50 PV Name /dev/sdd1 PV UUID ZP2bLy-FxR3-gYn9-3Dy1-Llgk-6mFI-1iJvTm PV Status allocatable Total PE / Free PE 50 / 50 [root@rhel /]#
As you could see the process in Linux is slightly simple than in HP-UX.
Logical volume operations
In this part we will see how to create a logical volume, extend this LV and then remove it from the system.
- HP-UX:
The logical volume creation can be done with the lvcreate command. With the -L option we can specify the size in MB of the new lvol, if -l is used instead the size must be provided in logical extents.
root@hp-ux:/# lvcreate -n lvol_test -L 256 vg_new Logical volume "/dev/vg_new/lvol_test_S2" has been successfully created with character device "/dev/vg_new/rlvol_test_S2". Logical volume "/dev/vg_new/lvol_test_S2" has been successfully extended. Volume Group configuration for /dev/vg_new has been saved in /etc/lvmconf/vg_new.conf root@hp-ux:~# lvdisplay /dev/vg_new/lvol_test --- Logical volumes --- LV Name /dev/vg_new/lvol_test VG Name /dev/vg_new LV Permission read/write LV Status available/syncd Mirror copies 0 Consistency Recovery MWC Schedule parallel LV Size (Mbytes) 256 Current LE 16 Allocated PE 16 Stripes 0 Stripe Size (Kbytes) 0 Bad block on Allocation strict IO Timeout (Seconds) default root@hp-ux:/#
Extend a volume. Of course the first prerequisite to extend a volume is to have enough free physical extends in the volume group.
root@hp-ux:~# lvextend -L 384 /dev/vg_new/lvol_test Logical volume "/dev/vg_new/lvol_test" has been successfully extended. Volume Group configuration for /dev/vg_new has been saved in /etc/lvmconf/vg_new.conf root@hp-ux:~# root@hp-ux:~# lvdisplay /dev/vg_new/lvol_test --- Logical volumes --- LV Name /dev/vg_new/lvol_test VG Name /dev/vg_new LV Permission read/write LV Status available/syncd Mirror copies 0 Consistency Recovery MWC Schedule parallel LV Size (Mbytes) 384 Current LE 24 Allocated PE 24 Stripes 0 Stripe Size (Kbytes) 0 Bad block on Allocation strict IO Timeout (Seconds) default root@hp-ux:/#
The final step of this part is to remove the logical volume.
root@hp-ux:/# lvremove /dev/vg_new/lvol_test The logical volume "/dev/vg_new/lvol_test" is not empty; do you really want to delete the logical volume (y/n) : y Logical volume "/dev/vg_new/lvol_test" has been successfully removed. Volume Group configuration for /dev/vg_new has been saved in /etc/lvmconf/vg_new.conf root@hp-ux:/#
- Linux:
Create the logical volume with the lvcreate command, the most basic options (-L, -l, -n) are the same as in HP-UX.
[root@rhel /]# lvcreate -n lv_test -L 256 vg_new Logical volume "lv_test" created [root@rhel /]# lvdisplay /dev/vg_new/lv_test --- Logical volume --- LV Name /dev/vg_new/lv_test VG Name vg_new LV UUID m5G2vT-dsE1-CycS-BMYR-3MYZ-4y8O-Mx04B8 LV Write Access read/write LV Status available # open 0 LV Size 256.00 MB Current LE 16 Segments 2 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:6 [root@rhel /]#
Now extend the logical volume to 384 megabytes as we did in HP-UX.
[root@rhel /]# lvextend -L 384 /dev/vg_new/lv_test Extending logical volume lv_test to 384.00 MB Logical volume lv_test successfully resized [root@rhel /]# [root@rhel /]# lvdisplay /dev/vg_new/lv_test --- Logical volume --- LV Name /dev/vg_new/lv_test VG Name vg_new LV UUID m5G2vT-dsE1-CycS-BMYR-3MYZ-4y8O-Mx04B8 LV Write Access read/write LV Status available # open 0 LV Size 384.00 MB Current LE 24 Segments 2 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:6 [root@rhel /]#
Remove a volume from the system, like creation and extension is a very straight forward process that can be done with one command.
[root@rhel /]# lvremove /dev/vg_new/lv_test Do you really want to remove active logical volume lv_test? [y/n]: y Logical volume "lv_test" successfully removed [root@rhel /]#
Unlike the volume group section, the basic logical operations are performed in almost the same way in both operative systems. Of course if you want to perform mirroring the differences are bigger, but I will leave that for a future post.
File system operations
The final section of the post is about the basic file system operation, we are going to create a file system on the logical volume of the previous section and later to extend it, including this time the volume group extension.
- HP-UX:
Creating the file system with the newfs command.
root@hp-ux:/# newfs -F vxfs -o largefiles /dev/vg_new/rlvol_test version 7 layout 393216 sectors, 393216 blocks of size 1024, log size 1024 blocks largefiles supported root@hp-ux:/#
Create the mount point and mount the filesystem
root@hp-ux:/# mkdir /data root@hp-ux:/# mount /dev/vg_new/lvol_test /data
Filesystem extension, in the current section we are going to suppose that the volume group has not enough physical extension to accommodate the new size of the /data file system.
After we create a new physical volume in the disk12 we are going to extend the vg_new VG.
root@hp-ux:/# vgextend vg_new /dev/disk/disk12 Volume group "vg_new" has been successfully extended. Volume Group configuration for /dev/vg_new has been saved in /etc/lvmconf/vg_new.conf root@hp-ux:/# root@hp-ux:/# vgdisplay -v vg_new --- Volume groups --- VG Name /dev/vg_new VG Write Access read/write VG Status available Max LV 255 Cur LV 0 Open LV 0 Max PV 16 Cur PV 2 Act PV 2 Max PE per PV 6000 VGDA 2 PE Size (Mbytes) 16 Total PE 39 Alloc PE 24 Free PE 15 Total PVG 0 Total Spare PVs 0 Total Spare PVs in use 0 --- Logical volumes --- LV Name /dev/vg_mir/lv_sql LV Status available/syncd LV Size (Mbytes) 384 Current LE 24 Allocated PE 24 Used PV 2 --- Physical volumes --- PV Name /dev/disk/disk10 PV Status available Total PE 13 Free PE 13 Autoswitch On PV Name /dev/disk/disk11 PV Status available Total PE 13 Free PE 13 Autoswitch On PV Name /dev/disk/disk12 PV Status available Total PE 13 Free PE 13 Autoswitch On root@hp-ux:/#
The next part is to extend the logical volume just as we did in the logical volume operations section.
root@hp-ux:/# lvextend -L 512 /dev/vg_new/lvol_test Logical volume "/dev/vg_new/lvol_test" has been successfully extended. Volume Group configuration for /dev/vg_new has been saved in /etc/lvmconf/vg_new.conf root@hp-ux:~#
And finally the most creepy part of the part of the process, extending the file system. To be capable of extending a mounted filesystem in HP-UX the OnlineJFS bundle must be installed.
Use the command fsadm and with the -b option issue the new size in KB as the argument, in the example we want to extend to 512MB, in KB is 524288.
root@hp-ux:/# fsadm -F vxfs -b 524288 /data
vxfs fsadm: V-3-23585: /dev/vg00/rlvol5 is currently 7731200 sectors - size will be increased
root#hp-ux:/#
root@hp-ux:/# bdf /data
Filesystem kbytes used avail %used Mounted on
/dev/vg_new/lvol_test
524288 5243 524288 1% /data
root@hp-ux:/#
- Linux:
Here in the filesystem part is where the commands are completely different to HP-UX. In Linux the most common file system types are ext2 and ext3, although others like ext4 or reiserfs are supported.
To create an ext3 file system issue the command mkfs.ext3 using the logical volume to create the file system on as the argument.
[root@rhel ~]# mkfs.ext3 /dev/vg_new/lv_test
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
98304 inodes, 393216 blocks
19660 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67633152
48 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 35 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@rhel ~]#
As in HP-UX create the mount point and mount the file system.
[root@rhel ~]# mkdir /data
[root@rhel ~]# mount /dev/vg_new/lv_test /data
[root@rhel ~]# df -h /data
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_new-lv_test
372M 11M 343M 3% /data
[root@rhel ~]#
The final part of the section is the file system extension, as we did in the HP-UX part the first task is to extend the volume group.
[root@rhel ~]# vgextend vg_new /dev/sde1
Volume group "vg_new" successfully extended
[root@rhel ~]# vgdisplay -v vg_new
Using volume group(s) on command line
Finding volume group "vg_new"
--- Volume group ---
VG Name vg_new
System ID
Format lvm2
Metadata Areas 3
Metadata Sequence No 9
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 3
Act PV 3
VG Size 576.00 MB
PE Size 16.00 MB
Total PE 36
Alloc PE / Size 24 / 384.00 MB
Free PE / Size 12 / 192.00 MB
VG UUID u32c0h-BPGN-HixT-IzsX-cNnC-EspO-xfweaI
--- Logical volume ---
LV Name /dev/vg_new/lv_test
VG Name vg_new
LV UUID ZtArMo-Pyyl-BDHX-9CZQ-uEAK-VDqG-t60xy4
LV Write Access read/write
LV Status available
# open 1
LV Size 384.00 MB
Current LE 24
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:6
--- Physical volumes ---
PV Name /dev/sdc1
PV UUID kD0jhk-ws8A-ke3L-a7nd-QucS-SAbH-BrmH28
PV Status allocatable
Total PE / Free PE 12 / 0
PV Name /dev/sdd1
PV UUID ZP2bLy-FxR3-gYn9-3Dy1-Llgk-6mFI-1iJvTm
PV Status allocatable
Total PE / Free PE 12 / 0
PV Name /dev/sde1
PV UUID wbiNu5-csig-uwY7-y14y-3C8Q-oeN0-hAT49g
PV Status allocatable
Total PE / Free PE 12 / 12
[root@rhel ~]#
Extend the logical volume with lvextend.
[root@rhel ~]# lvextend -L 512 /dev/vg_new/lv_test Extending logical volume lv_test to 512.00 MB Logical volume lv_test successfully resized [root@rhel ~]# lvs LV VG Attr LSize Origin Snap% Move Log Copy% Convert lv_home sysvg -wi-ao 256.00M lv_root sysvg -wi-ao 5.84G lv_swap sysvg -wi-ao 1.00G lv_tmp sysvg -wi-ao 1.00G lv_usr sysvg -wi-ao 9.75G lv_var sysvg -wi-ao 2.03G lv_test vg_new -wi-ao 512.00M [root@rhel ~]#
Finally resize the file system, to do that use the resize2fs tool. Unlike in HP-UX with fsadm, that needs the new size as an argument in order to extend the file system, if you simply issue the logical volume as the argument the resize2fs utility will extend the file system to the maximum size available in the LV.
[root@rhel ~]# resize2fs /dev/vg_new/lv_test resize2fs 1.39 (29-May-2006) Filesystem at /dev/vg_new/lv_test is mounted on /data; on-line resizing required Performing an on-line resize of /dev/vg_new/lv_test to 524288 (1k) blocks. The filesystem on /dev/vg_new/lv_test is now 524288 blocks long. [root@rhel ~]#
And at this point we are done. Any comments are welcome as always :-)
Juanma.
Mirroring VxVM root disk group
Mirroring the root disk group of an HP-UX server is a very straightforward process that can be performed by simply use the vxrootmir command an use the new mirror’s disk as the argument. This handy utility will create and configure the boot and the VxVM structures and will mirror the volumes.
An example will explain better the whole process. Launch the mirroring operation.
root@robin:~# /etc/vx/bin/vxrootmir -v -b disk22 VxVM vxrootmir INFO V-5-2-2501 11:38: Gathering information on the current VxVM root configuration VxVM vxrootmir INFO V-5-2-2441 11:38: Checking specified disk(s) for usability VxVM vxrootmir INFO V-5-2-2566 11:38: Preparing disk disk22_p2 as a VxVM root disk VxVM vxrootmir INFO V-5-2-3766 11:38: Disk disk22_p2 is now EFI partitioned disk disk22_p2 VxVM vxrootmir INFO V-5-2-2410 11:38: Adding disk disk22_p2 to rootdg as DM rootdisk02 VxVM vxrootmir INFO V-5-2-1646 11:38: Mirroring all volumes on root disk VxVM vxrootmir INFO V-5-2-1648 11:38: Mirroring volume standvol VxVM vxrootmir INFO V-5-2-1648 11:39: Mirroring volume swapvol VxVM vxrootmir INFO V-5-2-1648 11:40: Mirroring volume rootvol VxVM vxrootmir INFO V-5-2-1648 11:40: Mirroring volume homevol VxVM vxrootmir INFO V-5-2-1648 11:40: Mirroring volume optvol VxVM vxrootmir INFO V-5-2-1648 11:43: Mirroring volume tmpvol VxVM vxrootmir INFO V-5-2-1648 11:43: Mirroring volume usrvol VxVM vxrootmir INFO V-5-2-1648 11:44: Mirroring volume varvol VxVM vxrootmir INFO V-5-2-1648 11:45: Mirroring volume crashvol VxVM vxrootmir INFO V-5-2-2462 11:46: Current setboot values: VxVM vxrootmir INFO V-5-2-2569 11:46: Primary: 0/0/0/0.0x8.0x0 /dev/rdisk/disk20 VxVM vxrootmir INFO V-5-2-2416 11:46: Alternate: 0/0/0/0.0x0.0x0 /dev/rdisk/disk4 VxVM vxrootmir INFO V-5-2-2551 11:46: Making mirror disk disk22 (/dev/rdisk/disk22) the alternate boot disk Alternate boot path set to 0/0/0/0.0x9.0x0 (/dev/rdisk/disk22) VxVM vxrootmir INFO V-5-2-1616 11:46: Disk disk22 is now a mirrored root disk root@robin:~#
After the mirror operation is finished verify the contents of the rootdg.
root@robin:~# vxprint -htg rootdg DG NAME NCONFIG NLOG MINORS GROUP-ID ST NAME STATE DM_CNT SPARE_CNT APPVOL_CNT DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK CO NAME CACHEVOL KSTATE STATE VT NAME RVG KSTATE STATE NVOLUME V NAME RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE SC NAME PLEX CACHE DISKOFFS LENGTH [COL/]OFF DEVICE MODE DC NAME PARENTVOL LOGVOL SP NAME SNAPVOL DCO EX NAME ASSOC VC PERMS MODE STATE SR NAME KSTATE dg rootdg default default 4466000 1276076559.38.robin dm rootdisk01 disk20_p2 auto 1024 40035232 - dm rootdisk02 disk22_p2 auto 1024 40035232 - v crashvol - ENABLED ACTIVE 4194304 SELECT - fsgen pl crashvol-01 crashvol ENABLED ACTIVE 4194304 CONCAT - RW sd rootdisk01-09 crashvol-01 rootdisk01 28778496 4194304 0 c0t8d0s2 ENA pl crashvol-02 crashvol ENABLED ACTIVE 4194304 CONCAT - RW sd rootdisk02-09 crashvol-02 rootdisk02 28778496 4194304 0 c0t9d0s2 ENA v homevol - ENABLED ACTIVE 155648 SELECT - fsgen pl homevol-01 homevol ENABLED ACTIVE 155648 CONCAT - RW sd rootdisk01-04 homevol-01 rootdisk01 7077888 155648 0 c0t8d0s2 ENA pl homevol-02 homevol ENABLED ACTIVE 155648 CONCAT - RW sd rootdisk02-04 homevol-02 rootdisk02 7077888 155648 0 c0t9d0s2 ENA v optvol - ENABLED ACTIVE 9560064 SELECT - fsgen pl optvol-01 optvol ENABLED ACTIVE 9560064 CONCAT - RW sd rootdisk01-05 optvol-01 rootdisk01 7233536 9560064 0 c0t8d0s2 ENA pl optvol-02 optvol ENABLED ACTIVE 9560064 CONCAT - RW sd rootdisk02-05 optvol-02 rootdisk02 7233536 9560064 0 c0t9d0s2 ENA v rootvol - ENABLED ACTIVE 1048576 SELECT - root pl rootvol-01 rootvol ENABLED ACTIVE 1048576 CONCAT - RW sd rootdisk01-03 rootvol-01 rootdisk01 6029312 1048576 0 c0t8d0s2 ENA pl rootvol-02 rootvol ENABLED ACTIVE 1048576 CONCAT - RW sd rootdisk02-03 rootvol-02 rootdisk02 6029312 1048576 0 c0t9d0s2 ENA v standvol - ENABLED ACTIVE 1835008 SELECT - fsgen pl standvol-01 standvol ENABLED ACTIVE 1835008 CONCAT - RW sd rootdisk01-01 standvol-01 rootdisk01 0 1835008 0 c0t8d0s2 ENA pl standvol-02 standvol ENABLED ACTIVE 1835008 CONCAT - RW sd rootdisk02-01 standvol-02 rootdisk02 0 1835008 0 c0t9d0s2 ENA v swapvol - ENABLED ACTIVE 4194304 SELECT - swap pl swapvol-01 swapvol ENABLED ACTIVE 4194304 CONCAT - RW sd rootdisk01-02 swapvol-01 rootdisk01 1835008 4194304 0 c0t8d0s2 ENA pl swapvol-02 swapvol ENABLED ACTIVE 4194304 CONCAT - RW sd rootdisk02-02 swapvol-02 rootdisk02 1835008 4194304 0 c0t9d0s2 ENA v tmpvol - ENABLED ACTIVE 524288 SELECT - fsgen pl tmpvol-01 tmpvol ENABLED ACTIVE 524288 CONCAT - RW sd rootdisk01-06 tmpvol-01 rootdisk01 16793600 524288 0 c0t8d0s2 ENA pl tmpvol-02 tmpvol ENABLED ACTIVE 524288 CONCAT - RW sd rootdisk02-06 tmpvol-02 rootdisk02 16793600 524288 0 c0t9d0s2 ENA v usrvol - ENABLED ACTIVE 6217728 SELECT - fsgen pl usrvol-01 usrvol ENABLED ACTIVE 6217728 CONCAT - RW sd rootdisk01-07 usrvol-01 rootdisk01 17317888 6217728 0 c0t8d0s2 ENA pl usrvol-02 usrvol ENABLED ACTIVE 6217728 CONCAT - RW sd rootdisk02-07 usrvol-02 rootdisk02 17317888 6217728 0 c0t9d0s2 ENA v varvol - ENABLED ACTIVE 5242880 SELECT - fsgen pl varvol-01 varvol ENABLED ACTIVE 5242880 CONCAT - RW sd rootdisk01-08 varvol-01 rootdisk01 23535616 5242880 0 c0t8d0s2 ENA pl varvol-02 varvol ENABLED ACTIVE 5242880 CONCAT - RW sd rootdisk02-08 varvol-02 rootdisk02 23535616 5242880 0 c0t9d0s2 ENA root@robin:~#
Then check the contents of the EFI partition and the LABEL file of the mirror disk.
root@robin:~# efi_ls -d /dev/rdisk/disk22_p1 /efi/hpux FileName Last Modified Size . 6/ 9/2010 0 .. 6/ 9/2010 0 hpux.efi 6/ 9/2010 698356 nbp.efi 6/ 9/2010 31232 AUTO 6/ 9/2010 12 total space 523218944 bytes, free space 520163328 bytes root@robin:~# vxvmboot -v /dev/rdisk/disk22_p2 LIF Label File @ (1k) block # 834 on VxVM Disk /dev/rdsk/c0t9d0s2: Label Entry: 0, Boot Volume start: 3168; length: 1792 MB Label Entry: 1, Root Volume start: 6032480; length: 1024 MB Label Entry: 2, Swap Volume start: 1838176; length: 4096 MB Label Entry: 3, Dump Volume start: 1838176; length: 4096 MB root@robin:~#
Verify that the new disk has been set as the alternate boot device.
root@robin:~# setboot -v Primary bootpath : 0/0/0/0.0x8.0x0 (/dev/rdisk/disk20) HA Alternate bootpath : Alternate bootpath : 0/0/0/0.0x9.0x0 (/dev/rdisk/disk22) Autoboot is ON (enabled) setboot: error accessing firmware - Function is not available The firmware of your system does not support querying or changing the SpeedyBoot settings. root@robin:~#
Finally reboot the server and from the EFI boot manager force the boot from the mirrored disk.
Juanma.
Howto set-up a VxVM boot disk from a LVM boot disk
Creating a Veritas Volume Manager boot disk using the LVM boot disks as its source probably looks to many as a very complicated process, nothing so far from the reality. In fact the whole conversion can be done with one command, vxcp_lvmroot. In this post I will try to clarify the process and explain some of the underlying mechanisms.
I’m going to take for granted that all of you understand the basic structure of boot disks on Itanium servers. If you have read my post about boot disk structure on Integrity servers you will remember that the disks are composed by three partitions:
- EFI
- OS Partition.
- HPSP – HP Service Partition.
For the purpose of this post the only relevant partition is the OS Partition, also named as HPUX in HP-UX hosts.
Unlike LVM, where the volumes are named with numbers (lvol1, lvol2…), in VxVM the volumes follow a specific naming convention that reflects the usage of each one of them:
- standvol
- swapvol
- rootvol
- usrvol
- varvol
- tmpvol
- optvol
Veritas volumes support also a usetype field used to provide additional information about the volume to VxVM itself. The three most common usetypes on HP-UX are:
- fsgen – File systems and general purpose volumes
- swap – Swap volumes
- root – Used for the volume that contains the root file system
The following restrictions must be taken into account for any VxVM boot disk:
- As in LVM the volumes involved in the boot process (standvol, swapvol and rootvol) must be contiguous.
- The above volumes can have only one subdisk and can’t span to additional disks.
- The volumes within the root disk can not use dirty region logging (DRL).
- The private region size is 1MB rather than the default value of 32MB.
- The /stand file system can only be configured with VxFS data layout version 5 or the system will not boot.
- In PA-RISC systems the /stand file system must be HFS, this is necessary because the PA-RISC HP-UX kernel loader is not VxFS-aware.
Following is an example to illustrate the process.
First, with diskinfo, verify the size of the current boot disk and the new disk to check that they are the same.
root@robin:/# diskinfo /dev/rdsk/c0t0d0
SCSI describe of /dev/rdsk/c0t0d0:
vendor: HP
product id: Virtual LvDisk
type: direct access
size: 40960000 Kbytes
bytes per sector: 512
root@robin:/#
root@robin:/# diskinfo /dev/rdsk/c0t8d0
SCSI describe of /dev/rdsk/c0t8d0:
vendor: HP
product id: Virtual LvDisk
type: direct access
size: 40960000 Kbytes
bytes per sector: 512
root@robin:/#
After that scrub the new disk, this will prevent possible problems during the creation process because if vxcp_lvmroot encounter LVM structures on the disk it will fail.
root@robin:~# dd if=/dev/zero of=/dev/rdsk/c0t8d0 bs=1048576 count=1024 1024+0 records in 1024+0 records out root@robin:~#
Finally launch the vxcp_lvmroot command. Before commencing the copy, vxcp_lvmroot will determine how many disks are required and will ensure that enough disks have been specified.
Each one of the given disks for the conversion will be checked to make sure that aren’t in use as LVM, VxVM or raw disks. Once the appropriate checks have been issued the disks will be given VxVM media names, the disk or disks containing the root will be given rootdisk## names and the other disks that are part of the rootdg will be given rootaux## names, ## is a number starting on 01.
root@robin:~# /etc/vx/bin/vxcp_lvmroot -v -b c0t8d0 VxVM vxcp_lvmroot INFO V-5-2-4668 10:42: Bootdisk is configured with new-style DSF VxVM vxcp_lvmroot INFO V-5-2-2499 10:42: Gathering information on LVM root volume group vg00 VxVM vxcp_lvmroot INFO V-5-2-2441 10:42: Checking specified disk(s) for usability VxVM vxcp_lvmroot INFO V-5-2-4679 10:42: Using legacy-style DSF names VxVM vxcp_lvmroot INFO V-5-2-2566 10:42: Preparing disk c0t8d0 as a VxVM root disk VxVM vxcp_lvmroot INFO V-5-2-3767 10:42: Disk c0t8d0 is now EFI partitioned disk c0t8d0s2 VxVM vxcp_lvmroot INFO V-5-2-2537 10:42: Initializing DG rootdg with disk c0t8d0s2 as DM rootdisk01 VxVM vxcp_lvmroot INFO V-5-2-1606 10:42: Copying /dev/vg00/lvol1 (vxfs) to /dev/vx/dsk/rootdg/standvol VxVM vxcp_lvmroot INFO V-5-2-1604 10:42: Cloning /dev/vg00/lvol2 (swap) to /dev/vx/dsk/rootdg/swapvol VxVM vxcp_lvmroot INFO V-5-2-1606 10:42: Copying /dev/vg00/lvol3 (vxfs) to /dev/vx/dsk/rootdg/rootvol VxVM vxcp_lvmroot INFO V-5-2-1606 10:43: Copying /dev/vg00/lvol4 (vxfs) to /dev/vx/dsk/rootdg/homevol VxVM vxcp_lvmroot INFO V-5-2-1606 10:43: Copying /dev/vg00/lvol5 (vxfs) to /dev/vx/dsk/rootdg/optvol VxVM vxcp_lvmroot INFO V-5-2-1606 10:50: Copying /dev/vg00/lvol6 (vxfs) to /dev/vx/dsk/rootdg/tmpvol VxVM vxcp_lvmroot INFO V-5-2-1606 10:50: Copying /dev/vg00/lvol7 (vxfs) to /dev/vx/dsk/rootdg/usrvol VxVM vxcp_lvmroot INFO V-5-2-1606 10:55: Copying /dev/vg00/lvol8 (vxfs) to /dev/vx/dsk/rootdg/varvol VxVM vxcp_lvmroot INFO V-5-2-1606 10:58: Copying /dev/vg00/lv_crash (vxfs) to /dev/vx/dsk/rootdg/crashvol VxVM vxcp_lvmroot INFO V-5-2-4678 10:58: Setting up disk c0t8d0s2 as a boot disk VxVM vxcp_lvmroot INFO V-5-2-1638 10:59: Installing fstab and fixing dev nodes on new root FS VxVM vxcp_lvmroot INFO V-5-2-2538 10:59: Installing bootconf & rootconf files in new stand FS VxVM vxcp_lvmroot INFO V-5-2-2462 10:59: Current setboot values: VxVM vxcp_lvmroot INFO V-5-2-2569 10:59: Primary: 0/0/0/0.0x0.0x0 /dev/rdisk/disk4 VxVM vxcp_lvmroot INFO V-5-2-2416 10:59: Alternate: VxVM vxcp_lvmroot INFO V-5-2-4676 10:59: Making disk /dev/rdisk/disk20_p2 the primary boot disk VxVM vxcp_lvmroot INFO V-5-2-4663 10:59: Making disk /dev/rdisk/disk4_p2 the alternate boot disk VxVM vxcp_lvmroot INFO V-5-2-4671 10:59: Disk c0t8d0s2 is now a VxVM rootable boot disk root@robin:~#
Now to verify the new VxVM boot disk, first check the newly created rootdg diskgroup.
root@robin:~# vxprint -htg rootdg DG NAME NCONFIG NLOG MINORS GROUP-ID ST NAME STATE DM_CNT SPARE_CNT APPVOL_CNT DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK CO NAME CACHEVOL KSTATE STATE VT NAME RVG KSTATE STATE NVOLUME V NAME RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE SC NAME PLEX CACHE DISKOFFS LENGTH [COL/]OFF DEVICE MODE DC NAME PARENTVOL LOGVOL SP NAME SNAPVOL DCO EX NAME ASSOC VC PERMS MODE STATE SR NAME KSTATE dg rootdg default default 4466000 1276076559.38.robin dm rootdisk01 c0t8d0s2 auto 1024 40035232 - v crashvol - ENABLED ACTIVE 4194304 SELECT - fsgen pl crashvol-01 crashvol ENABLED ACTIVE 4194304 CONCAT - RW sd rootdisk01-09 crashvol-01 rootdisk01 28778496 4194304 0 c0t8d0s2 ENA v homevol - ENABLED ACTIVE 155648 SELECT - fsgen pl homevol-01 homevol ENABLED ACTIVE 155648 CONCAT - RW sd rootdisk01-04 homevol-01 rootdisk01 7077888 155648 0 c0t8d0s2 ENA v optvol - ENABLED ACTIVE 9560064 SELECT - fsgen pl optvol-01 optvol ENABLED ACTIVE 9560064 CONCAT - RW sd rootdisk01-05 optvol-01 rootdisk01 7233536 9560064 0 c0t8d0s2 ENA v rootvol - ENABLED ACTIVE 1048576 SELECT - root pl rootvol-01 rootvol ENABLED ACTIVE 1048576 CONCAT - RW sd rootdisk01-03 rootvol-01 rootdisk01 6029312 1048576 0 c0t8d0s2 ENA v standvol - ENABLED ACTIVE 1835008 SELECT - fsgen pl standvol-01 standvol ENABLED ACTIVE 1835008 CONCAT - RW sd rootdisk01-01 standvol-01 rootdisk01 0 1835008 0 c0t8d0s2 ENA v swapvol - ENABLED ACTIVE 4194304 SELECT - swap pl swapvol-01 swapvol ENABLED ACTIVE 4194304 CONCAT - RW sd rootdisk01-02 swapvol-01 rootdisk01 1835008 4194304 0 c0t8d0s2 ENA v tmpvol - ENABLED ACTIVE 524288 SELECT - fsgen pl tmpvol-01 tmpvol ENABLED ACTIVE 524288 CONCAT - RW sd rootdisk01-06 tmpvol-01 rootdisk01 16793600 524288 0 c0t8d0s2 ENA v usrvol - ENABLED ACTIVE 6217728 SELECT - fsgen pl usrvol-01 usrvol ENABLED ACTIVE 6217728 CONCAT - RW sd rootdisk01-07 usrvol-01 rootdisk01 17317888 6217728 0 c0t8d0s2 ENA v varvol - ENABLED ACTIVE 5242880 SELECT - fsgen pl varvol-01 varvol ENABLED ACTIVE 5242880 CONCAT - RW sd rootdisk01-08 varvol-01 rootdisk01 23535616 5242880 0 c0t8d0s2 ENA root@robin:~#
Verify the contents of the LABEL file.
root@robin:~# vxvmboot -v /dev/rdsk/c0t8d0s2 LIF Label File @ (1k) block # 834 on VxVM Disk /dev/rdsk/c0t8d0s2: Label Entry: 0, Boot Volume start: 3168; length: 1792 MB Label Entry: 1, Root Volume start: 6032480; length: 1024 MB Label Entry: 2, Swap Volume start: 1838176; length: 4096 MB Label Entry: 3, Dump Volume start: 1838176; length: 4096 MB root@robin:~#
Check the new boot paths and if everything is OK reboot the server.
root@robin:~# setboot -v Primary bootpath : 0/0/0/0.0x8.0x0 (/dev/rdisk/disk20) HA Alternate bootpath : Alternate bootpath : 0/0/0/0.0x0.0x0 (/dev/rdisk/disk4) Autoboot is ON (enabled) setboot: error accessing firmware - Function is not available The firmware of your system does not support querying or changing the SpeedyBoot settings. root@robin:~# root@robin:~# shutdown -ry 0 SHUTDOWN PROGRAM 06/09/10 11:11:37 WETDST Broadcast Message from root (console) Wed Jun 9 11:11:37... SYSTEM BEING BROUGHT DOWN NOW ! ! ! ...
If everything went as expected the server will boot from the new disk and the migration process wil be finished.
Juanma.
Configure AVIO Lan in HPVM Linux guests
The AVIO Lan drivers for Linux HPVM guests are supported since HPVM4.0 but as you will see enabling it is a little more complicated than in HP-UX guests.
The first prerequisite is to have installed the HPVM management software, once you have this package installed look for a RPM package called hpvm_lgssn in /opt/hpvm/guest-images/linux/DRIVERS.
root@hpvm-host:/opt/hpvm/guest-images/linux/DRIVERS # ll total 584 0 drwxr-xr-x 2 bin bin 96 Apr 13 18:47 ./ 0 drwxr-xr-x 5 bin bin 96 Apr 13 18:48 ../ 8 -r--r--r-- 1 bin bin 7020 Mar 27 2009 README 576 -rw-r--r-- 1 bin bin 587294 Mar 27 2009 hpvm_lgssn-4.1.0-3.ia64.rpm root@hpvm-host:/opt/hpvm/guest-images/linux/DRIVERS #
Copy the package to the virtual machine with your favorite method and install it.
[sles10]:/var/tmp # rpm -ivh hpvm_lgssn-4.1.0-3.ia64.rpm Preparing... ########################################### [100%] Installing... ########################################### [100%] [sles10]:/var/tmp #
Check the installation of the package.
[sles10]:~ # rpm -qa | grep hpvm hpvm-4.1.0-1 hpvmprovider-4.1.0-1 hpvm_lgssn-4.1.0-3 [sles10]:~ # [sles10]:~ # rpm -ql hpvm_lgssn /opt/hpvm_drivers /opt/hpvm_drivers/lgssn /opt/hpvm_drivers/lgssn/LICENSE /opt/hpvm_drivers/lgssn/Makefile /opt/hpvm_drivers/lgssn/README /opt/hpvm_drivers/lgssn/hpvm_guest.h /opt/hpvm_drivers/lgssn/lgssn.h /opt/hpvm_drivers/lgssn/lgssn_ethtool.c /opt/hpvm_drivers/lgssn/lgssn_main.c /opt/hpvm_drivers/lgssn/lgssn_recv.c /opt/hpvm_drivers/lgssn/lgssn_recv.h /opt/hpvm_drivers/lgssn/lgssn_send.c /opt/hpvm_drivers/lgssn/lgssn_send.h /opt/hpvm_drivers/lgssn/lgssn_trace.h /opt/hpvm_drivers/lgssn/rh4 /opt/hpvm_drivers/lgssn/rh4/u5 /opt/hpvm_drivers/lgssn/rh4/u5/lgssn.ko /opt/hpvm_drivers/lgssn/rh4/u6 /opt/hpvm_drivers/lgssn/rh4/u6/lgssn.ko /opt/hpvm_drivers/lgssn/sles10 /opt/hpvm_drivers/lgssn/sles10/SP1 /opt/hpvm_drivers/lgssn/sles10/SP1/lgssn.ko /opt/hpvm_drivers/lgssn/sles10/SP2 /opt/hpvm_drivers/lgssn/sles10/SP2/lgssn.ko [sles10]:~ #
There are two ways to install the driver, compile it or use one of the pre-compiled modules. These pre-compiled modules are for the following distributions and kernels:
- Red Hat 4 release 5 (2.6.9-55.EL)
- Red Hat 4 release 6 (2.6.9-67.EL)
- SLES10 SP1 (2.6.16.46-0.12)
- SLES10 SP2 (2.6.16.60-0.21)
For other kernels you must compile the driver. In the Linux box of the example I had a supported kernels and distro (SLES10 SP2) but instead of using the pre-compiled one I decided to go through the whole process.
Go the path /opt/hpvm_drivers/lgssn, there you will find the sources of the driver. To compile and install execute a simple make install.
[sles10]:/opt/hpvm_drivers/lgssn # make install
make -C /lib/modules/2.6.16.60-0.21-default/build SUBDIRS=/opt/hpvm_drivers/lgssn modules
make[1]: Entering directory `/usr/src/linux-2.6.16.60-0.21-obj/ia64/default'
make -C ../../../linux-2.6.16.60-0.21 O=../linux-2.6.16.60-0.21-obj/ia64/default modules
CC [M] /opt/hpvm_drivers/lgssn/lgssn_main.o
CC [M] /opt/hpvm_drivers/lgssn/lgssn_send.o
CC [M] /opt/hpvm_drivers/lgssn/lgssn_recv.o
CC [M] /opt/hpvm_drivers/lgssn/lgssn_ethtool.o
LD [M] /opt/hpvm_drivers/lgssn/lgssn.o
Building modules, stage 2.
MODPOST
CC /opt/hpvm_drivers/lgssn/lgssn.mod.o
LD [M] /opt/hpvm_drivers/lgssn/lgssn.ko
make[1]: Leaving directory `/usr/src/linux-2.6.16.60-0.21-obj/ia64/default'
find /lib/modules/2.6.16.60-0.21-default -name lgssn.ko -exec rm -f {} \; || true
find /lib/modules/2.6.16.60-0.21-default -name lgssn.ko.gz -exec rm -f {} \; || true
install -D -m 644 lgssn.ko /lib/modules/2.6.16.60-0.21-default/kernel/drivers/net/lgssn/lgssn.ko
/sbin/depmod -a || true
[sles10]:/opt/hpvm_drivers/lgssn #
This will copy the driver to /lib/module/<KERNEL_VERSION>/kernel/drivers/net/lgssn/.
To ensure that the new driver will loaded during the startup of the operative system first add the following line to /etc/modprobe.conf, one line for each interface configured for AVIO Lan.
alias eth1 lgssn
The HPVM 4.2 manual said you have to issue the command depmod -a in order to inform the kernel about the change but if you look the above log will see that the last command executed by the make install is a depmod -a. Look into the modules.dep file to check that the corresponding line for the lgssn driver has been added.
[sles10]:~ # grep lgssn /lib/modules/2.6.16.60-0.21-default/modules.dep /lib/modules/2.6.16.60-0.21-default/kernel/drivers/net/lgssn/lgssn.ko: [sles10]:~ #
At this point and if you have previously reconfigured the virtual machine, load the module and restart the network services.
[sles10]:/opt/hpvm_drivers/lgssn # insmod /lib/modules/2.6.16.60-0.21-default/kernel/drivers/net/lgssn/lgssn.ko
[sles10]:/opt/hpvm_drivers/lgssn # lsmod |grep lgssn
lgssn 576136 0
[sles10]:/opt/hpvm_drivers/lgssn #
[sles10]:/opt/hpvm_drivers/lgssn # service network restart
Shutting down network interfaces:
eth0 device: Intel Corporation 82540EM Gigabit Ethernet Controller
eth0 configuration: eth-id-2a:87:14:5c:f9:ed
eth0 done
eth1 device: Hewlett-Packard Company Unknown device 1338
eth1 configuration: eth-id-66:f3:f8:4e:37:d5
eth1 done
eth2 device: Intel Corporation 82540EM Gigabit Ethernet Controller
eth2 configuration: eth-id-0a:dc:fd:cb:2c:62
eth2 done
Shutting down service network . . . . . . . . . . . . . done
Hint: you may set mandatory devices in /etc/sysconfig/network/config
Setting up network interfaces:
lo
lo
IP address: 127.0.0.1/8
IP address: 127.0.0.2/8
Checking for network time protocol daemon (NTPD): running
lo done
eth0 device: Intel Corporation 82540EM Gigabit Ethernet Controller
eth0 configuration: eth-id-2a:87:14:5c:f9:ed
Warning: Could not set up default route via interface
Command ip route replace to default via 10.31.12.1 returned:
. RTNETLINK answers: Network is unreachable
Configuration line: default 10.31.12.1 - -
This needs NOT to be AN ERROR if you set up multiple interfaces.
See man 5 routes how to avoid this warning.
Checking for network time protocol daemon (NTPD): running
eth0 done
eth1 device: Hewlett-Packard Company Unknown device 1338
eth1 configuration: eth-id-66:f3:f8:4e:37:d5
eth1 IP address: 10.31.4.16/24
Warning: Could not set up default route via interface
Command ip route replace to default via 10.31.12.1 returned:
. RTNETLINK answers: Network is unreachable
Configuration line: default 10.31.12.1 - -
This needs NOT to be AN ERROR if you set up multiple interfaces.
See man 5 routes how to avoid this warning.
Checking for network time protocol daemon (NTPD): running
eth1 done
eth2 device: Intel Corporation 82540EM Gigabit Ethernet Controller
eth2 configuration: eth-id-0a:dc:fd:cb:2c:62
eth2 IP address: 10.31.12.11/24
Checking for network time protocol daemon (NTPD): running
eth2 done
Setting up service network . . . . . . . . . . . . . . done
[sles10]:/opt/hpvm_drivers/lgssn #
If you have not configured the networking interface of the virtual machine shutdown the virtual machine and from the host modify each virtual NIC of the guest. Take into account that AVIO Lan drivers are not supported with localnet virtual switches.
root@hpvm-host:~ # hpvmmodify -P sles10 -m network:avio_lan:0,2:vswitch:vlan2:portid:4 root@hpvm-host:~ # hpvmstatus -P sles10 -d [Virtual Machine Devices] ... [Network Interface Details] network:lan:0,0,0x2A87145CF9ED:vswitch:localnet:portid:4 network:avio_lan:0,1,0x66F3F84E37D5:vswitch:vlan1:portid:4 network:avio_lan:0,2,0x0ADCFDCB2C62:vswitch:vlan2:portid:4 ... root@hpvm-host:~ #
Finally start the virtual machine and check that everything went well and the drivers have been loaded.
Juanma
Boot disk structure on Integrity servers
The boot disk/disks of every Integrity server are divided into three partitions:
- EFI Partition: Contains the necessary tools and files to find and load the appropriate kernel. Here resides for example the hpux.efi utility.
- OS Partition: In the case of HP-UX contains the LVM or VxVM structure, the kernel and any filesystem that play a role during the boot process.
- HP Service Partition (HPSP).
EFI Partition
The Extensible Firmware Interface (EFI) partition is subdivided into three main areas:
- MBR: The Master Boot Record, located at the top of the disk, a legacy Intel structure ignored by EFI.
- GPT: Every EFI partition is assigned a unique identifier known as GUID (Globally Unique Identifier). The locations of the GUID s are stored in the EFI GUID Partition Table or GPT. This very critical structure is replicated at the top and the bottom of the disk.
- EFI System Partition: This partition contains the OS loader responsible of loading the operative system during the boot process. On HP-UX disks the OS loader is the famous \efi\hpux\hpux.efi file. Here is contained also the \efi\hpux\auto file which stores the system boot string and some utilities as well.
OS Partition
The OS Partition obviously contains the Operative System that runs on the server. An HP-UX partition contains a LIF area, private region and public region.
The Logical Interchange Format (LIF) boot area stores the following files:
- ISL. Not used on Integrity.
- AUTO. Not used on Integrity.
- HPUX. Not used on Integrity.
- LABEL. A binary file that contains the records of the locations of /stand and the primary swap.
The private region contains LVM and VxVM configuration information.
And the public region contains the corresponding volumes for:
- stand: /stand filesystem including the HP-UX kernel.
- swap: Primary swap space.
- root: The root filesystem that includes /, /etc, /dev and /sbin.
HP Service Partition
The HP Service Partition, or HPSP, is a FAT-32 filesystem that contains several offline diagnostic utilities to be used on unbootable systems.
Juanma.
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.


