Adding and Removing Devices in Virtual Partitions

   

HP-UX Virtual Partitions
By Marty Poniatowski

Table of Contents
Chapter 5.  Virtual Partitions and Devices


Most of the work we've done related to Virtual Partitions has been static in nature; that is, we've configured a Virtual Partition with specific components and verified the configuration. We can add and remove devices from Virtual Partitions as well. In Chapter 2 we assigned an unbound CPU to vPar cable1. Let's review this process, which we can apply to tape drives as well as other devices.

graphics/intfig04.gif

In the upcoming example there is a four-processor system on which there are the two Virtual Partitions we just created: cable1 and cable2. Each vPar has one bound CPU that was assigned by min when the vPars were created. Let's run vparstatus to see the components of which these two Virtual Partitions are comprised and confirm that each has one bound CPU:

 # vparstatus -p cable1 -v  [Virtual Partition Details]  Name:         cable1  State:        Up  Attributes:   Dynamic,Manual  Kernel Path:  /stand/vmunix  Boot Opts:  [CPU Details]  Min/Max: 1/3  Bound by User [Path]:  Bound by Monitor [Path]:  33      <-- one bound CPU @ 33  Unbound [Path]:  [IO Details]     0.0     0.0.1.1.2.0 BOOT  [Memory Details]  Specified [Base  /Range]:            (bytes) (MB)  Total Memory (MB):  1024  # 
 # 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/3  Bound by ser  Path]:  Bound by Monitor [Path]: 37    <-- one CPU in use at 37  Unbound [Path]:  [IO Details]     0.8.0.0.8.0.5.0.0.0 BOOT     0.10  [Memory Details]  Specified [Base  /Range]:            (bytes) (MB)  Total Memory (MB):  1024  # 

graphics/intfig04.gif

The output of these two vparstatus commands shows that cable1 has one bound CPU, and cable2 has one bound CPU. On the L-Class system on which these vPars were created there are a total of four CPUs. This means that two CPUs should be available. Let's run vparstatus -A to view the available components on a system:

 # vparstatus -A  [Unbound CPUs (path)]:  97                          101  [Available CPUs]:  2  [Available I/O devices (path)]:  0.1                                   0.2                                   0.3                                   0.4                                   0.5                                   0.9                                   0.12                                   32                                   36                                   96                                   100  [Unbound memory (Base  /Range)]:  0x0/64                  (bytes) (MB)      0xc000000/1856                                    0x180000000/128  [Available memory (MB)]:  2048  # 

graphics/chic03.gif

This output confirms that there are two CPUs available at hardware paths 97 and 101. We can add these CPUs in a variety of ways. Let's use the vparmodify command to change the num of CPUs in cable1 to two CPUs. We do this by adding one to the current number of CPUs with -a.This is a relative operation in that one CPU will be added to the current number of CPUs. You can use vparmodify -m if you want to specify the absolute number of CPUs for the vPar rather than the relative number. The following shows this vparmodify command:

 # vparmodify -p cable1 -a cpu::1  # 

graphics/intfig04.gif

We c an n ow r un vparstatus -p cable1 -v to confirm that the CPU has been added, 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:  1/3  Bound by User [Path]:  Bound by Monitor [Path]:  33        <-- original CPU @ 33  Unbound [Path]: 97                  <-- umbound CPU @ 97  [IO Details]     0.0     0.0.1.1.2.0 BOOT  [Memory Details]  Specified [Base  /Range]:            (bytes) (MB)  Total Memory (MB):  1024  # 

graphics/intfig04.gif

The vparstatus output shows that the CPU at hardware path 97 has indeed been added to cable1 with the vparmodify command.

graphics/chic03.gif

