Skip to main content

HOW TO ENABLE ORACLE SOLARIS CONTAINERS RESOURCE MANAGEMENT AND CONFIGURATE SOLARIS 11 ZONES

How to enable Oracle Solaris containers resources Management and configurate Oracle Solaris 11 Zones


1.-Validate the state of the SMF Services

disabled       12:02:37 svc:/system/pools/dynamic:default
disabled          8:41:26 svc:/system/pools:default

2.-Enable the /system/poools:default

~# svcadm enable /system/pools
~# svcs -a | grep pool
disabled       12:02:37 svc:/system/pools/dynamic:default
online          8:41:26 svc:/system/pools:default

3.-Validate that are the resources are available to the pool
~# poolstat
                              pset
 id pool                 size used load
  0 pool_default           32 0.00 0.01
~#

4.-Enable your pools in your system for dinamic configuration
~# pooladm -s

5.-View the contents configuration file /etc/pooladm.conf
~#poolcfg -c info

system default
        string  system.comment
        int     system.version 1
        boolean system.bind-default true
        string  system.poold.objectives wt-load

        pool pool_default
                int     pool.sys_id 0
                boolean pool.active true
                boolean pool.default true
                int     pool.importance 1
                string  pool.comment
                pset    pset_default

        pset pset_default
                int     pset.sys_id -1
                boolean pset.default true
                uint    pset.min 1
                uint    pset.max 65536
                string  pset.policy minmax
                string  pset.restype cpu
                string  pset.reslist
                string  pset.units population
                uint    pset.load 15
                uint    pset.size 32
                string  pset.comment
.
.
.

6.- Commit the configuration /etc/pooladm.conf
~# pooladm -c

7.- Take a backup just in case
~# pooladm -s /tmp/poolbackup

9.-Create a processor set called pset_preprod minumun 2 and maximun to use 24 
~# poolcfg -c 'create pset pset_preprod (uint pset.min = 2; uint pset.max = 24)'

10.-Create a Pool called "pool_preprod"
~# poolcfg -c 'create pool pool_preprod'

11.-Join the pool and processor set with an association
~# poolcfg -c 'associate pool pool_preprod (pset pset_preprod)'


12.-Validate the configuration that you will commit
~#poolcfg -c info

13.-Commit configuration
~#pooladm -c

13.-Validate the configuration commited
~#poolstat


Set the values in the /etc/system for zfs and tunning OS we have 128 GB RAM

set zfs:zfs_arc_max=10% of total memory  
set autoup=5 * Total Memory
set fastscan=32768 * Total Memory
set handspreadpages=32768 * Total Memory


My configuration is currently

exclude: drv/ohci
set maxphys=0x800000
set maxpgio=65536
set fastscan=4194304
set handspreadpages=4194304
set autoup=640
set tune_t_fsflushr=1
* ZFS tuning
set zfs:zfs_immediate_write_sz=0x20000
set zfs:metaslab_df_free_pct=4
set zfs:zfs_nocacheflush=1
* Limit ARC 12 Gb
set zfs:zfs_arc_max=12884901888    
set rlim_fd_max=65536
set rlim_fd_cur=65536
set ssd:ssd_max_throttle=0x20
set zfs:zfs_vdev_max_pending=20


Create Oracle Solaris 11 Zone and assign pool create "pool_preprod"

Create pool zonetest and assign mountpoint

root@test:~#zpool create zonetest c0t654757575756950959569d0
root@test:~#zfs set mountpoint=/zones/zonetest zonetest

Configure the zone, we do not use anet networking because we will use ip-type shared and not exclusive, in solaris 11 you can use vnic however we do not use that, for that reason remove anet and we are using add net.

root@test:~# zonecfg -z zonetest
Use 'create' to begin configuring a new zone.
zonecfg:zonetest> create
create: Using system default template 'SYSdefault'
zonecfg:zonetest> set zonepath=/zones/zonetest
zonecfg:zonetest> set pool=pool_preprod
zonecfg:zonetest> remove anet
zonecfg:zonetest> add net
zonecfg:zonetest:net> set physical=aggr1
zonecfg:zonetest:net> set address=192.168.1.200
zonecfg:zonetest:net> end
zonecfg:zonetest> set ip-type=shared
zonecfg:zonetest> add capped-memory
zonecfg:zonetest:capped-memory> set swap=48G
zonecfg:zonetest:capped-memory> set physical=32G
zonecfg:zonetest:capped-memory> end
zonecfg:zonetest> verify
zonecfg:zonetest> commit
zonecfg:zonetest> exit

