Skip to main content

How to Identify Sparse or Whole Root Zones

First question in your mind is to identify the Non-Global Zone whether they Sparse or Whole Root Zone in real time. This post will help you to find those details in handy ways. Theoretically everyone having good knowledge about Sparse and Whole Root Zones. But in real time.....Please follow the Steps.
Here We have 2 Non-Global zone, but we are not sure which one is Sparse or Whole Root Zones. Let we identify them.
[root@unixrock ~]# zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global          running    /                             native   shared
   1 unixrockLZ      running    /export/zones/unixrockLZ      native   shared
   2 unixrockLZ1     running    /export/zones/unixrockLZ1     native   shared
[root@unixrock ~]#
There is a Command called "pkgcond" allows you to determine the type of target being operated on (global zone, non-global zone). more details you can refer man Page of pkgcond. I'm executing the command on one Local zone let we can see the result.
[root@unixrockLZ ~]#  pkgcond -n is_what
can_add_driver=1
can_remove_driver=1
can_update_driver=1
is_alternative_root=0
is_boot_environment=0
is_diskless_client=0
is_global_zone=0
is_mounted_miniroot=0
is_netinstall_image=0
is_nonglobal_zone=1
is_path_writable=1
is_running_system=0
is_sparse_root_nonglobal_zone=0
is_whole_root_nonglobal_zone=1
[root@unixrockLZ ~]#
you can see the parameter "is_whole_root_nonglobal_zone=1" is stating that this zone is whole Root. I'm executing the same command on another LZ,
[root@unixrockLZ1 ~]#  pkgcond -n is_what
can_add_driver=1
can_remove_driver=1
can_update_driver=1
is_alternative_root=0
is_boot_environment=0
is_diskless_client=0
is_global_zone=0
is_mounted_miniroot=0
is_netinstall_image=0
is_nonglobal_zone=1
is_path_writable=1
is_running_system=0
is_sparse_root_nonglobal_zone=1
is_whole_root_nonglobal_zone=0
[root@@unixrockLZ1 ~]#
you can see the parameter "is_sparse_root_nonglobal_zone=1" is stating that this zone is Sparse Root. is there any way to check the same details from Global zone, yes we can. just follow the steps
[root@unixrock ~]# zonecfg -z unixrockLZ info
zonename: unixrockLZ
zonepath: /export/zones/unixrockLZ
brand: native
autoboot: true
bootargs:
pool:
limitpriv:
scheduling-class: FSS
ip-type: shared
hostid:
net:
        address: 192.168.1.20/24
        physical: e1000g0
[root@unixrock ~]#
above configuration is for Whole Root zone
[root@unixrock ~]# zonecfg -z unixrockLZ1 info
zonepath: /export/zones/unixrockLZ1
brand: native
autoboot: true
bootargs:
pool:
limitpriv:
ip-type: shared 
inherit-pkg-dir:
        dir: /lib
inherit-pkg-dir:
        dir: /platform
inherit-pkg-dir:
        dir: /sbin
inherit-pkg-dir:
        dir: /usr
net:
        address: 192.168.1.21/24
        physical: e1000g0
[root@unixrock ~]#
If you find those inherit-pkg-dir of /lib, /platform, /sbin, /usr then blindly we can tell this is Sparse Root Zone. these files shared as Read Only file systems from its Global. FYI, Still we can't identify the GlobalZone Name from its non-global zone until unless you placed any script to find those details or "arp -a|grep -i SPLA" you might get more IP, But one of the IP is from Global, however its hard to find the details.

Comments

Popular posts from this blog

How to create and configure solaris 10 zones

Solaris zones enables a software partitioning of solaris 10 OS to support multiple independent, secure OS environments to run in the same OS. Each environment has separate process space, resource allocation and users. Zones are widely used in production environments as it is easy to setup and doesn’t require any special hardware like ldoms does. Zone types Global zone  – every installed OS acts like a global zone, which is present by default. All non-global zones can only be intalled, configured and administered from global zone. Non-global zone  – They share the functioning of the kernel booted under the global zone. All the software and other resources are inherited from the global zone. Whole Root zone (Big zone)  – It gets their own writable copy of all the file systems like /opt, /usr. It takes more disk space. Sparse root zone (Small zone)  – File systems like /opt, /usr are shared from global zone as loopback file-system (you only have a read-only access...

Solaris 10 boot process : SPARC

The boot process for SPARC platform involves 5 phases as shown in the diagram below. There is a slight difference in booting process of a SPARC based and x86/x64 based solaris operating system. Boot PROM phase 1. The boot PROM runs the power on self test (POST) to test the hardware. 2. The boot PROM displays the banner with below information – Model type – processor type – Memory – Ethernet address and host ID 3. Boot PROM reads the PROM variable boot-device to determine the boot device. 4. Boot PROM reads the primary boot program ( bootblk ) [sector 1 to 15] and executes it. Boot program phase 1.  bootblk  loads the secondary boot program  ufsboot  into memory. 2. ufsboot reads and loads the kernel. The kernel is composed of 2 parts : unix (platform specific kernel) genunix (platform independent kernel) 3. ufsboot combines these 2 kernel into one complete kernel and loads into memory. Kernel initialization phase 1. The kernel reads the configura...