How to configure a Pool/Pset and Assign to the Solaris Zone

How to configure a Pool/Pset and Assing it to the Solaris Zone


Generate a file with the information below

#vi poolnew
create pset backup-pset (uint pset.min = 4; uint pset.max = 6)
create pool pool_backup
associate pool pool_backup (pset backup-pset)


Now we have a minimun pset set in 4 and maximum set in 6 for a pool named backup in order to create our new pool_backup
In the poolnew we have the configuration file in order to create the pool (line 2) and pset with min and max values, finally the association the all the information to the pool

# cat poolnew
create pset backup-pset (uint pset.min = 4; uint pset.max = 6)
create pool pool_backup
associate pool pool_backup (pset backup-pset)


In the poolnew, now we have the configuration file in order to create the pool (line 2) and pset with min and max values, finally the association the all the information to the pool

Apply the configuration with pooladm command

# pooladm -c

After applying the configuration you can check the pool information in the configuration file

# poolcfg –c info  o pooladm
[... Long Lines of Output ...]
pset backup_pset
                       int pset.sys_id 1
                       boolean pset.default false
                       uint pset.min 4
                       uint pset.max 6

                       string pset.units population
                       uint pset.load 5
                       uint pset.size 12
                       string pset.comment
   
   
In the server with poolstat you can check the new pool (pool backup) with the maximun size that is 6 virtual processor, used and load

# poolstat
                              pset
id pool                  size used load
  1 pool_backup             6 0.00 0.01
  0 pool_default           10 0.00 0.12
Configure the zone with the new pool created
 
# zoneadm list -civ
   6 backup    running    /zones/backup-zone           native   shared
# zonecfg -z backup
zonecfg:backup> set pool=pool_backup
zonecfg:backup> verify
zonecfg:backup> commit
zonecfg:backup> end
zonecfg:backup> set name=zone.cpu-shares
zonecfg:backup> add rctl
zonecfg:backup:rctl> set name=zone.cpu-shares
zonecfg:backup:rctl> add value (priv=privileged,limit=6,action=none)

zonecfg:backup:rctl> end
zonecfg:backup> exit
#

Reboot

# zoneadm -z backup reboot
# zonecfg -z backup
# zoneadm list -civ
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              native   shared
   7 backup           running    /zones/backup                  native   shared

Now you can login in the zone and check if you have the VCPU in this case 6
# zlogin backup
[Connected to zone 'backup' pts/4]
Last login: Mon May 11 12:47:09 from X.X.X.X

-bash-3.2# psrinfo -vp
The physical processor has 6 virtual processors (0-5)
  SPARC64-VII (portid 1024 impl 0x7 ver 0x91 clock 2400 MHz)
-bash-3.2# exit
logout


The Lines below are very interesting because you can change the pool on the fly and we can take from pool default until 8 vcpu

# poolstat
                              pset
id pool                  size used load
  1 pool_backup             6 0.00 0.01
  0 pool_default           10 0.00 0.12

# poolcfg -c 'modify pset backup-pset ( uint pset.min = 4; uint pset.max = 8)'
# pooladm -c
# poolstat
                              pset
id pool                 size used load
  1 pool_backup           8 0.00 0.02
  0 pool_default          8 0.00 0.18
#

IMPORTANT: Always think in the Global Zone, we will need per Oracle recommendation  at least 4 VCPU this in the pool_default.






Regards
Roger

Comments