root@sappreprod-d00:~# zoneadm list -civ
  ID NAME             STATUS      PATH                         BRAND      IP
   0 global           running     /               solaris    shared
   - zonetest         configured  /zones/zonetest solaris    shared


Configuring proxy to install the zone with the oracle publisher (DOC ID 1433186.1)

root@test:# svccfg -s svc:/application/pkg/system-repository:default
svc:/application/pkg/system-repository:default> setprop config/http_proxy=astring: "http://182.128.2.20:8080"
svc:/application/pkg/system-repository:default> exit
root@test:# svcadm refresh svc:/application/pkg/system-repository:default
root@test:# svcadm restart svc:/application/pkg/system-repository:default
root@test:# svcs -a | grep /application/pkg/system-repository
online          8:50:11 svc:/application/pkg/system-repository:default

Export proxy variables to Environment, if you have user and password please add them

root@test:# export https_proxy=https://182.128.2.20:8080
root@test:# export http_proxy=http://182.128.2.20:8080

Configuring publisher with proxy option (release and support) you will need to download the key and certificate for moreinformation you can check my other post

http://unixaddiction.blogspot.com/2016/05/updating-solaris-11x-to-113-and-sru-to.html

root@test# pkg set-publisher --proxy http://192.168.78.50:8080 -g http://pkg.oracle.com/solaris/release/ solaris

Key and Certificate were uploaded on the path /var/pkg/ssl

root@test# ls -ltr /var/pkg/ssl
# ls -ltr
total 16
-rw-r--r--   1 root     root        1679 Sep 12 10:51 pkg.oracle.com.key.pem
-rw-r--r--   1 root     root         932 Sep 12 10:51 pkg.oracle.com.certificate.pem
root@test# pkg set-publisher  --proxy http://192.168.78.50:8080 -k  /var/pkg/ssl/pkg.oracle.com.key.pem -c /var/pkg/ssl/pkg.oracle.com.certificate.pem -g https://pkg.oracle.com/solaris/support/ solaris

root@test# pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online T http://pkg.oracle.com/solaris/release/
solaris                     origin   online T https://pkg.oracle.com/solaris/support/


Zone Installation Solaris 11

root@test# zoneadm -z zonetest install
Progress being logged to /var/log/zones/zoneadm.20160916T120256Z.zonetest.install
       Image: Preparing at /zones/zonetest/root.

 Install Log: /system/volatile/install.6964/install_log
 AI Manifest: /tmp/manifest.xml.61EqRb
  SC Profile: /usr/share/auto_install/sc_profiles/enable_sci.xml
    Zonename: zonetest
Installation: Starting ...

        Creating IPS image
Retrieving catalog 1/1 solaris 28.98 MB

DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                              167/167 32062/32062  175.8/175.8

PHASE                                        ACTIONS
Install Phase                            44311/44311 

PHASE                                          ITEMS
Package State Update Phase                   167/167 
Image State Update Phase                         2/2 
Installation: Succeeded

        Note: Man pages can be obtained by installing pkg:/system/manual

 done.

        Done: Installation completed in 108.257 seconds.


  Next Steps: Boot the zone, then log into the zone console (zlogin -C)
  
  Boot the zone
  
  root@test#zoneadm -z  zonetest boot
  
  root@test#zlogin -C zonetest
  
  Follow the instructions and configurate the information asked by the console
  
  root@global:~# zoneadm list -iv
  ID NAME             STATUS     PATH                           BRAND    IP    
   0 global           running    /                              solaris  shared
   1 zonetest           running    /zones/zonetest              solaris  shared
  
  root@test#zlogin zonetest
  #hostname
  zonetest




Comments

Last Week Topics

