3.12 Removing a Virtual Partition

     

NOTE : For this example, I have returned the configuration where both vPars have two CPUs: one bound and one unbound .


 

 root @uksd3 #  vparstatus  [Virtual Partition]                                                                           Boot Virtual Partition Name       State Attributes Kernel Path               Opts ============================ ===== ========== ========================= ===== vPar0                          Up    Dyn,Auto   /stand/vmunix vPar1                          Up    Dyn,Auto   /stand/vmunix [Virtual Partition Resource Summary]                                            CPU    Num        Memory (MB)                                   CPU     Bound/   IO   # Ranges/ Virtual Partition Name          Min/Max  Unbound  devs  Total MB    Total MB ==============================  ================  ====  ==================== vPar0                             1/  5    1   1     9    0/  0         2048 vPar1                             1/  2    1   1     5    0/  0         2048 root @uksd3 # 

In order to remove a virtual partition, it must be in a down state. After shutdown, we can remove the partition quite simply with vparremove :

 

 root @uksd3 #  vparremove -p vPar1  Remove virtual partition vPar1? [n]  y  vparremove: Error: Specified virtual partition vPar1 not in Down state. Cannot remove the graphics/ccc.gif virtual partition. root @uksd3 # ... root @uksd5 #  shutdown -h now  SHUTDOWN PROGRAM 11/07/03 05:11:46 GMT Broadcast Message from root (console) Fri Nov  7 05:11:46... SYSTEM BEING BROUGHT DOWN NOW ! ! ! ... root @uksd3 #  vparstatus  [Virtual Partition]                                                                           Boot Virtual Partition Name       State Attributes Kernel Path               Opts ============================ ===== ========== ========================= ===== vPar0                          Up    Dyn,Auto   /stand/vmunix   vPar1                          Down   Dyn,Auto   /stand/vmunix [Virtual Partition Resource Summary]                                            CPU    Num        Memory (MB)                                   CPU     Bound/   IO   # Ranges/ Virtual Partition Name          Min/Max  Unbound  devs  Total MB    Total MB ==============================  ================  ====  ==================== vPar0                             1/  5    1   1     9    0/  0         2048 vPar1                             1/  2    1   1     5    0/  0         2048 root @uksd3 # root @uksd3 #  vparremove -p vPar1  Remove virtual partition vPar1? [n]  y  root @uksd3 # root @uksd3 #  vparstatus  [Virtual Partition]                                                                           Boot Virtual Partition Name       State Attributes Kernel Path               Opts ============================ ===== ========== ========================= ===== vPar0                          Up    Dyn,Auto   /stand/vmunix [Virtual Partition Resource Summary]                                            CPU    Num        Memory (MB)                                   CPU     Bound/   IO   # Ranges/ Virtual Partition Name          Min/Max  Unbound  devs  Total MB    Total MB ==============================  ================  ====  ==================== vPar0                             1/  5    1   1     9    0/  0         2048 root @uksd3 # 

The resources that were used by vPar1 are now available to be used by other partitions, or that's what you thought.

 

 root @uksd3 #  vparstatus -A  [Unbound CPUs (path)]:  2.12                         2.13 [Available CPUs]:  2 [Available I/O devices (path)]:  2.0.4                                  2.0.6                                  2.0.8                                  2.0.9                                  2.0.14 [Unbound memory (Base  /Range)]:  0x0/128                 (bytes) (MB)      0xc000000/1920 [Available memory (MB)]:  2048 root @uksd3 # 

As we can see, there are now two processors available, as a result of removing vPar1. If I were to attempt to use these two processors in an existing partition, the task would fail:

 

 root @uksd3 #  vparmodify -p vPar0 -m cpu::4  vparmodify Error: "-m cpu::4": One or more unbound CPUs was not available when virtual partition vPar0 was booted. You must shut down the partition to add them. root @uksd3 # 

You might be able to deduce the reason for the error from the error message itself. What's this, a UNIX error message that actually means something? The reason for this is that when a Virtual Partition is booted, it creates an in- core table of all unbound CPUs. When vPar0 was booted, this constituted the two unbound CPUs: one in vPar0 and one in vPar1. Even though I have removed vPar1, the in-core table of unbound CPUs in vPar0 still only lists the two original unbound CPUs.

IMPORTANT

Only the UNBOUND CPUs visible to a partition at boot time can be reassigned. Any BOUND CPUs will not be visible even if the partition they belong to is removed.


While I can allocate one of the available CPUs to vPar0, to be able to allocate the originally bound CPU from vPar1, I would have to reboot vPar0. Worth knowing I think.

 

 root @uksd3 #  vparmodify -p vPar0 -m cpu::3  root @uksd3 #  vparstatus  [Virtual Partition]                                                                           Boot Virtual Partition Name         State Attributes Kernel Path               Opts ============================== ===== ========== ========================= ===== vPar0                          Up    Dyn,Auto   /stand/vmunix [Virtual Partition Resource Summary]                                            CPU    Num        Memory (MB)                                   CPU     Bound/   IO   # Ranges/ Virtual Partition Name          Min/Max  Unbound  devs  Total MB    Total MB ==============================  ================  ====  ====================   vPar0                             1/  5    1   2   9    0/  0         2048 root @uksd3 #  vparstatus -A  [Unbound CPUs (path)]:  2.12 [Available CPUs]:  1 [Available I/O devices (path)]:  2.0.4                                  2.0.6                                  2.0.8                                  2.0.9                                  2.0.14 [Unbound memory (Base  /Range)]:  0x0/128                 (bytes) (MB)      0xc000000/1920 [Available memory (MB)]:  2048 root @uksd3 # 



HP-UX CSE(c) Official Study Guide and Desk Reference
HP-UX CSE(c) Official Study Guide and Desk Reference
ISBN: N/A
EAN: N/A
Year: 2006
Pages: 434

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