Solaris 10 Zones Vs Solaris 10 physical server

Related posts 
About basics on Solaris zones read this previous post Solaris 10 Zones

Since long time two questions about solaris 10 zones haunting my mind, here I am keeping those with answers.
  • When I logged into a Zone how would I know the details of Global Zone details (IP/hostname) on which it is running? If u can provide me the command, I will be happier?
Answer :  you can't find out
                 why would you need to know?
The whole point of zones (or containers as they are sometimes called) is that they "contain" you within your zone and do not give visibility or access to the other zones including the global one. Also you should not login to the global zone - it is not a test server and should not be used
A system admin can give u the details if you request, which generally not happens in work enviropnment due to following reasons.
(1) it would only encourage people to login to the global zone if they knew what it is called 
(2) He has the option to move zones between servers so this info could become out of date

  • How can I know the type of file system the zone is of (I mean how can I know the Zone type a sparse zone or Whole root zone) being logged into one zone. Any command for this at least?
Answer : You can not easily - If you have root access to the zone and can modify /usr, /lib, /platform, or /sbin (not recommended to touch any of them) then you are NOT in a sparse zone.
You can assume form this point forward that if you ask for a zone to be built then it will be full root by default. Of course we will still build sparse ones .
Do not confuse the term "type of file system the zone is of" with "zone type". All  zones sit on a ZFS file system
  • Last but not the least : I am using a Solaris machine, Now I am intrested to know whether it is a Zone or normal server ??? what is the command ?I don't know it is a zone or physical server ?
Answer : tricky one - Try running /usr/sbin/prtdiag
If it runs (even as non root) you are on a physical
spears% /usr/sbin/prtdiag|more

prtdiag can only be run in the global zone

The thing is it is also possible the create a zone that has some properties of a sparse and some of a full root. To be honest the only difference really is the fact that some filesystems are mounted read-only from the global and some are full copies
so the only way to tell is the method I metioned
Another trick that will indicate if you are in a zone or physical machine is to cat /etc/vfstab
on a zone there are no entries for /
Another one is "df -k" - physcial will show root as coming from something like /dev/dsk/c1t0d0s0 whereas a zone will show it being mounted from "/"

yeah 3 easy checks for physical vs zone - there are many more I'm sure.

However sparse vs full root really only goes back to check if /usr, /bin, /platform, and /sbin are writable as root - either through trying it on the zone as root or going to the global zone and typing "zonecfg -z zonename info"



2 comments to "Solaris 10 Zones Vs Solaris 10 physical server"

  • Hi,

    I am Richa from SiliconIndia. I am also an avid blogger for a while now and participating actively in Indian blogosphere. I read your blog posting and found them very interesting and informative. We would love to see a copy of your blogs posted here, whenever you are posting it on blogger.com. Here are some of the benefits of posting your blogs here:

    We have a strong community of 1 Million professionals
    Best blogs of 2008 to be published in a book "SiliconIndia bLoG PrinT"
    Best blog to be printed in SliconIndia & SmartTechie magazines each month
    Chance to be featured on homepage everyday
    There are 10,000 active bloggers who participate in active blogging

    We appreciate your community initiative here and in helping build a more powerful India! Also, if you have any ideas or want to volunteer to help for SiliconIndia, we would be more than excited to get your help. Pls mail me back at richa@siliconindia.com with your suggestions and feedback.

    Richa
    Blog Editor – SiliconIndia
    http://blogs.siliconindia.com/

  • Hello babu,

    find the little info regrading zones concept.

    The Solaris zones allows virtualization of Operating System services so that applications can run in an isolated and secure environment. Previously, this functionality has only been available on high-end, extremely expensive servers. One of the advantages of zones is that multiple versions of the same application can be run on the same physical system, but independently of each other. Solaris zones
    also protects the user from having a single application able to exhaust the CPU or memory resources when it encounters an error.


    Types of Zones:

    There are two types of zones, global and non-global. Think of a global zone as the server itself, the traditional view of a Solaris system as we all know it, where you can login as root and have full control of the entire system. The global zone is the default zone and is used for system-wide configuration and control. Every system contains a global zone and there can only be one global zone on a physical Solaris server.

    A non-global zone is created from the global zone and also managed by it. You can have up to 8192 non-global zones on a single physical system - the only real limitation is the capability of the server itself. Applications that run in a non-global zone are isolated from applications running in a separate non-global zone, allowing multiple versions of the same application to run on the same physical server.

    The global zone has the following features:

    [a] The global zone is assigned zone ID 0 by the system.
    [b] It provides the single bootable instance of the Solaris Operating Environment that runs on the system.
    [c] It contains a full installation of Solaris system packages.
    [d] It can contain additional software, packages, file, or data that was not installed through the packages mechanism.
    [e] Contains a complete product database of all installed software components.
    [f] It holds configuration information specific to the global zone, such as the global zone hostname and the file system table.
    [g] It is the only zone that is aware of all file systems and devices on the system.
    [h] It is the only zone that is aware of non-global zones and their configuration.
    [i] It is the only zone from which a non-global zone can be configured, installed, managed, and uninstalled.

    Non-global zones have the following features:

    [a] The non-global zone is assigned a zone ID by the system when it is booted.
    [b] It shares the Solaris kernel that is booted from the global zone.
    [c] It contains a subset of the installed Solaris system packages.
    [d] It can contain additional software packages, shared from the global zone.
    [f] It can contain additional software packages that are not shared from the global zone.
    [g] It can contain additional software, files, or data that was not installed using the package mechanism, or shared from the global zone.
    [h] It contains a complete product database of all software components that are installed in the zone. This includes software that was installed independently of the global zone as well as software shared from the global zone.
    [i] It is not aware of the existence of other zones.
    [j] It cannot install, manage, or uninstall other zones, including itself.

Post a Comment

Who ever writes Inappropriate/Vulgar comments to context, generally want to be anonymous …So I hope U r not the one like that?
For lazy logs u can at least use Name/URL option which don’t even require any sign-in, good thing is that it can accept your lovely nick name also and URL is not mandatory too.
Thanks for your patience
~Krishna(I love "Transparency")
వీలయితే నాల్గు పోస్టులు ...కుదురితే ఒక కామెంటూ ...

Translate

Enter your email address:

Buffs ...

Visitors


hits counter
View My StatsCheck Google Page Rank

Add to Google Reader or Homepage

Bookmark and Share

Tags


Powered by WidgetsForFree

Archives