Installing and Managing HP-UX Virtual Partitions (vPars) First Edition Manufacturing Part Number: T1335-90001 November 2001 United States © Copyright 2001 Hewlett-Packard Company. All rights reserved.
Legal Notices The information in this document is subject to change without notice. Hewlett-Packard makes no warranty of any kind with regard to this manual, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Hewlett-Packard shall not be held liable for errors contained herein or direct, indirect, special, incidental or consequential damages in connection with the furnishing, performance, or use of this material.
iCOD and iCOD CPU Agent Software are products of Hewlett-Packard Company, and all are protected by copyright. Copyright 1979, 1980, 1983, 1985-93 Regents of the University of California. This software is based in part on the Fourth Berkeley Software Distribution under license from the Regents of the University of California. Copyright 1988 Carnegie Mellon University Copyright 1990-1995 Cornell University Copyright 1985, 1986, 1988 Massachusetts Institute of Technology.
Publication History The manual publication date and part number indicate its current edition. The publication date will change when a new edition is released. The manual part number will change when extensive changes are made. To ensure that you receive the new editions, you should subscribe to the appropriate product support service. See your HP sales representative for details. • First Edition: November 2001, T1335-90001 (vPars version B.01.
Contents 1. Introduction Information on This Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intended Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How This Book is Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Where to Get the Latest Version of This Document . . . . . . . . . . . . . . . . . . . . . . . . . . What Is vPars? . . . . . . . . .
Contents Crash Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Crash User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . System-wide Stable Storage and Setboot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ignite/UX Network Recovery. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents Example Computer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Booting the vPars Monitor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Accessing the Monitor Prompt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Using Monitor Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 Booting. . . .
Contents B. Problem with Adding Unbound CPUs to an Existing Partition Symptoms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Workaround: Reboot the Target Partition . . . . .
1 Introduction This chapter covers: • Information on This Document • What Is vPars? • Why Use vPars? • Supported Environments • Product Interaction • Ordering Information Chapter 1 9
Introduction Information on This Document Information on This Document Intended Audience This document is written for system administrators to help them learn and manage the product HP-UX Virtual Partitions (vPars). How This Book is Organized The first three chapters cover conceptual material needed to understand and plan your vPars environment. The remaining two chapters cover installation and common tasks.
Introduction What Is vPars? What Is vPars? The vPars (Virtual Partitions) product allows you to run multiple instances of HP-UX simultaneously on one computer by dividing the computer into virtual partitions. Each partition is assigned its own subset of hardware, runs a separate instance of HP-UX, and hosts its own set of applications. Because each HP-UX instance is isolated from all other instances, vPars provides application and OS (Operating System) fault isolation.
Introduction What Is vPars? A virtual partition is a software partition of a computer or hard partition where each virtual partition contains an instance of HP-UX. Though a hard partition can contain multiple virtual partitions, the inverse is not true. A virtual partition cannot span a hard partition boundary. Product Features • A single L3000 or N-class computer can be divided into multiple virtual partitions. • Each virtual partition runs its own instance of HP-UX.
Introduction What Is vPars? Why Use vPars? The following explains some of the advantages of using vPars: vPars Increases Computer Utilization and Isolates OS and Application Faults In certain environments one entire computer is dedicated to a single application. When the demand for that application is not at peak, such as during non-business hours, the computer is underutilized. If many computers are configured this way, you have many computers that are being underutilized.
Introduction What Is vPars? reassigned overnight to a report computer. Such reassignments can be automated, for example, via cron. Because vPars assigns specific hardware resources to specific virtual partitions, a user on the transaction computer at night is not affected by the reports computer’s huge consumption of processing power. A partition uses only the CPUs that you assign to it; CPUs are not time-sliced across the partitions.
Introduction Supported Environments Supported Environments Hardware • L3000 Required firmware version: 41.02. • N-class Required firmware version: 41.02. • Superdome is not supported in the first release; it is planned for support in a future release. Operating Systems • All virtual partitions must run HP-UX 11i (December 2000 Release or later) in 64-bit mode on PA-RISC platforms.
Introduction Supported Environments documentation for more information on running MC/Service Guard with vPars. • Glance and Openview Performance Agent (MeasureWare) For correct reporting of CPU utilization, you need to run Glance and MeasureWare versions C.03.35.00 or higher. For correct reporting of interrupt-enabled CPUs, you need kernel patch PHKL_22987 installed. • PSets (Processor Sets) In the current release of vPars, you cannot specify a hardware path for an unbound CPU.
Introduction Supported Environments • Support Tools To run the Support Tools package on a vPars computer, you need version A.28.00 or later. (The equivalent swlist | grep Diag output will show the product as OnlineDiag with version B.11.11.04.xx). The Support Tools package is available on the September 2001 Support Plus media and from http://software.hp.com. CAUTION The September 2001 release of the CPU Expert Tool is not supported on vPars computers.
Introduction Supported Environments • System-wide stable storage and the setboot command On a non-vPars computer, the setboot command allows you to read from and write to the system-wide stable storage of non-volatile memory. However, on a vPars computer, the setboot command does not affect the stable storage. Instead, it reads from and writes to only the partition database. For more information see “System-wide Stable Storage and Setboot” on page 42.
Introduction Supported Environments • SCSI Initiator ID Although you can set the SCSI Initiator ID (the ID of the SCSI controller) and rate at the BCH prompt, on a vPars computer, you can also set these values from the UNIX shell of a virtual partition. For more information, see the vparutil (1M) manpage. • ioscan output The ioscan output for vcn and vcs drivers show a value of NO_HW in the S/W State column. This is normal.
Introduction Ordering Information Ordering Information To obtain information on ordering the vPars product or on how to download the free version, go to HPs Software Depot web site at http://www.software.hp.com Features of Free Versus Purchased Product The free product has the following limitations not present in the purchased product: • the maximum number of virtual partitions is two • there must be one virtual partition with only one CPU dedicated to it.
2 How vPars Works This chapter covers: • Partitioning Using vPars • vPars Monitor and Partition Database • vPars Boot Sequence • Virtual Consoles • Security Chapter 2 21
How vPars Works Partitioning Using vPars Partitioning Using vPars To understand how vPars works, compare it to a computer not using vPars. Figure 2-1 shows a 4-way HP-UX computer. Without vPars, all hardware resources are dedicated to one instance of HP-UX and the applications that are running on this one instance. Figure 2-1 Computer without vPars Processor 0 Host PCI Bridge 4 SCSI 0/0 6.0 Processor 2 Processor 1 LAN 1/0 Memory 6 Processor 3 Host PCI Bridge 5 SCSI 0/0 LAN 1/0 6.
How vPars Works Partitioning Using vPars Figure 2-2 Software Stack of Computer without vPars Application 2 Application 1 HP-UX 11i Hardware / Firmware Using vPars, you can allocate a computer’s resources into two or more virtual partitions, each with a subset of the hardware.
How vPars Works Partitioning Using vPars Each application can run on top of separate OS instances. Instead of a single OS instance owning all the hardware, the vPars monitor manages the virtual partitions and their OS instances as well as the assignment of hardware resources to each virtual partition.
How vPars Works Partitioning Using vPars information on the commands, see the chapter “Monitor and Shell Commands” on page 71. Partition Database At the heart of the vPars monitor is the partition database. The partition database contains partition configuration information. Using the partition database, the monitor tracks which virtual partitions exist and what hardware resources and partition attributes are associated with each partition.
How vPars Works Boot Sequence Boot Sequence NOTE This section describes a manual boot sequence to help explain how vPars impacts the boot process, but you can continue to use an autoboot sequence to boot all partitions. See “Autobooting the Monitor and All Virtual Partitions” on page 93. Boot Sequence: Quick Reference On a computer without vPars, a simplified boot sequence is: 1. ISL (Initial System Loader) 2. hpux (secondary system loader) 3.
How vPars Works Boot Sequence However, in a computer with vPars, at the ISL prompt, the secondary system loader hpux loads the vPars monitor /stand/vpmon: ISL> hpux /stand/vpmon The monitor loads the partition database (the default is /stand/vpdb) and internally creates (but does not boot) each virtual partition according to the resource assignments in the database. Next, the vPars monitor runs in interactive mode (when no options to /stand/vpmon are given) with a command line interface.
How vPars Works Virtual Consoles Virtual Consoles HP-UX computers have a special terminal or window called a console that allows special control and displays system error messages. Because computers have a limited number of PCI slots, you may not want to allocate one serial port for use as a console port for each partition you create. With vPars, each virtual partition has its own virtual console. For each partition, its console I/O is sent to its vcn (Virtual CoNsole) driver.
How vPars Works Virtual Consoles • GSPdiag1 device file The GSPdiag1 device file (/dev/GSPdiag1) can only be accessed from the virtual partition that contains the console hardware port. • Terminal Emulation To avoid display problems, be sure that the terminal setting of the GSP on the vPars computer matches the terminal or terminal emulator that you are using to access it. For details on how to do this, see “Setting the GSP Terminal Type” on page 60.
How vPars Works Security Security You should be aware of the following security concerns: • The vPars commands (as described in “Monitor and Shell Commands” on page 71) are restricted to root access, but the commands work on any of the virtual partitions, regardless of which partition the commands are executed from. Therefore, a user on one partition can affect another virtual partition by targeting the virtual partition in a vPars command.
3 Managing Virtual Partitions This chapter covers • CPU Allocation • Bound and Unbound CPUs • Memory Allocation • I/O Allocation • When to Shutdown All Partitions • Monitor Crash Dump • Crash Processing • System-Wide Stable Storage and Setboot • Ignite/UX Network Recovery • Expert Recovery Chapter 3 31
Managing Virtual Partitions CPU Allocation CPU Allocation Bound and Unbound CPUs With vPars, there are two types of CPUs: bound and unbound. A bound CPU is a CPU that is assigned to and handles I/O interrupts for a virtual partition. Every virtual partition must have at least one bound CPU to handle its I/O interrupts. CPUs that are not assigned to any virtual partition or that are assigned to a virtual partition but do not handle its I/O interrupts are unbound CPUs.
Managing Virtual Partitions CPU Allocation If your applications are CPU intensive (and not I/O intensive), use unbound CPUs so that you can easily adjust the number of CPUs via dynamic CPU migration as the demand on the virtual partition changes. Unbound CPUs provide greater flexibility of movement between virtual partitions because they can be added and removed without needing to bring down the affected partitions.
Managing Virtual Partitions Memory Allocation Memory Allocation Memory Assignment By Size To allocate a subset of physical memory to a virtual partition, you specify the desired amount of memory (a size) to allocate to a partition using the mem:: parameter in the vparcreate or vparmodify commands.
Managing Virtual Partitions I/O Allocation I/O Allocation When planning or performing I/O allocation, note the following: • When you are planning your I/O to virtual partition assignments, note that only one virtual partition may own any hardware at or below the LBA (Local Bus Adapter) level. In other words, hardware at or below the LBA level must be in the same partition.
Managing Virtual Partitions I/O Allocation • OLAR (On-Line Addition and Replacement) for PCI slots works the same on a vPars computer as it does on a non-vPars computer. However, you can use OLAR functions only from the partition that owns the PCI slot. • HP-UX does not support the dump, swap, and console I/O attributes. See the vparresources (5) manpage for more information on the I/O attributes. • You can add or delete I/O to or from a partition only when the partition is down.
Managing Virtual Partitions When to Shutdown All Partitions When to Shutdown All Partitions The only times you need to shutdown all the virtual partitions are when: • a hardware change or problem requires the computer to be down. • the entire computer hangs. This might be a problem with the monitor.
Managing Virtual Partitions Monitor Crash Dump Monitor Crash Dump If a virtual partition crashes, a vPars monitor dump is created in addition to the kernel dump. If the monitor panics, a monitor dump is created, but no kernel dumps are created. Please contact your HP Support Representative for help on monitor and kernel crash dump analysis. Directory Location and Filenames When a partition crashes, the monitor dump file is initially written to a pre-existing file /stand/vpmon.dmp.
Managing Virtual Partitions Monitor Crash Dump NOTE TOC and Kernel Dumps: If a TOC (transfer of control) for the entire computer is generated either through a Ctrl-B TC command or by an OS of a virtual partition, a kernel dump will not automatically be saved to /var/adm/crash for those partitions that have not previously had a kernel dump occur. You can save their dumps to /var/adm/crash by performing the following on each of those partitions: Step 1.
Managing Virtual Partitions Crash Processing Crash Processing Crash processing for a partition’s OS is similar to the crash processing on a non-vPars OS: the OS is quiesced, portions of memory are written to disk, and in the case of vPars, resources are released to the monitor. After the monitor dump is written to disk, you can let the crash processing continue or you can enter the crash user interface: • To let the crash processing continue, do nothing.
Managing Virtual Partitions Crash Processing The menu choices mean: 1. displays memory from for 32-bit words. For example: Enter Address: 0x1000 4 0x00001000 0x00000000 0x1200a000 0xaa400000 0x00000000 Enter Address: quit 2. continues with the default crash handling 3. allows you to chose an alternate device to which the monitor dump is written. The alternate device must contain the pre-allocated file /stand/vpmon.dmp. The file vpmon.
Managing Virtual Partitions System-wide Stable Storage and Setboot System-wide Stable Storage and Setboot On a vPars computer, the setboot command does not read from or write to stable storage. Instead, the setboot command reads from and writes to the vPars partition database, affecting only the entries of the partition from which the setboot command was run.
Managing Virtual Partitions Ignite/UX Network Recovery Ignite/UX Network Recovery For information on Ignite/UX, see the manual "Ignite/UX Administration Guide". Making an Archive of a Partition make_tape_recovery is not supported for vPars computers. You need to use make_net_recovery. make_net_recovery works the same for making archives of both non-vPars and vPars computers.
Managing Virtual Partitions Ignite/UX Network Recovery 4. Boot the target partition and point the boot kernel to use your Ignite/UX server (assume the Ignite server’s IP is 15.xx.yy.zz): winona1# vparboot -p winona2 -I 15.xx.yy.zz,/opt/ignite/boot/WINSTALL 5. Run the Ignite/UX recovery as you would on a non-vPars computer, entering the data (boot disk and LAN) of the target partition. 6.
Managing Virtual Partitions Expert Recovery Expert Recovery When you are performing Expert Recovery, you need to remember the following: • You can no longer read from or write to system-wide stable storage using setboot. See “System-wide Stable Storage and Setboot” on page 42. • mkboot modifies the LIF area, but vPars does not use the LIF area to boot a virtual partition. See “mkboot and LIF files” on page 18 and “Simulating the AUTO File on a Partition” on page 104.
Managing Virtual Partitions Expert Recovery 46 Chapter 3
4 Planning Your Virtual Partitions and Installing vPars This chapter covers • Example Computer • Planning Your Virtual Partitions • Installing vPars • Removing vPars Chapter 4 47
Planning Your Virtual Partitions and Installing vPars Example Computer Example Computer For all examples used in this chapter, we will use the following N-class hardware configuration: Figure 4-1 Example N-Class Computer 48 Chapter 4
Planning Your Virtual Partitions and Installing vPars Example Computer full ioscan output # ioscan H/W Path Class Description =================================================== root 0 ioa System Bus Adapter (803) 0/0 ba Local PCI Bus Adapter (782) 0/0/0/0 lan HP PCI 10/100Base-TX Core 0/0/1/0 ext_bus SCSI C895 Fast Wide LVD 0/0/1/0.7 target 0/0/1/0.7.0 ctl Initiator 0/0/2/0 ext_bus SCSI C875 Ultra Wide Single-Ended 0/0/2/0.6 target 0/0/2/0.6.0 disk SEAGATE ST39102LC 0/0/2/0.7 target 0/0/2/0.7.
Planning Your Virtual Partitions and Installing vPars Example Computer 0/10 0/12 1 1/0 1/2 1/2/0/0 1/2/0/0.0 1/2/0/0.0.0 1/2/0/0.7 1/2/0/0.7.0 1/2/0/1 1/2/0/1.7 1/2/0/1.7.0 1/4 1/4/0/0 1/4/0/0.5 1/4/0/0.5.0 1/4/0/0.7 1/4/0/0.7.0 1/4/0/1 1/4/0/1.7 1/4/0/1.7.
Planning Your Virtual Partitions and Installing vPars Example Computer 101 104 105 108 109 192 processor pbc processor pbc processor memory Chapter 4 Processor Bus Converter Processor Bus Converter Processor Memory 51
Planning Your Virtual Partitions and Installing vPars Planning Your Virtual Partitions Planning Your Virtual Partitions Before you install vPars, you should have a plan of how you want to create virtual partitions within your computer.
Planning Your Virtual Partitions and Installing vPars Planning Your Virtual Partitions Recommended Number of Partitions For performance reasons, HP recommends the following: Computer Number of Partitions L3000 up to 2 partitions N-class up to 4 partitions Maximum Number of Partitions The maximum number of partitions for the L3000 and N-class computers is the number of CPUs given the following limitations: • Because the I/O combo cards are not supported for boot disks and if you require a network inte
Planning Your Virtual Partitions and Installing vPars Planning Your Virtual Partitions HP recommends using the corresponding hostnames for partition names, but they are not internally related.
Planning Your Virtual Partitions and Installing vPars Planning Your Virtual Partitions 97 101 105 109 processor processor processor processor Processor Processor Processor Processor For this example, winona1 will have two bound CPUs, winona2 will have two bound CPUs where the hardware paths will be 41 and 45, and winona3 will have one bound CPU.
Planning Your Virtual Partitions and Installing vPars Planning Your Virtual Partitions For simplified I/O block diagrams of the LBA to physical slot relationship, see Appendix A, “Hardware Path to Physical I/O Slot Correspondence,” on page 117. Assigning I/O at the LBA Level.
Planning Your Virtual Partitions and Installing vPars Planning Your Virtual Partitions Ensuring the Hardware Console Port Is Owned by the First Virtual Partition In our example computer, the hardware console port is at 0/0/4/0, which uses the LBA at 0/0. The LBA 0/0 is owned by the partition winona1: console port 0/0/4/0 LBA 0/0 partition winona1 When we create the virtual partitions, we will create winona1 first.
Planning Your Virtual Partitions and Installing vPars Planning Your Virtual Partitions Autoboot Autoboot allows a partition to be booted automatically on a cold boot of the computer. By default, autoboot is set to AUTO for all partitions. Partition Name winona1 winona2 winona3 Autoboot AUTO AUTO AUTO For more information, see the vparmodify (1M) manpage.
Planning Your Virtual Partitions and Installing vPars Planning Your Virtual Partitions LAN 0/0/0/0 console port Autoboot Chapter 4 1/10/0/0/4/0 0/5/0/0/4/0 owned by winona1 AUTO AUTO AUTO 59
Planning Your Virtual Partitions and Installing vPars Installation Installation You can install vPars directly from a depot or CD or by using an Ignite/UX server. Related Information For information on using Ignite/UX and adding the vPars bundles to your Ignite server, see the manual "Ignite/UX Administration Guide". For information on the installation of HP-UX, see the manual "HP-UX 11i Installation and Update Guide".
Planning Your Virtual Partitions and Installing vPars Installation • If you are using a LAN-based terminal emulator of type “dtterm” or “xterm”, set the GSP terminal-type setting to vt100. How to Set the GSP Terminal Type Step 4. Access the GSP through the lan console, the remote-modem port, or a physically connected terminal. Step 5. Use the CA command at the GSP prompt to modify the console attributes: GSP> ca Step 6.
Planning Your Virtual Partitions and Installing vPars Installation The virtual partitions that you create will use this terminal-type setting for their virtual console displays. TIP If you get a garbled display, you can press Ctrl-L to refresh the display.
Planning Your Virtual Partitions and Installing vPars Installation NOTE The WINSTALL_script saves a copy of the original WINSTALL file. If an Ignite/UX installation to a non-vPars computer fails, execute the WINSTALL_script again to put back the original WINSTALL file.
Planning Your Virtual Partitions and Installing vPars Installing vPars Using Ignite/UX Installing vPars Using Ignite/UX NOTE Before installing vPars, read the section “Updating Your Ignite Server” on page 62. 1. Boot your computer using the Ignite/UX server. If your Ignite server’s IP address is 15.xx.yy.zz: BCH> bo lan.15.xx.yy.zz install Interact with IPL: n 2.
Planning Your Virtual Partitions and Installing vPars Installing vPars Using Ignite/UX 6. Interrupt the boot process as your computer comes back up to reach the ISL prompt. BCH> bo pri interact with IPL: y 7. At the ISL prompt, boot the monitor and the initial virtual partition. In our example, the command is: ISL> hpux /stand/vpmon vparload -p winona1 8. From the console of the running partition (in this example, the running partition is winona1), perform the following for each remaining partition: a.
Planning Your Virtual Partitions and Installing vPars Installing vPars Using Ignite/UX patches, the Quality Pack bundle, and the vPars software. As a result of this process, the partition will automatically reboot. TIP If you get a garbled display, you can press Ctrl-L to refresh the display. Your computer should now be booted with all virtual partitions up.
Planning Your Virtual Partitions and Installing vPars Installing vPars Using Software Distributor Installing vPars Using Software Distributor 1. For the root disk of each partition, use Software Distributor to install HP-UX, desired patches, the Quality Pack bundle, and the vPars software bundle. (For more information on the Quality Pack bundle, see “Quality Pack” on page 63.) 2. Boot the disk that is intended to be the boot disk of the first partition into the normal (non-vPars) HP-UX environment.
Planning Your Virtual Partitions and Installing vPars Installing vPars Using Software Distributor BCH> bo pri interact with IPL: y 7. At the ISL prompt, boot the monitor and all the virtual partitions. In our example, the command is: ISL> hpux /stand/vpmon -a Your computer should now be booted with all virtual partitions up.
Planning Your Virtual Partitions and Installing vPars Removing vPars Removing vPars To remove the vPars product, execute the swremove command from the target partition. For example, to remove the vPars product from the partition winona3: winona3# /usr/sbin/swremove VirtualPartitions NOTE If you have modified the AUTO file in the LIF area of the boot disk of the target partition to include the monitor (/stand/vpmon), you should return the AUTO file contents to its standalone state.
Planning Your Virtual Partitions and Installing vPars Removing vPars 70 Chapter 4
5 Monitor and Shell Commands This chapter covers: • vPars Manpages • Booting the Monitor • Accessing the Monitor Prompt • Monitor Commands • Creating a Partition • Booting a Partition • Using Primary and Alternate Boot Paths • Shutting Down or Rebooting a Partition • Shutting Down or Rebooting the Computer • Removing a Partition • Autobooting the Monitor and All Virtual Partitions • Obtaining Monitor and Hardware Resource Information • Resetting a Hung Partition • Booting a Partition Into Single-User Mode
Monitor and Shell Commands Manpages Manpages The purpose of this document is to describe vPars concepts and how to perform common vPars tasks. For detailed information on the vPars commands, including description, syntax, all the command line options, and the required state of a partition for each command, see the vPars manpages.
Monitor and Shell Commands Notes on Examples in this Chapter Notes on Examples in this Chapter Syntax of Example Commands The example commands at the UNIX shell level in the following section use the following syntax: where the shell prompt consists of the hostname of the current virtual partition and the hash sign (#).
Monitor and Shell Commands Booting the vPars Monitor Booting the vPars Monitor To boot the vPars monitor, at the ISL prompt specify /stand/vpmon: ISL> hpux /stand/vpmon With no arguments to /stand/vpmon, the monitor will load and go into interactive mode with the following prompt: MON> The following options are available when booting the monitor: -a boots all virtual partitions that have the autoboot attribute set. For more information, see vparmodify (1M).
Monitor and Shell Commands Accessing the Monitor Prompt Accessing the Monitor Prompt You can reach the monitor prompt in the following ways: • From the ISL prompt, you can boot the monitor into interactive mode (see “Booting the vPars Monitor” on page 74). • After shutting down all virtual partitions, you will arrive at the monitor prompt on the console (see “Shutting Down or Rebooting the Computer” on page 91).
Monitor and Shell Commands Using Monitor Commands Using Monitor Commands You can use the following monitor commands at the monitor prompt for booting and basic troubleshooting. However, most vPars operations should be performed using the vPars shell commands. Note the following for the monitor commands: • Unless specifically stated, all operations occur only on the boot disk from which the monitor was booted. Usually, this is the boot disk of the primary path entry in system-wide stable storage.
Monitor and Shell Commands Using Monitor Commands Note: This command can only be used when the monitor /stand/vpmon is booted and the default partition database (/stand/vpdb) does not exist, the alternate partition database as specified in the -p option of /stand/vpmon does not exist, or the database file read is corrupt. For information on when the monitor is booted, see “Boot Sequence” on page 26. For more information on the -p option, see “Booting the vPars Monitor” on page 74.
Monitor and Shell Commands Using Monitor Commands Examples: To boot the partition winona2 into single-user mode: MON> vparload -p winona2 -o "-is" To boot the partition winona2 using the kernel /stand/vmunix.other: MON> vparload -p winona2 -b /stand/vmunix.prev To boot the partition winona2 using the disk device at 0/8/0/0.2.0: MON> vparload -p winona2 -B 0/8/0/0.2.0 Note: -b kernelpath allows you to change the target kernel for only the next boot of partition_name.
Monitor and Shell Commands Using Monitor Commands Displaying Information • cat filename [openonly] displays the contents of filename. When openonly is specified, this command only prints "open succeeded" if the monitor was able to open the filename. This command is similar to the Unix cat command. filename must be a text file on an HFS file system. /stand is the default directory Example: To display the file /stand/notes.txt MON> cat notes.txt 10/13/2001: built new kernel today.
Monitor and Shell Commands Using Monitor Commands • ls [-alniFH ] [directory] lists the contents of directory. This command is similar to the Unix ls command. directory must be on a HFS file system. /stand is the default directory The ls command-line options are the same as the Unix shell ls options. For detailed explanations, see the ls (1M) manpage.
Monitor and Shell Commands Using Monitor Commands partition_name is given, vparinfo displays the resources assigned to partition_name.
Monitor and Shell Commands Using the Monitor Commands at the ISL Prompt Using the Monitor Commands at the ISL Prompt You can specify any of the monitor commands either at the monitor prompt (MON>) or at the ISL prompt (ISL>). If you are at the ISL prompt, use the desired command as the argument for the monitor /stand/vpmon.
Monitor and Shell Commands Creating a Partition Creating a Partition You can create a virtual partition using the vparcreate command. NOTE When you create a partition, the vPars monitor assumes you will boot and use the partition. Therefore, when a partition is created, even if it is down and not being used, the resources assigned to it cannot be used by any other partition. Also, when using vPars, the physical hardware console port must be owned by a partition.
Monitor and Shell Commands Creating a Partition Resource or Attribute vparcreate Option all hardware where the path begins with 0/8 -a io:0/8 all hardware where the path begins with 1/10 -a io:1/10 hardware at 0/8/0/0.5.0 as the boot disk -a io:0/8/0/0.5.0:boot The resulting vparcreate command line is: winona1# vparcreate -p winona2 -a cpu::3 -a cpu:::2:4 -a cpu:41 -a cpu:45 –a mem::1280 –a io:0/8 -a io:1/10 -a io:0/8/0/0.5.
Monitor and Shell Commands Creating a Partition winona1# vparstatus -p winona2 -v Chapter 5 85
Monitor and Shell Commands Booting a Partition Booting a Partition To boot a single virtual partition, use either the monitor command vparload or the shell command vparboot.
Monitor and Shell Commands Setting and Booting a Partition Using Primary and Alternate Boot Paths Setting and Booting a Partition Using Primary and Alternate Boot Paths You can set the primary and alternate boot paths of a virtual partition by using the HP-UX setboot command or the vPars BOOT and ALTBOOT attributes. For more information on how setboot works on a vPars computer, see “System-wide Stable Storage and Setboot” on page 42.
Monitor and Shell Commands Setting and Booting a Partition Using Primary and Alternate Boot Paths winona1# vparcreate -p winona2 -a io:0/8/0/0.5.0:BOOT -a io:0/8/0/0.2.0:ALTBOOT Using vparmodify If the partitions are created already, you can specify the primary or alternate boot paths with the BOOT and ALTBOOT attributes within the vparmodify command: To set the primary boot path: winona1# vparmodify -p winona2 -a io:0/8/0/0.5.
Monitor and Shell Commands Setting and Booting a Partition Using Primary and Alternate Boot Paths MON> vparload -p winona2 -B 0/8/0/0.2.
Monitor and Shell Commands Shutting Down or Rebooting a Partition Shutting Down or Rebooting a Partition A virtual partition can be gracefully shut down or rebooted via the HP-UX command shutdown. To ensure that the partition database is synchronized (see “Partition Database” on page 25), execute the vparstatus command prior to executing the shutdown command.
Monitor and Shell Commands Shutting Down or Rebooting the Computer Shutting Down or Rebooting the Computer To shutdown or reboot a vPars computer gracefully, you need to do the following: 1. Log into every virtual partition that is running and gracefully shutdown the partition via shutdown. There is no command that shuts down all the virtual partitions at the same time. You need to shutdown every partition one at a time. The same is true for rebooting all the virtual partitions.
Monitor and Shell Commands Removing a Partition Removing a Partition To remove a virtual partition, use vparremove. vparremove purges the partition from the vPars partition database. Any resources dedicated to the virtual partition are now free to allocate to a different partition. You need to shutdown the partition before attempting removal. If the target partition is running, vparremove will fail. Example To remove a partition named winona2: 1.
Monitor and Shell Commands Autobooting the Monitor and All Virtual Partitions Autobooting the Monitor and All Virtual Partitions You can setup the monitor and all virtual partitions to boot automatically at power up. To do this, make sure the following four conditions are met: 1. The computer’s primary and alternate boot paths point to the boot disks of different partitions. For example, to set the primary and alternate boot paths: BCH> pa pri 0/0/2/0.6.0 BCH> pa alt 0/8/0/0.5.0 2.
Monitor and Shell Commands Autobooting the Monitor and All Virtual Partitions winona1# vparmodify -p winona1 -B auto winona1# vparmodify -p winona2 -B auto winona1# vparmodify -p winona3 -B auto NOTE All changes to stable storage can only be performed at the BCH> prompt. See “System-wide stable storage and the setboot command” on page 18. If you need to reboot the computer as part of the process to access the BCH>, see “Shutting Down or Rebooting the Computer” on page 91.
Monitor and Shell Commands Obtaining Monitor and Hardware Resource Information Obtaining Monitor and Hardware Resource Information The monitor and the partition database that is has loaded maintains information about the virtual partitions. Using vparstatus, you can obtain this information, which includes the current state of the partitions and their resources. See the manpage vparstatus (1M).
Monitor and Shell Commands Obtaining Monitor and Hardware Resource Information [Virtual Partition Resource Summary] Virtual Partition Name ============================== winona1 winona2 winona3 CPU Num CPU Bound/ IO Min/Max Unbound devs ================ ==== 2/ 8 2 0 2 1/ 8 2 1 2 1/ 8 1 0 2 Memory (MB) # Ranges/ Total MB Total MB ==================== 0/ 0 640 0/ 0 1280 0/ 0 1280 • To see the current state of winona2: winona1# vparstatus -p winona2 -v | grep -E "Name|State" Name: winona2 State: Up • To
Monitor and Shell Commands Obtaining Monitor and Hardware Resource Information [Available I/O devices (path)]: [Unbound memory (Base /Range)]: (bytes) (MB) [Available memory (MB)]: 256 Chapter 5 1.
Monitor and Shell Commands Resetting a Hung Partition Resetting a Hung Partition Just as it is occasionally necessary to issue a hard reset (RS) or a soft reset (TOC) for a non-vPars OS instance, it is occasionally necessary to issue similar resets for a vPars OS instance. Hard Reset On a non-vPars computer, a hard reset cold boots the entire computer.
Monitor and Shell Commands Resetting a Hung Partition To simulate a soft reset on only one partition, from a running partition, use vparreset with the -t (for TOC) option. For example, if winona2 is hung, we can execute vparreset from the running partition winona1: winona1# vparreset -p winona2 -t The target virtual partition either shuts down or reboots according to the setting of the autoboot attribute of that virtual partition. Other virtual partitions are unaffected when one virtual partition is reset.
Monitor and Shell Commands Booting a Partition into Single-User Mode Booting a Partition into Single-User Mode It is occasionally necessary to boot HP-UX into single-user mode to diagnose issues with networking or other components. On a non-vPars computer, you do this by using the -is option at the ISL prompt: ISL> hpux –is On a vPars computer, you can boot a virtual partition into single-user mode either at the monitor prompt or at the shell prompt of a running partition.
Monitor and Shell Commands Booting a Partition into Single-User Mode After you have entered into single-user mode and if you want to turn autoboot back on, the command is: winona1# vparmodify -p winona2 -B auto Chapter 5 101
Monitor and Shell Commands Using Other Boot Options Using Other Boot Options In the same way you can boot a virtual partition into single-user mode (see “Booting a Partition into Single-User Mode” on page 100), you can boot a partition using other boot options.
Monitor and Shell Commands Using Other Boot Options Overriding Quorum In LVM, when the root disk is mirrored, the computer can only activate the root volume group, which contains the OS instance, when the majority of the physical volumes in a root volume group are present at boot time. This is called establishing a quorum. Sometimes, you may want to boot an OS instance regardless of whether a quorum is established. You can override the quorum requirement by using the -lq option.
Monitor and Shell Commands Simulating the AUTO File on a Partition Simulating the AUTO File on a Partition On a non-vPars computer, the LIF’s AUTO file on the boot disk can contain a boot string that includes boot options, such as -lq for booting without quorum, or a boot kernel path, such as /stand/vmunix.other for booting an alternate kernel. The AUTO file can be changed either through lif shell commands or mkboot.
Monitor and Shell Commands Simulating the AUTO File on a Partition what can be in the LIF AUTO file is a boot string that boots the monitor. See “Autobooting the Monitor and All Virtual Partitions” on page 93.
Monitor and Shell Commands Modifying Attributes of a Partition Modifying Attributes of a Partition You can change a virtual partition’s name and its resource attributes via the vparmodify command. When using vparmodify to change attributes, the partition can be running, and the changes take effect immediately. See the manpage vparmodify (1M) for more information on attributes.
Monitor and Shell Commands Adding or Removing Hardware Resources Adding or Removing Hardware Resources You can assign resources to a virtual partition at creation time via arguments to the vparcreate command, but if a partition already exists, you can only add or remove resources via the vparmodify command. All resources are managed the same way, except for CPUs. For information on managing CPUs, see “Adding and Removing CPU Resources” on page 108.
Monitor and Shell Commands Adding and Removing CPU Resources Adding and Removing CPU Resources CPU Allocation Syntax In Brief To understand how to assign CPUs, you need to understand the command syntax. Below is a brief explanation of the CPU allocation syntax for the vparcreate command. For complete information, see the vparcreate (1M), vparmodify (1M), and vparresources (5) manpages.
Monitor and Shell Commands Adding and Removing CPU Resources CPUs; in this case, it sets the total number of CPUs (bound plus unbound) to three. With the -a option (as well as the -d option), the number used with the -a is a relative number of CPUs (relative to the number of CPUs already assigned to the partition).
Monitor and Shell Commands Adding and Removing CPU Resources winona1# vparcreate -p winona2 -a cpu::2 -a cpu:::2 -a cpu:41 • If you want to specify multiple processors, use the -a cpu:hw_path option for each hardware path. For example, if you want to specify the CPU at hardware path 41 and the CPU at hardware path 45, the command is: winona1# vparcreate -p winona2 -a cpu::2 -a cpu:::2 -a cpu:41 -a cpu:45 Note that because there are two paths specified, min must be greater than or equal to two.
Monitor and Shell Commands Adding and Removing CPU Resources the hardware path 41, modify min to one, and modify total number to one: # vparmodify -p winona2 -d cpu:41 -m cpu:::1 -m cpu::1 NOTE: If you delete only hw_path and leave total as two and leave min as two, you will still have two bound CPUs. NOTE When executing any operations relating to bound CPUs (adding, modifying, or deleting), the target partition must be down.
Monitor and Shell Commands Adding and Removing CPU Resources • Because you can dynamically migrate unbound CPUs, you can migrate an unbound CPU from one partition to another while both partitions are running.
Monitor and Shell Commands Using an Alternate Partition Database File Using an Alternate Partition Database File By default, the local copy of the vPars partition database is kept in the file /stand/vpdb on the boot disk of each partition. However, you can create, edit, and delete virtual partitions in an alternate partition database file by using the "-D filename" option in the vPars command string, where filename is the name of the alternate partition database file.
Monitor and Shell Commands Using an Alternate Partition Database File You could create an alternate partition database where the configuration is: Partition Name winsim1 winsim2 Bound CPUs total = 4 min = 4 total = 4 min = 4 Unbound CPUs no CPUs are available Memory 1600 MB 1600 MB I/0 Paths (LBAs) 0/0 0/4 0/8 1/10 1/2 Boot Path 0/0/2/0.6.0 0/8/0/0.5.0 LAN 0/0/0/0 1/10/0/0/4/0 Autoboot AUTO AUTO To create and boot using an alternate partition database, perform the following: 1.
Monitor and Shell Commands Using an Alternate Partition Database File 2. Shutdown all the virtual partitions and reboot the computer: winona3# vparstatus ; shutdown -hy 0 winona2# vparstatus ; shutdown -hy 0 winona1# vparstatus ; shutdown -hy 0 MON> reboot 3. Interrupt the boot process and boot the monitor /stand/vpmon specifying the -p alternate partition database option and the -a autoboot option: BCH> bo pri interact with IPL: y ISL> hpux /stand/vpmon -D /stand/vpdb.
Monitor and Shell Commands Using an Alternate Partition Database File • Be careful when creating partitions using the -D option. Fewer checks on configuration are being performed. It is possible to create a partition configuration that is not valid. • All LVM rules still apply. For example, you cannot migrate I/O only by re-assigning the I/O to a different partition; you must still vgexport and vgimport the volume groups.
A Hardware Path to Physical I/O Slot Correspondence This section contains a simplified I/O block diagrams for the L3000 and N-class computers. These diagrams can be used to help determine which LBAs correspond to which physical I/O slots. For more information, see the hardware manuals for these computers.
Hardware Path to Physical I/O Slot Correspondence L3000 I/O Block Diagram L3000 I/O Block Diagram Figure A-1 L3000 I/O Block Diagram LBA 12 Slot 12 Path 0/10/0 Slot 11 Path 0/12/0 Slot 10 Path 0/8/0 LBA 8 Slot 9 Path 0/9/0 SBA 0 LBA 9 Slot 8 Path 0/3/0 LBA 3 Slot 7 Path 0/1/0 LBA 1 Slot 6 Path 0/5/0 HotPlug PCI I/O Slots 5-12 LBA 10 Slot 5 Path 0/2/0 LBA 5 Slot 4 Path 0/4/0 GSP/Console LBA 2 Slot 4 Path 0/4/2 LBA 4 LBA 0 118 Slot 2 Slot 1 LAN 10/100BT SCSI - 2x dual LVD Console 0/0/4/0.
Hardware Path to Physical I/O Slot Correspondence N-class I/O Block Diagram N-class I/O Block Diagram Figure A-2 N4000 I/O Block Diagram I/O Backplane Cabinet 00 Cardcage 01 Backplane 01 0/2/0 Slot 6 4 x PCI LBA 2 0/10/0 Slot 5 4 x PCI LBA 10 0/8/0 Slot 4 4 x PCI 0/12/0 System Board Cabinet 00 Cardcage 00 I/O Backplane Cabinet 00 Cardcage 02 Backplane 02 1/0/0 LBA 8 Slot 11 4 x PCI 1/8/0 LBA 8 LBA 2 Slot 10 4 x PCI 1/2/0 Slot 3 4 x PCI LBA 12 LBA 4 Slot 9 4 x PCI 1/4/0 0/4/0 Slot
Hardware Path to Physical I/O Slot Correspondence N-class I/O Block Diagram 120 Appendix A
B Problem with Adding Unbound CPUs to an Existing Partition Unbound CPUs allow you to easily adjust processing power between virtual partitions. But a corner case can occur where you will not be able to add specific unbound CPU(s) without rebooting the target partition. This appendix discusses when this situation can occur and how to work around it.
Problem with Adding Unbound CPUs to an Existing Partition Symptoms Symptoms When attempting to add an unbound CPU, you may see the following error message: One or more unbound CPUs were not available when virtual partition was booted. You must shutdown the partition to add them. This means that the unbound CPU cannot be dynamically added to the partition.
Problem with Adding Unbound CPUs to an Existing Partition Cause Cause When a virtual partition boots, the HP-UX kernel creates a table of the existing unbound CPUs available at the time the partition is booted. If there is not an existing entry in the table for a specific CPU, that CPU cannot be added to the partition.
Problem with Adding Unbound CPUs to an Existing Partition Cause Note that the entries for the unbound CPUs are only entries for unbound CPUs that can potentially be added to the partition.
Problem with Adding Unbound CPUs to an Existing Partition Cause Remove a Partition If we shutdown and remove vpar2 (using vparremove), its bound CPUs will become unbound, and the current configuration will be the following: Virtual Partition vpar1 vpar3 vpar4 Paths of Bound CPU(s) x01 x02 x05 x06 x07 x08 Unbound CPU Kernel Entries x06 x07 x08 x06 x07 x08 (none) Paths of Unbound CPUs unbound CPUs are now at x03 and x04 There are now two unbound CPUs, but these CPUs are not the same processors t
Problem with Adding Unbound CPUs to an Existing Partition Cause In our example, if we want to add an unbound CPU to vpar3, we can reboot vpar3: vpar3# vparstatus vpar3# shutdown -r When vpar3 boots again, its kernel will create the correct entries for the unbound CPUs, which are now at x03 and x04.
C Calculating the Size of Kernels in Memory One requirement of vPars is the sum of sizes of the kernels running in memory must be less than 2 GB. This only limits the maximum number of partitions that can be created. If you use the defaults of the dynamic tunables, you will not run into this 2 GB limit. However, if you have adjusted the dynamic tunables, you can perform the calculations described in this appendix to ensure you meet this criteria.
Calculating the Size of Kernels in Memory Calculating the Size of a Kernel Calculating the Size of a Kernel To calculate the size of the kernel, perform the following using the kernel file (for example, /stand/vmunix) on the target OS: Step 1. Get the ending address: # nm /stand/vmunix | grep "ABS|_end" [10828] | 212937784| 0|NOTYP|GLOB |0| ABS|_end The ending address is the second number: 212937784 Step 2.
Calculating the Size of Kernels in Memory Examples of Using the Calculations Examples of Using the Calculations Changing Dynamic Tunables If you have already migrated to a vPars computer and are adjusting the dynamic tunables of a kernel, check that there is an available memory range under the 2 GB boundary to accommodate the adjusted kernel. You should do this check after adjusting the dynamic tunables but before rebooting the partition.
Calculating the Size of Kernels in Memory Examples of Using the Calculations below the 2 GB limit, so we have met the criteria and can migrate the OSs from the multiple non-vPars computers to the single vPars computer.
Glossary bound CPU a CPU that cannot be migrated from or to partitions while the involved partitions are running. Bound CPUs can handle I/O interrupts. dynamic CPU migration the vPars ability to add or remove floater CPUs while a partition is running. hard partition a physical partition of a computer that divides the computer into groups of cell boards where each groups operates independently of other groups. A hard partition can run a single instance of HP-UX or be further divided into virtual partitions.
Index Symbols /stand filesystem, 18, 63 A adding CPU resources to a partition, 108 adding resources to a partition, 107 alternate partition database files, 113 application fault isolation, 13 attributes, 106 AUTO LIF file, 104 Autoboot, 58, 93 B BCH.
Index independent operating system instances, 13 floater CPUs. See unbound CPUs free product, 20 G getauto, 79 glance, 16 GSP.
Index O OLAR.
Index compared to hard partitions, 11 creating, 83 defined, 11 maximum number of, 53 monitor, 24 naming, 53 rebooting, 90 recommended number of, 53 removing, 92 removing hardware resources, 107 shutdown, 90 shutting down, 90 shutting down all, 37 shutting down all,, 37 status of, 95 Virtual Partitions product benefits of, 13 bundle names, 63 features of, 12 manpages, 72 partitioning with, 22 product interaction, 15 security issues, 30 used with Glance, 16 used with iCOD, 15 used with Ignite/UX, 16 used with