Zone As a SG

Arena-Node1#/opt/VRTS/bin/hazonesetup arenasg reszone zarena password node1 node1 node2
arenasg —->Service group
reszone —->Zone resource Name
zarena —->Zone name

=-=======================================================================
HOW TO CONFIGURE ZONES TO vcs
=-=======================================================================
Stage I – Creating the Volume Manager Disk Groups and Volumes. Then add into VCS.

karri1: vxdisk -o alldgs list
DEVICE TYPE DISK GROUP STATUS
c1t1d0 auto:none – – online invalid

karri1: /usr/lib/vxvm/bin/vxdisksetup -i c1t1d0
karri1: vxdisk scandisks
karri1: vxdisk -o alldgs list
DEVICE TYPE DISK GROUP STATUS
c1t1d0 auto:sliced – – online

karri1: vxdg init myzone c1t1d0
karri1: vxassist -g myzone make zroot_myzone 10g
karri1: vxassist -g myzone make application_myzone 10g

karri1: mkfs -F vxfs /dev/vx/rdsk/myzone/zroot_myzone
version 6 layout 20971520 sectors, 10485760 blocks of size 1024, log size 16384 blocks largefiles supported

karri1: mkfs -F vxfs /dev/vx/rdsk/myzone/application_myzone
version 6 layout 20971520 sectors, 10485760 blocks of size 1024, log size 16384 blocks largefiles supported

Clear auto import of disk group
karri1: vxdg deport myzone
karri1: vxdg -t import myzone
karri1: vxvol -g myzone startall

Configure VCS to Import the Disk Group and mount the filesystems in a service group called myzone.

karri1: haconf -makerw
karri1: hagrp -add myzone
VCS NOTICE V-16-1-10136 Group added; populating SystemList and setting the Parallel attribute recommended before adding resources
karri1: hagrp -modify myzone SystemList karri1 0 karri2 1

karri1: hares -add myzonedg DiskGroup myzone
VCS NOTICE V-16-1-10242 Resource added. Enabled attribute must be set before agent monitors
karri1: hares -modify myzonedg DiskGroup myzone
karri1: hares -modify myzonedg Enabled 1

karri1: hares -add zroot_myzone Mount myzone
VCS NOTICE V-16-1-10242 Resource added. Enabled attribute must be set before agent monitors
karri1: hares -modify zroot_myzone MountPoint /zones/myzone
karri1: hares -modify zroot_myzone BlockDevice /dev/vx/dsk/myzone/zroot_myzone
karri1: hares -modify zroot_myzone FSType vxfs
karri1: hares -modify zroot_myzone FsckOpt %-y
karri1: mkdir -p /zones/myzone
karri1: ssh karri2 mkdir -p /zones/myzone
karri1: chmod go-rwx /zones/myzone
karri1: ssh karri2 chmod go-rwx /zones/myzone
karri1: hares -modify zroot_myzone Enabled 1
karri1: hares -online zroot_myzone -sys karri1

karri1: df -h /zones/myzoneFilesystem
size used avail capacity Mounted on
/dev/vx/dsk/myzone/zroot_myzone 10G 19M 9.4G 1% /zones/myzone

karri1: chmod go-rwx /zones/myzone
karri1: hares -link zroot_myzone myzonedg

karri1: mkdir /zones/myzone/root/myzone
karri1: hares -add application_myzone Mount myzone
karri1: hares -modify application_myzone MountPoint /zones/applications/myzone
karri1: hares -modify application_myzone BlockDevice /dev/vx/dsk/myzone/application_myzone
karri1: hares -modify application_myzone FSType vxfs
karri1: hares -modify application_myzone FsckOpt %-y
karri1: hares -modify application_myzone Enabled 1
karri1: hares -link application_myzone zroot_myzone
karri1: hares -online application_myzone -sys karri1

karri1: hares -dep |grep myzonemyzone application_myzone zroot_myzone
myzone zroot_myzone myzonedg
karri1: hastatus -sum
— SYSTEM STATE
— System State Frozen