In addition, we can run GlancePlus or top to confirm that there are two CPUs in use on cable2. The following is a top output run on cable2:

 # top  System: cvhdcon3                                      Thu Oct  4 15:30:42 2001  Load averages: 0.19, 0.51, 0.62  124 processes: 110 sleeping, 14 running  Cpu states:  CPU   LOAD   USER   NICE    SYS   IDLE  BLOCK  SWAIT   INTR   SSYS   0    0.37   0.0%   0.2%   0.0%  99.8%   0.0%   0.0%   0.0%   0.0%   1    0.02   0.0%   0.0%   0.8%  99.2%   0.0%   0.0%   0.0%   0.0%  ---   ----  -----  -----  -----  -----  -----  -----  -----  ----- avg   0.19   0.0%   0.2%   0.4%  99.4%   0.0%   0.0%   0.0%   0.0%  Memory: 93636K (57816K) real, 322124K (239536K) virtual, 746284K free  Page# 1/4  CPU TTY        PID USERNAME PRI NI   SIZE    RES STATE    TIME %WCPU  %CPU COMMAND   0   ?          36 root     152 20     0K   832K run      0:00  0.33  0.33 vxfsd   1   ?        1342 root     158 10    80K   212K sleep    0:10  0.28  0.28 cclogd   0   ?        1149 root     152 20  4644K  7260K run      0:06  0.21  0.21 prm3d   1   ?         922 root     154 24   540K   808K sleep    0:00  0.15  0.15 hpterm   0 pty/ttyp1  3114 root     186 24   596K   528K run      0:00  0.17  0.15 top   1   ?        1146 root     -16 20  7788K  7240K run      0:03  0.14  0.13 midaemon   1   ?           3 root     128 20     0K    32K sleep    0:04  0.11  0.11 statdaemon   0   ?        2018 root     154 20  3908K  1908K sleep    0:00  0.05  0.04 alarmgen   1   ?        1272 root     152 20   856K   960K run      0:00  0.04  0.04 opcmona   1   ?        1372 root     152 20  1076K  2356K run      0:00  0.04  0.04 samd   0   ?           0 root     128 20     0K     0K sleep    0:11  0.02  0.02 swapper   1   ?           1 root     168 20   448K   204K sleep    0:00  0.02  0.02 init   0   ?           2 root     128 20     0K    32K sleep    0:00  0.02  0.02 vhand   0   ?           4 root     128 20     0K    32K sleep    0:00  0.02  0.02 unhashdaemo   1   ?          20 root     147 20     0K    32K sleep    0:00  0.02  0.02 lvmkd   0   ?          22 root     147 20     0K    32K sleep    0:00  0.02  0.02 lvmkd   1   ?          24 root     147 20     0K    32K sleep    0:00  0.02  0.02 lvmkd   0   ?         339 root     154 20   152K   204K sleep    0:00  0.02  0.02 syncer   0   ?         342 root     168 20    76K   192K sleep    0:00  0.02  0.02 vphbd   0   ?         345 root     168 20   156K   216K sleep    0:00  0.02  0.02 vpard   0   ?         410 root     154 20    80K   224K sleep    0:00  0.02  0.02 syslogd   0   ?         446 root     127 20   156K   424K sleep    0:00  0.02  0.02 netfmt   0   ?         552 root     154 20   740K   816K sleep    0:00  0.02  0.02 rpc.statd   0   ?         558 root     154 20  1004K  1032K sleep    0:00  0.02  0.02 rpc.lockd   0   ?         586 root     154 20   180K   316K sleep    0:00  0.02  0.02 inetd   0   ?         855 root     154 20  1064K   472K sleep    0:00  0.02  0.02 sendmail:   0   ?         863 root     154 20   772K   712K sleep    0:00  0.02  0.02 snmpdm   0   ?         896 root     154 20   620K   552K sleep    0:00  0.02  0.02 mib2agt   0   ?         914 root     154 20  1332K   444K sleep    0:00  0.02  0.02 cmsnmpd   1   ?         951 root     154 20  4044K  1840K sleep    0:00  0.02  0.02 rpcd   1 pty/ttyp1   952 root     158 24   512K   180K sleep    0:00  0.02  0.02 sh   0   ?         974 root     168 20   152K   304K sleep    0:04  0.02  0.02 scrdaemon   0   ?         996 root     154 20   200K   336K sleep    0:00  0.02  0.02 pwgrd   0   ?        1039 root     154 10   308K   428K sleep    0:00  0.02  0.02 diagmond   0   ?        1093 root     154 20  1224K   816K sleep    0:00  0.02  0.02 ttd   1   ?        1135 root     154 20  2588K  1624K sleep    0:00  0.02  0.02 perflbd   0   ?        1156 root     154 20  2952K  1572K sleep    0:00  0.02  0.02 swagentd   0   ?        1167 root     154 20   224K   252K sleep    0:00  0.02  0.02 emsagent 
  0   ?        1168 root     127 20  2380K  2204K sleep    0:00  0.02  0.02 scopeux 

This output show two CPUs labeled 0 and 1 in cable1. The System name of cvhdcon3 is shown at the output because the hostname for cable1 is cvhdcon3.

graphics/chic03.gif

Although this is a simple example showing how a Virtual Partition can be modified, it also demonstrates the power of vPars. While both vPars on the system are running, a processor can be added to one or both without interruption of the programs running in the vPars.

graphics/intfig04.gif

Note that the -a option to vparmodify changed the number of CPUs relative to the current number. In our case the current number of CPUs was one and using -a cpu::1 added one CPU to the current number of one resulting in two CPUs. This is true also when we use the -d option to vparmodify to remove processors. The following example shows running vparstatus to see the two CPUs, using vparmodify to change the number of CPUs back to one (this is also relative to the current number of CPUs which is two,) and a vparstatus to confirm that this change has taken place:

 # vparstatus -p cable1 -v  [Virtual Partition Details]  Name:         cable1  State:        Up  Attributes:   Dynamic,Manual  Kernel Path:  /stand/vmunix  Boot Opts:  [CPU Details]  Min/Max:  1/3  Bound by User [Path]:  Bound by Monitor [Path]:  33          <-- bound CPU @ 33  Unbound [Path]:  97                   <-- unbound CPU @ 97  [IO Details]     0.0     0.0.0.0     0.0.1.1.2.0  BOOT     0.0.4.0  CONSOLE  [Memory Details]  Specified [Base  /Range]:            (bytes) (MB)  Total Memory (MB):  1024  # vparmodify -p cable1 -d cpu::1  # vparstatus -p cable1 -v  [Virtual Partition Details]  Name:         cable1  State:        Up  Attributes:   Dynamic,Manual  Kernel Path:  /stand/vmunix  Boot Opts:  [CPU Details]  Min/Max:  1/3  Bound by User [Path]:  Bound by Monitor [Path]:  33          <-- original CPU @ 33  Unbound [Path]:                       <--no unbound  CPUs  [IO Details]     0.0     0.0.0.0     0.0.1.1.2.0  BOOT     0.0.4.0  CONSOLE  [Memory Details]  Specified [Base  /Range]:            (bytes) (MB)  Total Memory (MB):  1024  # 

We could perform many other modifications to the vPars with the two unbound CPUs that are available, such as adding two CPUs to one of the vPars or one CPU to each vPar.

graphics/chic03.gif

Please keep in mind the relative nature of components when using vparmodify, and that some changes, such as modifying memory or adding I/O components, require the vPar to be down at the time of this writing.

The following sections provide some background on device files in general for HP-UX 11i. You'll want to review the non-vPars-specific section of this chapter if you haven't worked much with device files on HP systems.


       
    Top
     



    HP-UX Virtual Partitions
    HP-UX Virtual Partitions
    ISBN: 0130352128
    EAN: 2147483647
    Year: 2002
    Pages: 181

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net