Installation of Virtual Partitions
Installing
Virtual Partitions is straightforward. The two most common methods used
for installing the vPar software are (a) using an Ignite-UX server to
install HP-UX and vPars together, and (b) installing and booting HP-UX
and then installing the vPar software as a separate step afterward. It
is generally recommended that you set up an Ignite-UX server and
install HP-UX and the vPar software in a single step because it
expedites the process of deploying vPars.
For
this example, the process of installing vPars will not be covered in
detail. It is assumed the vPars software has been installed on the zoo6 nPartition. Running the swlist command shows the vPars software is in fact installed on the zoo6 nPartition.
# swlist | grep Virtual
T1335AC A.03.01.03 HP-UX Virtual Partitions
Even though the vPars product
is installed, it has not been configured for use. The vPar monitor is
not running and no vPars have been created. This is evident by running
the vparstatus command.
# vparstatus
vparstatus: Error: Virtual partition monitor not running.
Create the First Virtual Partition
Creating
the first vPar is similar to the creation of subsequent vPars with one
important difference. Because the vPar Monitor is not yet running, the
resources assigned to the vPar are not validated by the vPar commands.
It is possible to create the first vPar in such a way that it will not
be bootable. For example, too much memory could be assigned to the
vPar, or I/O devices that don't exist in the nPartition could be
assigned. As a result, it is important to ensure that the paths and
resources assigned to the first vPar are manually validated against the
resources available in the system as captured during the planning
process. The command shown in Listing 3 creates the first vPar.
note
The LBA with the hardware console must be assigned to the first vPar created.
Listing 3. Create Virtual Partition Command
# /usr/sbin/vparcreate -p zoo24 \ > -a cpu::1 \ > -a cpu:::1:3 \ > -a mem::1024 \ > -a io:6/0/0 \ > -a io:6/0/6/0/0.2.0:boot \ > -a io:6/0/6/0/0.4.0:altboot
|
The following list describes each argument and its purpose in the command:
-p zoo24:
The vPar is named zoo24.
-a cpu::1:
The number of CPUs that are assigned to the vPar.
-a cpu:::1:3:
The minimum number of CPUs that will be bound to this vPar is one and maximum number of CPUs is three.
-a mem::1024:
The vPar contains 1GB of memory.
-a io:6/0/0:
All of the I/O devices below the LBA with hardware address 6/0/0 are assigned to the zoo24 vPar. Adding the 6/0/0
LBA assigns the core I/O card to the zoo24
vPar. This assigns the physical console and core LAN device to the
vPar. Remember, I/O resources assigned at the LBA level assigns
everything below the 6/0/0
LBA to zoo24.
-a io:6/0/6/0/0.2.0:boot:
This option specifies the primary boot device.
-a io:6/0/6/0/0.4.0:altboot:
This option specifies the alternate boot device.
The
final two options are of particular importance because beyond
specifying the primary and alternate boot devices, the options also
implicitly assign the LBA 6/0/6 to the vPar. Just as assigning 6/0/0 adds everything under that path, the implicit assignment of 6/0/6 results in no other vPar having access to devices under the 6/0/6
LBA. The addition of the option –a io:6/0/6
would have explicitly assigned the LBA to the vPar, but it would not
have changed the behavior of the vPars; the only effect would have been
the output shown by vparstatus. LBAs implicitly assigned to vPars are not shown by vparstatus; only explicitly assigned LBAs are shown.
The command shown in Listing 3 creates the first vPar using the default vPar database file located at /stand/vpdb. If the default vPar database doesn't exist it will be automatically created. In this example, zoo24 was the first vPar to be created and the file didn't exist, so the vparcreate command created the file and defined the zoo24 partition.
The zoo24 vPar has now been created, but it is not yet active. Listing 4 shows the output of the vparstatus command after creating the first vPar. The initial warning makes it clear the vPar monitor is still not running. The zoo24 vPar exists in the database and has a minimum of one CPU and a maximum of three. Additionally, the LBA
6/0/0 is assigned to the vPar and the two boot devices are also specified. Notice the 6/0/6
LBA is not explicitly mentioned in the vparstatus output, but in fact it is assigned to the vPar.
Listing 4. Detailed Virtual Partition Status
# vparstatus -v -p zoo24 vparstatus: Warning: Virtual partition monitor not running, Requested resources shown. [Virtual Partition Details] Name: zoo24 State: N/A Attributes: Dynamic,Autoboot Kernel Path: /stand/vmunix Boot Opts:
[CPU Details] Min/Max: 1/3 Bound by User [Path]: Bound by Monitor [Path]: <no path> Unbound [Path]:
[IO Details] 6.0.0 6.0.6.0.0.2.0.0.0.0.0 BOOT 6.0.6.0.0.4.0.0.0.0.0, ALTBOOT
[Memory Details] Specified [Base /Range]: (bytes) (MB) Total Memory (MB): 1024
|