HP-UX Virtual Partitions

   

HP-UX Virtual Partitions

By Marty Poniatowski

Table of Contents
Chapter 4.  Building an HP-UX Kernel

You may be moving various devices on your HP 9000 from one Virtual Partition to another. This means that the kernels in the respective Virtual Partitions will need to have in them the drivers of hardware devices which will be used by the Virtual Partition. Let's take a look at all of the hardware on our system and then see if there is a component we'll want to move from one Virtual Partition to another.

To begin with, let's take a look at the full hardware on a system with ioscan -f in the following example:

cvhdcon3:/ # ioscan -fn Class I H/W Path Driver S/W State H/W Type Description ============================================================================= root 0 root CLAIMED BUS_NEXUS ioa 0 0 sba CLAIMED BUS_NEXUS System Bus Adap ter (803) ba 0 0/0 lba CLAIMED BUS_NEXUS Local PCI Bus A dapter (782) lan 0 0/0/0/0 btlan CLAIMED INTERFACE HP PCI 10/100Ba se-TX Core /dev/diag/lan0 /dev/ether0 /dev/lan0 ext_bus 0 0/0/1/0 c720 CLAIMED INTERFACE SCSI C896 Ultra Wide Single-Ended target 0 0/0/1/0.1 tgt CLAIMED DEVICE disk 0 0/0/1/0.1.0 sdisk CLAIMED DEVICE HP DVD-ROM 304 /dev/dsk/c0t1d0 /dev/rdsk/c0t1d0 target 1 0/0/1/0.3 tgt CLAIMED DEVICE tape 0 0/0/1/0.3.0 stape CLAIMED DEVICE HP C1537A /dev/rmt/0m /dev/rmt/c0t3d0BESTn /dev/rmt/0mb /dev/rmt/c0t3d0BESTnb /dev/rmt/0mn /dev/rmt/c0t3d0DDS /dev/rmt/0mnb /dev/rmt/c0t3d0DDSb /dev/rmt/c0t3d0BEST /dev/rmt/c0t3d0DDSn /dev/rmt/c0t3d0BESTb /dev/rmt/c0t3d0DDSnb target 2 0/0/1/0.7 tgt CLAIMED DEVICE ctl 0 /0/1/0.7.0 sctl CLAIMED DEVICE Initiator /dev/rscsi/c0t7d0 ext_bus 1 0/0/1/1 c720 CLAIMED INTERFACE SCSI C896 Ultra Wide Single-Ended target 3 0/0/1/1.0 tgt CLAIMED DEVICE disk 1 0/0/1/1.0.0 sdisk CLAIMED DEVICE SEAGATE ST17340 4LC /dev/dsk/c1t0d0 /dev/rdsk/c1t0d0 target 4 0/0/1/1.2 tgt CLAIMED DEVICE disk 2 0/0/1/1.2.0 sdisk CLAIMED DEVICE SEAGATE ST17340 4LC /dev/dsk/c1t2d0 /dev/rdsk/c1t2d0 target 5 0/0/1/1.7 tgt CLAIMED DEVICE ctl 1 0/0/1/1.7.0 sctl CLAIMED DEVICE Initiator /dev/rscsi/c1t7d0 ext_bus 2 0/0/2/0 c720 CLAIMED INTERFACE SCSI C87x Ultra Wide Single-Ended target 6 0/0/2/0.0 tgt CLAIMED DEVICE disk 3 0/0/2/0.0.0 sdisk CLAIMED DEVICE SEAGATE ST17340 4LC /dev/dsk/c2t0d0 /dev/rdsk/c2t0d0 target 7 0/0/2/0.2 tgt CLAIMED DEVICE disk 4 0/0/2/0.2.0 sdisk CLAIMED DEVICE SEAGATE ST17340 4LC /dev/dsk/c2t2d0 /dev/rdsk/c2t2d0 target 8 0/0/2/0.7 tgt CLAIMED DEVICE ctl 2 0/0/2/0.7.0 sctl CLAIMED DEVICE Initiator /dev/rscsi/c2t7d0 ext_bus 3 0/0/2/1 c720 CLAIMED INTERFACE SCSI C87x Ultra Wide Single-Ended target 9 0/0/2/1.7 tgt CLAIMED DEVICE ctl 3 0/0/2/1.7.0 sctl CLAIMED DEVICE Initiator /dev/rscsi/c3t7d0 tty 0 0/0/4/0 asio0 CLAIMED INTERFACE PCI Serial (103 c1048) /dev/GSPdiag1 /dev/mux0 /dev/tty0p1 /dev/diag/mux0 /dev/tty0p0 /dev/tty0p2 tty 1 0/0/5/0 asio0 CLAIMED INTERFACE PCI Serial (103 c1048) /dev/GSPdiag2 /dev/mux1 /dev/diag/mux1 /dev/tty1p1 ba 1 0/1 lba CLAIMED BUS_NEXUS Local PCI Bus A dapter (782) ba 2 0/2 lba CLAIMED BUS_NEXUS Local PCI Bus A dapter (782) ba 3 0/3 lba CLAIMED BUS_NEXUS Local PCI Bus A dapter (782) ba 4 0/4 lba CLAIMED BUS_NEXUS Local PCI Bus A dapter (782) ba 5 0/5 lba CLAIMED BUS_NEXUS Local PCI Bus A dapter (782) ba 6 0/8 lba CLAIMED BUS_NEXUS Local PCI Bus A dapter (782) fc 0 0/8/0/0 td CLAIMED INTERFACE HP Tachyon TL/T S Fibre Channel Mass Storage Adapter /dev/td0 fcp 0 0/8/0/0.8 fcp CLAIMED INTERFACE FCP Protocol Ad apter ext_bus 7 0/8/0/0.8.0.5.0 fcparray CLAIMED INTERFACE FCP Arr ay Interface target 10 0/8/0/0.8.0.5.0.0 tgt CLAIMED DEVICE disk 7 0/8/0/0.8.0.5.0.0.0 sdisk CLAIMED DEVICE HP A5277A /dev/dsk/c7t0d0 /dev/rdsk/c7t0d0 disk 10 0/8/0/0.8.0.5.0.0.1 sdisk CLAIMED DEVICE HP A5277A /dev/dsk/c7t0d1 /dev/rdsk/c7t0d1 disk 11 0/8/0/0.8.0.5.0.0.2 sdisk CLAIMED DEVICE HP A5277A /dev/dsk/c7t0d2 /dev/rdsk/c7t0d2 disk 12 0/8/0/0.8.0.5.0.0.3 sdisk CLAIMED DEVICE HP A5277A /dev/dsk/c7t0d3 /dev/rdsk/c7t0d3 target 11 0/8/0/0.8.0.5.0.1 tgt CLAIMED DEVICE disk 15 0/8/0/0.8.0.5.0.1.0 sdisk CLAIMED DEVICE HP A5277A /dev/dsk/c7t1d0 /dev/rdsk/c7t1d0 target 12 0/8/0/0.8.0.5.0.2 tgt CLAIMED DEVICE disk 17 0/8/0/0.8.0.5.0.2.0 sdisk CLAIMED DEVICE HP A5277A /dev/dsk/c7t2d0 /dev/rdsk/c7t2d0 target 13 0/8/0/0.8.0.5.0.3 tgt CLAIMED DEVICE disk 18 0/8/0/0.8.0.5.0.3.0 sdisk CLAIMED DEVICE HP A5277A /dev/dsk/c7t3d0 /dev/rdsk/c7t3d0 ext_bus 4 0/8/0/0.8.0.255.0 fcpdev CLAIMED INTERFACE FCP Dev ice Interface target 14 0/8/0/0.8.0.255.0.5 tgt CLAIMED DEVICE ctl 4 0/8/0/0.8.0.255.0.5.0 sctl CLAIMED DEVICE HP A5277A /dev/rscsi/c4t5d0 ba 7 0/9 lba CLAIMED BUS_NEXUS Local PCI Bus A dapter (782) fc 1 0/9/0/0 td CLAIMED INTERFACE HP Tachyon TL/T S Fibre Channel Mass Storage Adapter /dev/td1 fcp 1 0/9/0/0.8 fcp CLAIMED INTERFACE FCP Protocol Ad apter ext_bus 6 0/9/0/0.8.0.4.0 fcparray CLAIMED INTERFACE FCP Arr ay Interface target 15 0/9/0/0.8.0.4.0.0 tgt CLAIMED DEVICE disk 5 0/9/0/0.8.0.4.0.0.0 sdisk CLAIMED DEVICE HP A5277A /dev/dsk/c6t0d0 /dev/rdsk/c6t0d0 disk 6 0/9/0/0.8.0.4.0.0.1 sdisk CLAIMED DEVICE HP A5277A /dev/dsk/c6t0d1 /dev/rdsk/c6t0d1 disk 8 0/9/0/0.8.0.4.0.0.2 sdisk CLAIMED DEVICE HP A5277A /dev/dsk/c6t0d2 /dev/rdsk/c6t0d2 disk 9 0/9/0/0.8.0.4.0.0.3 sdisk CLAIMED DEVICE HP A5277A /dev/dsk/c6t0d3 /dev/rdsk/c6t0d3 target 16 0/9/0/0.8.0.4.0.1 tgt CLAIMED DEVICE disk 13 0/9/0/0.8.0.4.0.1.0 sdisk CLAIMED DEVICE HP A5277A /dev/dsk/c6t1d0 /dev/rdsk/c6t1d0 target 17 0/9/0/0.8.0.4.0.2 tgt CLAIMED DEVICE disk 14 0/9/0/0.8.0.4.0.2.0 sdisk CLAIMED DEVICE HP A5277A /dev/dsk/c6t2d0 /dev/rdsk/c6t2d0 target 18 0/9/0/0.8.0.4.0.3 tgt CLAIMED DEVICE disk 16 0/9/0/0.8.0.4.0.3.0 sdisk CLAIMED DEVICE HP A5277A /dev/dsk/c6t3d0 /dev/rdsk/c6t3d0 ext_bus 5 0/9/0/0.8.0.255.0 fcpdev CLAIMED INTERFACE FCP Dev ice Interface target 19 0/9/0/0.8.0.255.0.4 tgt CLAIMED DEVICE ctl 5 0/9/0/0.8.0.255.0.4.0 sctl CLAIMED DEVICE HP A5277A /dev/rscsi/c5t4d0 ba 8 0/10 lba CLAIMED BUS_NEXUS Local PCI Bus A dapter (782) lan 1 0/10/0/0 btlan CLAIMED INTERFACE HP A5230A/B5509 BA PCI 10/100Base-TX Addon /dev/diag/lan1 /dev/ether1 /dev/lan1 ba 9 0/12 lba CLAIMED BUS_NEXUS Local PCI Bus A dapter (782) lan 2 0/12/0/0 btlan CLAIMED INTERFACE HP A5230A/B5509 BA PCI 10/100Base-TX Addon /dev/diag/lan2 /dev/ether2 /dev/lan2 pbc 0 32 pbc CLAIMED BUS_NEXUS Bus Converter processor 0 33 processor CLAIMED PROCESSOR Processor pbc 1 36 pbc CLAIMED BUS_NEXUS Bus Converter processor 1 37 processor CLAIMED PROCESSOR Processor pbc 2 96 pbc CLAIMED BUS_NEXUS Bus Converter processor 2 97 processor CLAIMED PROCESSOR Processor pbc 3 100 pbc CLAIMED BUS_NEXUS Bus Converter processor 3 101 processor CLAIMED PROCESSOR Processor memory 0 192 memory CLAIMED MEMORY Memory virtbus 0 es sdm CLAIMED VIRTBUS Enhanced-SCSI v irtual bus cvhdcon3:/ #

