Saturday 30 July 2011

10. Zones (Real Time)


10. Zones
Note: till now I did not get any issues on zones.
Two commands
# zoneadm
# zonecfg                    (create/delete the zone)

-          we can create upto 8192 zones bt editing the file
-          # cat /kernel/drv/md.conf
 nmd = 8192 ( by default nmd=128)

two types of zones
1. global zones
2. non global zones

-          global zone id always zero ‘0’
-          # zoneadm list –vc
-          Id =0
Two types of non global zones
  1. whole root zone (morethan 300MB)
  2. sparse root zone (100MB)

zone stages:
  1. configuration – incomplete
  2. install
  3. ready – running
  4. shutdown (halt)
for config 4 command
  1. create
  2. install
  3. ready
  4. boot

for unconfig
  1. halt
  2. uninstalled
  3. delete

Issue 1:
Reboot the zone when patches are applied to non – global zone


Container: adding the hard ware resources to the zone

Branded zone: we can install other OS to zone also instead of one OS

Zone config file:
# cd /etc/zones
# ls

Zone login console:
# zlogin –C orazone                (C : console
# zonename                 ( to find out which zone)

From global rebooting non-global
# zoneadm –z orazone reboot
# arp –a           (to see the IP address of global from non global)
# arp –a | grep –i SP

Passwd breaking for non-global zone:

# cd /zoneconfig FS name
# cd /root
# vi etc/shadow
And remove the passwd fields

To see what ever config in zone till now:
# zonecfg –z arazone info

Adding ‘FS’ to zone:

To remove the FS resource
# zonecfg –z orazone remove fs dir=/zz
# zonecfg –z orazone info
# zonecfg –z orazone

LOFS: loop back file system:
Giving the multiple mount points to a single file system

How to add:
# zonecfg –z orazone
Zone: orazone> add
Add attr add copped-memory  add net add fs


Client system (NFS)

# mkdir /nn
# mount –F nfs 192.168.1.10: /sai  /nn
# showmount –e 192.168.1.10
# df –F nfs

Issue 1:
ü  Deamons
ü  Versions -4
ü  How to share the resources (or) files (or) directories
ü  How to permanent the share files & directories in server

Client side:
How to mount the shared files & directories in client
How to permanent

Issue 2: already shared files & directories, if we unshared it will throw
Client side: RPC timed out, can’t stat error
That time we can’t share
Cant statvfs: /nn: no such file /directory
And some times there may be a chance to hang the output of df –h (or) df –k.

A: simply I checked out the NFS shared file information
(or)
Simply I checkedout etc/vfstab
If NFS shared file

# shareall on client & server side
# svcs –a | grep nfs/client
# svcadm enable nfs/client

Restart the deamon nfs4cbd

From # cd /usr/lib/nfs
# ./nfs4cbd                  (it will run for communicate server to client
# ./nfs4cbd start

To see mount points of client from server side
# dfmounts
#rmmounts

No comments:

Post a Comment