How to Force The Database Open With `_ALLOW_RESETLOGS_CORRUPTION

This is an internal note from Oracle. Forcing The Database Open With `_ALLOW_RESETLOGS_CORRUPTION` with Automatic Undo Management ( Doc ID 283945.1 ) Warning The following instructions should only be used under the explicit direction of Oracle Support. These steps should only be used when all other conventional means of recovering the database have failed. Please note that there is no guarantee that this method will succeed. IF THE STEPS BELOW DO ALLOW YOU TO OPEN YOUR DATABASE THEN IT IS ESSENTIAL THAT THE DATABASE BE REBUILT AS IT IS NO LONGER SUPPORTED. FAILURE TO DO SO MAY LEAD TO DATA DICTIONARY INCONSISTENCIES, INTERNAL ERRORS AND CORRUPTIONS. ** Note: The steps here apply to Oracle 9i or higher and only and when Automatic Undo Management is being used. ** Steps to attempt to force the database open: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1) Backup the database while the database is closed. THE INSTRUCTIONS HERE ARE DESTRUCTIVE. YOU ARE STRONGLY A

How to reorganize tables with brspace commands.

Brspace use internally Oracle DBMS_REDEFINITION. If you have SAP with Oracle, this is a very fast way to reorganize object in Oracle Database. In this example we will organize simultaneously S562,MLPPF and MLCRP tables. Important : If you want to reorganize various tables and indexes, these must reside in same tablespace. 1- Tables reorganization. brspace -p /oracle/PRD/102_64/dbs/initPRD.sap -c force -s 20 -l E -f tbreorg -a reorg -s PSAPSR3 -o SAPSR3 -t "S562,MLPPF,MLCRP" -n PSAPSR3 -e 16 -p 16 -m online *  /oracle/PRD/102_64/dbs/initPRD.sap : SAP Parameter file * PSAPSR3 : Source tablespace * SAPSR3  : Table owner * PSAPSR3 :  Destiny tablespace. * -e 16 -p 16 -m :  It indicates how many parallel processes that will perform the operation,in this case are 16. * online : It indicates that the reorganization of the tables will be made ONLINE 2- After tables reorganization you will need to rebuild the S562,MLPPF and MLCRP indexes tables . brspac

How to break a bonded network interface red hat

1.- Bonding device called bond0 which aggregated by eth0 and eth1 # ifconfig bond0     Link encap:Ethernet  HWaddr 44:a8:42:5d:6d:5d           inet addr:192.168.1.51  Bcast:192.168.1.255  Mask:255.255.255.0           inet6 addr: fe80::5054:ff:fe4d:9004/64 Scope:Link           UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1 eth0      Link encap:Ethernet  HWaddr 44:a8:42:5d:6d:5d           UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1 eth2      Link encap:Ethernet  HWaddr 44:a8:42:5d:76:29           UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1           RX packets:6 errors:0 dropped:0 overruns:0 frame:0 # cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009) Bonding Mode: fault-tolerance (active-backup) Primary Slave: em1 (primary_reselect always) Currently Active Slave: em1 MII Status: up MII Polling Interval (ms): 50 Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: eth0 MII Status: up Speed: 10000

OSWatcher analysis Solaris/Oracle Linux for DataBases

ORACLE DATABASE 10 or greater ORACLE SOLARIS SPARC 1.  As "root" use create  OSWatcher startup/stop script (startOSWbb.sh) # uname -a SunOS solaristest  5.10 Generic_150-400 # pwd /etc/init.d # cat OSW_init.sh  OSW_SRC_DIR= <<<<----- Modify this to reflect your OS Watcher source directory echo $OSW_SRC_DIR echo "******************************************************" >> $OSW_SRC_DIR/init_osw.log case $1 in 'start') echo "...Starting OSWBB from init at `date` " >> $OSWBB_SRC_DIR/init_osw.log cd $OSWBB_SRC_DIR; ./startOSWbb.sh ;; 'stop') echo "...Stopping OSWBB from init at `date` " >> $OSWBB_SRC_DIR/init_osw.log cd $OSW_SRC_DIR; ./stopOSWbb.sh ;; *) echo "Usage: $0 start|stop" >&2 exit 1 ;; esac exit 0   2.  Add "execute" permissions on this script: #chmod +x OSW_init.sh 3.  Create a soft link to this script fr

HOW TO ENABLE A VIRTUAL INTERFACE (VNIC) SOLARIS 10

HOW TO ENABLE A VIRTUAL INTERFACE (VNIC) SOLARIS 10 1.-Verify the interfaces on the server that you need to add the ip in this example 10.1.1.8 # dladm show-phys LINK CLASS MTU STATE OVER bge0 phys 1500 unknown -- bge1 phys 1500 up --    2.-Now you need to create a virtual network interface or VNIC on the server #ifconfig bge1:1 plumb #ifconfig -a 3.-Finally you can add the new ip address and add on the server in /etc/hostname.bge1:1 the IP or the name that you defined on the hosts file with that ip #vi /etc/hostname.bge1:1 10.1.1.8 #ifconfig bge1:1 10.1.1.8 netmask 255.255.255.0 broadcast 10.1.1.254 up Regards Roger    

HOW TO CHANGE HOSTNAME RED HAT LINUX

HOW TO CHANGE HOSTNAME RED HAT LINUX 1.-Validate Hostname and host file that you need to change #hostname rhel #cat /etc/hosts 127.0.0.1  localhost 192.168.1.13  rhel 2.-Edit the following file in order to change HOSTNAME #vi /etc/sysconfig/network NETWORKING=yes HOSTNAME=TEST GATEWAY=192.168.1.1 3.-When you are ready and you save the information you will need to edit the hosts file #vi /etc/hosts 127.0.0.1  localhost 192.168.1.13  test 4.- Finally you will need to restart de network services #service network restart #hostname test

FAN Fully Automated Nagios monitoring tool

If you need install an application to monitor, with a simple installation and no many configuration or compilation, you can use FAN versiĆ³n 2.1 We have a tool that is integrated with Nagios, Centreon, Nagvis and DocuWiki OS Centos 5.9 Centreon 2.4.1 Nagvis 1.7 Nagios and DocuWiki You can download the ISO and Documentation from the following link, it is a very easy software to install in order to monitor the servers. http://www.fullyautomatednagios.org/

HOW TO INSTALL RSYNC SOLARIS 10 FOR SPARC PLATFORMS

HOW TO INSTALL RSYNC 3.1.1 SOLARIS 10 1.-Download the following packages   libintl-3.4.0-sol10-sparc-local.gz rsync.3.1.1.SPARC.32bit.Solaris.10.pkg libiconv.1.14.SPARC.32bit.Solaris.10.pkg   2.-Once you have the packages on the server you can do the following steps   libintl-3.4.0-sol10-sparc-local.gz rsync.3.1.1.SPARC.32bit.Solaris.10.pkg libiconv.1.14.SPARC.32bit.Solaris.10.pkg    3.-  Unzip the packages that are compressed and install them with pkgadd. #gunzip libintl-3.4.0-sol10-sparc-local.gz #pkgadd –d libintl-3.4.0-sol10-sparc-local   #pkgadd –d  rsync.3.1.1.SPARC.32bit.Solaris.10.pkg #pkgadd –d libiconv.1.14.SPARC.32bit.Solaris.10.pkg And now you can use the rsync Regards Roger   

How to install Oracle Directory Server 11 Solaris 10

Createl DSCC Registry that is   Directory Server Manager for LDAP server administration root@ldapserv1:/opt/ODSEE_ZIP_Distribution/dsee7/bin# ./dsccsetup ads-create Choose password for Directory Service Manager: Confirm password for Directory Service Manager: Creating DSCC registry... DSCC Registry has been created successfully Deploy the directory server root@ldapserv1:/opt/ODSEE_ZIP_Distribution/dsee7/bin# ./dsccsetup war-file-create Created /opt/ODSEE_ZIP_Distribution/dsee7/var/dscc7.war 1636 /opt/dsInst Choose the Directory Manager password: <Password Directory Manager> Confirm the Directory Manager password: <Password Directory Manager> Starting the instance created with dsadm Use command 'dsadm start '/opt/dsInst'' to start the instance oot@ldapserv1:/opt/ODSEE_ZIP_Distribution/dsee7/bin# ./dsadm start '/opt/dsInst' Directory Server instance '/opt/dsInst' started: pid=19325 Create the suffix   and port that will be used,