A karri1 RUNNING 0
A karri2 RUNNING 0

— GROUP STATE
— Group System Probed AutoDisabled State

B myzone karri1 Y N ONLINE
B myzone karri2 Y N OFFLINE
karri1: haconf -dump -makero

Create the Local Zone – Note: no network configured in the zonecfg.

karri1: zonecfg -z myzone
myzone: No such zone configured
Use ‘create’ to begin configuring a new zone.
zonecfg:myzone> createzonecfg:myzone> set zonepath=/zones/myzone
zonecfg:myzone> add fs
zonecfg:myzone:fs> set special=/zones/applications/myzone
zonecfg:myzone:fs> set dir=/myzone
zonecfg:myzone:fs> set type=lofs
zonecfg:myzone:fs> end
zonecfg:myzone> exitkarri1: zoneadm -z myzone install
Preparing to install zone <myzone>.
Creating list of files to copy from the global zone.
Copying <2789> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <1019> packages on the zone.
Initialized <1019> packages on zone.
Zone <myzone> is initialized.
Installation of these packages generated errors: <SUNWj5rt SUNWj5man SUNWj5dmo SUNWpostgr-server-data SUNWpostgr-server SUNWpostgr-tcl VRTSvcsmg VRTSvcsag>
Installation of <9> packages was skipped.
The file </zones/myzone/root/var/sadm/system/logs/install_log> contains a log of the zone installation.
karri1: zoneadm -z myzone boot
karri1: zlogin -e @. -C myzone
[Connected to zone ‘myzone’ console] 46/116

Configure the local zone with the host name of myzone. IP will be controlled later in the process.

myzone: init 0# svc.startd: The system is coming down. Please wait.
svc.startd: 73 system services are now being stopped.

Feb 25 18:08:35 myzone sendmail[8554]: My unqualified host name (localhost) unknown; sleeping for retry
Feb 25 18:09:35 myzone sendmail[8554]: unable to qualify my own domain name (localhost) — using short name
Feb 25 18:09:36 myzone sendmail[8579]: My unqualified host name (localhost) unknown; sleeping for retry
Feb 25 18:09:36 myzone sendmail[8580]: My unqualified host name (localhost) unknown; sleeping for retry
svc.startd: The system is down.

[NOTICE: Zone halted]
myzone: @.

I strongly recommend that you move over the service group to the second system and run the following:

karri1: zoneadm -z myzone detach
karri1: hagrp -switch myzone -to karri2
karri2: zonecfg -z myzone create -a /zones/myzone
karri2: zoneadm -z myzone attach
karri2: zoneadm -z myzone boot
karri2: zlogin myzone

Make sure all is fine, then init 0.

karri2: zoneadm -z myzone detach

Move all back to primary and online the service group. Not doing this process will result in the monitor script not being able to tell state on the second node. As it will not be in /etc/zones/index.

Now comes the fun part. Creating the specialized start/stop/monitor scripts for the local zone.

Click Here

karri1: hares -link myzone_zone zroot_myzone
karri1: hares -link myzone_zone application_myzone
karri1: hares -modify myzone_zone Enabled 1
karri1: hares -online myzone_zone -sys karri1
Adding the IP and NIC connections for the zone. This is a little bizzar. The NIC agent is configured in the Global Zone, and the IP is set to the attribute ContainerName. Once this is done, you do not need to specify the NIC device in the zone.xml file. It will just appear. They you can update the zones name space.

karri1: hares -add myzone_nic NIC myzone
karri1: hares -modify myzone_nic Device hme0
karri1: hares -modify myzone_nic Enabled 1

karri1: hares -add myzone_ip IP myzone
karri1: hares -modify myzone_ip Address 10.1.1.5
karri1: hares -modify myzone_ip Network 255.255.255.0
karri1: hares -modify myzone_ip ContainerName myzone
karri1: hares -link myzone_ip myzone_nic
karri1: hares -link myzone_ip myzone_zone

karri1: hares -modify myzone_ip Enabled 1
karri1: haconf -dump -makero