Tuesday, August 22, 2023

Oracle Solaris Zone management


Solaris Zones is a software partitioning technology, which provides a means of virtualizing operating system services to create an isolated environment for running applications. 
This isolation prevents processes that are running in one zone from monitoring or affecting processes running in other zones

After installing Oracle Solaris 10 on a system, but before creating any zones, all processes run in the global zone. 

After you create a zone, it has processes that are associated with that zone and no other zone. 

Any process created by a process in a non-global zone is also associated with that non-global zone. Any zone which is not the global zone is called a non-global zone.




File and Directory : 

As a  Oracle Dba script to start database as part of cluster are placed under  /etc/rc0.d/.  Eg  /etc/rc0.d/K10dbora 


1) 

The directory /etc/zones contains the configuration files for each zone by the zone name. Examining these files will show the show the configuration of the zones.

The index file in this directory also contains the status of the zones:

# cat <zonename>.xml
cat /etc/zones/myzone.xml



Viewing Global Zone name from Local Zone :


Global-Zone# cat globalzonename.sh
#!/usr/bin/bash
for i in `/usr/sbin/zoneadm list -v | /usr/bin/egrep -v "ID|global" |/usr/bin/awk ' { print $4 } '`; do echo `uname -n` > $i/root/etc/GLOBALZ; done




Commands : 

1) 
# /usr/sbin/zoneadm list -vi to show status of all installed zones (i-stands for installed)
# /usr/sbin/zoneadm list -vc to show status of all configured zones (c-stands for configured which includes installed zones).



2) 
zonecfg -z zonename info    -->  To list resources used by each zones : Use zonecfg -z with the info option to list a specific zone configuration.



3) 
zonename


4) 
zpool list



5) 
zonestat -z zonename -r physical-memory 2
zonestat -z zone1,zone2 5 



No comments:

Post a Comment