I used the -f option because it produces a full listing of all I/O. I omitted the -u option, which produces a list of usable I/O devices. For a device to be usable, there must be a driver for the device in the kernel and an instance number. I often find devices on a system for which no driver exists in the kernel. I like to know about these devices so I can add a driver and use them if none exists.

Going back to our earlier ioscan -f example, there was a DDS drive present in the listing. The tape drive is assigned to vPar cable1 but not cable2, as shown in the following listing:

# vparstatus -p cable1 -v [Virtual Partition Details] Name: cable1 State: Up Attributes: Dynamic,Manual Kernel Path: /stand/vmunix Boot Opts: [CPU Details] Min/Max: 2/3 Bound [Path]: 33 37 Unbound [Path]: [IO Details] 0.0.1.1.2.0 BOOT 0.0.4.0 CONSOLE 0.0.0.0 0.0.1.0.3.0 <-- tape drive in cable1 [Memory Details] Specified [Base /Range]: (bytes) (MB) Total Memory (MB): 2048 #

# vparstatus -p cable2 -v [Virtual Partition Details] Name: cable2 State: Up Attributes: Dynamic,Manual Kernel Path: /stand/vmunix Boot Opts: [CPU Details] Min/Max: 1/2 Bound [Path]: 97 Unbound [Path]: 101 [IO Details] 0.8.0.0.8.0.5.0.0.0 BOOT 0.10.0.0 <-- no tape drive present [Memory Details] Specified [Base /Range]: (bytes) (MB) Total Memory (MB): 1024 #

