Database Reference
In-Depth Information
Creation of a Solaris Zone
A zone can be created using the zonecfg command. When executing zonecfg , you specify which resources you would
like to assign to the zone you are creating. Instead of boring you with all the options available, you will walk through
the creation of a zone used by an Oracle database. The root file system in the default zone requires only one GB of
disk space, but it is recommended to set aside more than that, especially if you are planning to install Oracle. Eight GB
should be sufficient for most deployments. In addition to the root file system, an Oracle mount point will be created
as well. It is possible to create an oracle installation in the global zone and present that installation to each non-global
zone, but this approach has a number of disadvantages. Many users, therefore, decide to create dedicate LUNs for the
each zone's Oracle home. If the importance of the environment merits it, these can be added to the replication set.
The subsequent example is built to the following requirements:
Create a virtual machine/zone with name “zone1.”
/zones/zone1/root from the global zone.
Assign a root volume of 8 GB storage using the ZFS
/u01/app on ZFS /zones/zone1/app of 15 GB.
Create a mount point for the database binaries in
/u01/oradata on ZFS /zones/zone1/
Create a mount point for the oracle database files in
oradata of 30GB.
Create a network interface with a dedicated IP address.
Use the ZFS storage pool zone1pool for all storage requirements of zone1 to allow for block
level replication.
The example assumes you are logged into the global zone as root, and it assumes a Solaris 11 installation.
The first step in the zone creation is to create the ZFS data sets. It is good practice to create a hierarchy of file systems
to make best use of the metadata property inheritance. In the example, the zone's root file system is stored in
/zones/zone1 , whereas the oracle installation is local to the zone, in a zfs file system called /zones/zone1/app .
Finally, the database is created in /zones/zone1/oradata . The data sets are created as follows:
root@solaris:~# zfs create -o mountpoint=/zones/zone1 zone1pool/zone1
root@solaris:~# zfs create zone1pool/zone1/root
root@solaris:~# zfs set quota=8G zone1pool/zone1/root
root@solaris:~# zfs create zone1pool/zone1/app
root@solaris:~# zfs set quota=15G zone1pool/zone1/app
root@solaris:~# zfs create zone1pool/zone1/oradata
root@solaris:~# zfs set quota=30G zone1pool/zone1/oradata
The mount points for my Oracle database file systems must be set to legacy to allow them to be presented to the
zone using the “add fs” command.
root@solaris:~# zfs set mountpoint=legacy zone1pool/zone1/app
root@solaris:~# zfs set mountpoint=legacy zone1pool/zone1/oradata
This creates all the file systems as required. You can use the zfs list command to view their status. You will also
note that the file systems are already mounted, and you do not need to edit the vfstab file at all.
root@solaris:~# zfs list | egrep "NAME|zone1"
NAME USED AVAIL REFER MOUNTPOINT
zone1pool 377K 24.5G 31K /zone1pool
zone1pool/zone1 127K 24.5G 34K /zones/zone1
 
Search WWH ::




Custom Search