The vmunix for cable1 should have in it the device driver necessary to support the tape drive, in this case stape. We know that stape is the driver by issuing an ioscan as shown below:

cvhdcon3:/ # ioscan -fun | grep tape tape 0 0/0/1/0.3.0 stape CLAIMED DEVICE HP C1537A cvhdcon3:/ #

The driver for the tape drive should be present in every Virtual Partition that will use it. If your tape drive interface is in a PCI slot that you can move from one vPar to another, you want to have the driver for it in the kernel of every Virtual Partition that will use it. Keep in mind that in order to move the tape drive, its interface will have to be on an LBA that can be moved from one vPar to another. At the time of this writing an LBA can't be shared between vPars. In our case the tape drive is connected to the Core I/O card and won't be moved from cable1 to cable2.

The following listing of /stand/system shows that the stape driver we need for the tape is present:

cvhdcon3:/ # cat /stand/system * Drivers and Subsystems DlkmDrv GSCtoPCI PCItoPCI arp asio0 asp autofsc autox0 bs_osm btlan btlan1 c720 cachefsc cb cdfs cifs clone core cxperf dev_config dev_olar devkrs diag0 diag1 diag2 disc3 dlkm dlpi dmem echo esctl esdisk fcT1 fcT1_cntl fcT1_fcp fcms fcp fcp_cdio fcparray fcpdev fcpmux fdc fddi4 ffs gelan hpstreams i2o_cdio inet iomem iop_drv ip kepd klog krio krs lasi lba ldterm lv lvm maclan netdiag1 netqa nfs_client nfs_core nfs_server nfsm nms nuls olar_psm olar_psm_if pa_generic_psm pa_psm pat_psm pci pckt pflop pipedev pipemod prm ptem ptm pts rawip rpcmod sad sapic sba sc schgr scsi1 scsi3 sctl sdisk sdm sio spt spt0 ssrfc stape stcpmap strlog strpty_included strtelnet_included target tcp td telm tels timod tirdwr tlclts tlcots tlcotsod token_arp tun udp ufs uipc vcn vcs ve_psm ve_psm_driver vxfs vxportal wsio * Kernel Device info dump lvol * Tunable parameters STRMSGSZ 65535 dnlc_hash_locks 512 maxdsiz_64bit 0X40000000 maxssiz 0X800000 maxssiz_64bit 0X800000 maxswapchunks 2048 maxtsiz 0X4000000 maxtsiz_64bit 0X40000000 nstrpty 60 shmmax 0X4000000 cvhdcon3:/ #

We could now use the tape drive to perform a backup of cable1. There is detailed information on backup in Chapter 7, including performing a backup using a remote tape drive. The following example shows the fbackup command issued:

fbackup -0u -f /dev/rmt/0m -g /tmp/backupgraph -I /tmp/backupindex.`date '+%y%m%d.%H:M'` 2> /tmp/backup.`date '+%y%m%d.%H:%M'`

This produces an index file of the backup of /var on cable1 that contains the following entries:

1024 1 / 1024 1 /var 1024 1 /var/tmp 200 1 /var/tmp/..fmt 0 1/var/tmp/aaaa01664 0 1/var/tmp/aaaa01745 0 1/var/tmp/aaaa01806 0 1/var/tmp/aaaa02391 0 1/var/tmp/cmd_res3036 0 1/var/tmp/cmd_res4403 1560 1 /var/tmp/disk_em.fmt 324 1 /var/tmp/dm_TL_adapter.fmt 1392 1 /var/tmp/dm_stape.fmt 1241 1 /var/tmp/ems_inittab.old 28 1 /var/tmp/envd.action2 28 1 /var/tmp/envd.action5 200 1 /var/tmp/fc60mon.fmt 4106 1 /var/tmp/inetd.conf.old 0 1/var/tmp/lpmc_em.fmt 96 1 /var/tmp/ntp 0 1/var/tmp/oe.config.4525 0 1/var/tmp/rdskACAa01881 0 1/var/tmp/rdskQBAa01841 0 1/var/tmp/rdskSDCa06262 0 1/var/tmp/rdskSJAa01574 0 1/var/tmp/rdskUBAa01853 7184 1 /var/tmp/swagent.log

If the tape interface were not on the Core I/O card, which is devoted to cable1, we could move the interface from cable1 to cable2, confirm that the driver is in /stand/system, and then backup cable2

Since there are many devices that you may want to move among the vPars running on your system, you want to make sure you have all of the device drivers required to support these devices in your kernel.


       
    Top
     

    Категории