[zones-discuss] how to find global-zone from zone
Hi, I was wondering if it's possible to find out to which global zone a zone is related. (And not from Globalzone point of view!) It might happen (as a sysadmin) that you login to a zone but you need to perform maintenance in the global zone (i.e. Veritas VM -stuff). Thanks in advance Remco ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] zonename
Sabri Ali [EMAIL PROTECTED] writes: Hello! if i'm in a zone localy how do i know the zone global, with which command ?? Think's This should probably be in the FAQ. It last came up about 2 weeks ago: http://www.opensolaris.org/jive/thread.jspa?threadID=35960 Boyd ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] how to find global-zone from zone
(Replying to the correct thread this time) Remco Fugers [EMAIL PROTECTED] writes: Hi, I was wondering if it's possible to find out to which global zone a zone is related. (And not from Globalzone point of view!) It might happen (as a sysadmin) that you login to a zone but you need to perform maintenance in the global zone ( i.e. Veritas VM -stuff). Thanks in advance Remco This should probably be in the FAQ: http://www.opensolaris.org/jive/thread.jspa?threadID=35960 ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] how to find global-zone from zone
Remco, There is no command to display the Global zone of a non-global zone but there are a few tricks that I have heard of. One is to create a file in the zone path of each zone and then read it from the non-global On the Global touch /zone_path/root/etc/global.hostname On the non ls -l /etc/global* -JOhn Remco Fugers wrote: Hi, I was wondering if it's possible to find out to which global zone a zone is related. (And not from Globalzone point of view!) It might happen (as a sysadmin) that you login to a zone but you need to perform maintenance in the global zone ( i.e. Veritas VM -stuff). Thanks in advance Remco ___ zones-discuss mailing list zones-discuss@opensolaris.org -- ** John Chase /___/\ (Technical Support OS Group) _\_ \\ \ Sun Support Services _\__\ \\ / / / \/_/ / Sun Microsystems Inc. /___/ / __\//\ 1 Network Drive BLDG 4 \___\//\ __/ / Burlington, MA 01803-0903 /__/ / /\ / M/S UBUR04-268 \___/ \\ \EMail: [EMAIL PROTECTED] \ \ \\ 1-800-USA4-SUN \___\/ ** ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] how to find global-zone from zone
In a related, but similar situation. How does one know that they are actually in a non-global zone vs a global zone? (Using a committed interface). zonename(1). And zonecfg(1M) states that the name 'global' is reserved. Steffen Brandorr wrote: On 8/29/07, John Chase [EMAIL PROTECTED] wrote: Remco, There is no command to display the Global zone of a non-global zone but there are a few tricks that I have heard of. One is to create a file in the zone path of each zone and then read it from the non-global On the Global touch /zone_path/root/etc/global.hostname On the non ls -l /etc/global* -JOhn Remco Fugers wrote: Hi, I was wondering if it's possible to find out to which global zone a zone is related. (And not from Globalzone point of view!) It might happen (as a sysadmin) that you login to a zone but you need to perform maintenance in the global zone ( i.e. Veritas VM -stuff). In a related, but similar situation. How does one know that they are actually in a non-global zone vs a global zone? (Using a committed interface). -Brian Thanks in advance Remco ___ zones-discuss mailing list zones-discuss@opensolaris.org -- ** John Chase /___/\ (Technical Support OS Group) _\_ \\ \ Sun Support Services _\__\ \\ / / / \/_/ / Sun Microsystems Inc. /___/ / __\//\ 1 Network Drive BLDG 4 \___\//\ __/ / Burlington, MA 01803-0903 /__/ / /\ / M/S UBUR04-268 \___/ \\ \ EMail: [EMAIL PROTECTED] \ \ \\ 1-800-USA4-SUN \___\/ ** ___ zones-discuss mailing list zones-discuss@opensolaris.org ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] how to find global-zone from zone
Hi, we implemented a cron-job in the global zone to run the following srcipt: #!/bin/ksh PATH=$PATH:/usr/sbin:/usr/bin OSVERSION=`uname -r | awk -F. '{print $2}'` if [ ${OSVERSION} -gt 9 ]; then zonename | grep global /dev/null 21 [ $? -ne 0 ] exit 0 for i in `zoneadm list -v| awk '{print $4}' | grep -v ^/$ | grep ^/` do echo `hostname` $i/root/etc/globalzone done fi So you have just to do a cat /etc/globalzone. This message posted from opensolaris.org ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] how to find global-zone from zone
This is easy: In the global zone [EMAIL PROTECTED] zoneadm list global labv490-01z3 labv490-01z2 labv490-01z6 labv490-01z7 labv490-01z4 labv490wsz1 labv490wsz2 labv490wsz3 labv490-01z1 [EMAIL PROTECTED] In the non-global [EMAIL PROTECTED] zoneadm list labv490-01z1 If the output form zoneadm list shows the word global, you are in the global zone. If there is no global, you are in a non-global zone. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brandorr Sent: Wednesday, August 29, 2007 9:27 AM To: John Chase Cc: zones-discuss@opensolaris.org Subject: Re: [zones-discuss] how to find global-zone from zone On 8/29/07, John Chase [EMAIL PROTECTED] wrote: Remco, There is no command to display the Global zone of a non-global zone but there are a few tricks that I have heard of. One is to create a file in the zone path of each zone and then read it from the non-global On the Global touch /zone_path/root/etc/global.hostname On the non ls -l /etc/global* -JOhn Remco Fugers wrote: Hi, I was wondering if it's possible to find out to which global zone a zone is related. (And not from Globalzone point of view!) It might happen (as a sysadmin) that you login to a zone but you need to perform maintenance in the global zone ( i.e. Veritas VM -stuff). In a related, but similar situation. How does one know that they are actually in a non-global zone vs a global zone? (Using a committed interface). -Brian Thanks in advance Remco ___ zones-discuss mailing list zones-discuss@opensolaris.org -- ** John Chase /___/\ (Technical Support OS Group) _\_ \\ \ Sun Support Services _\__\ \\ / / / \/_/ / Sun Microsystems Inc. /___/ / __\//\ 1 Network Drive BLDG 4 \___\//\ __/ / Burlington, MA 01803-0903 /__/ / /\ / M/S UBUR04-268 \___/ \\ \ EMail: [EMAIL PROTECTED] \ \ \\ 1-800-USA4-SUN \___\/ ** ___ zones-discuss mailing list zones-discuss@opensolaris.org -- - Brian Gupta http://opensolaris.org/os/project/nycosug/ ___ zones-discuss mailing list zones-discuss@opensolaris.org ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] how to find global-zone from zone
On 8/29/07, John Chase [EMAIL PROTECTED] wrote: Remco, There is no command to display the Global zone of a non-global zone but there are a few tricks that I have heard of. One is to create a file in the zone path of each zone and then read it from the non-global On the Global touch /zone_path/root/etc/global.hostname On the non ls -l /etc/global* -JOhn Remco Fugers wrote: Hi, I was wondering if it's possible to find out to which global zone a zone is related. (And not from Globalzone point of view!) It might happen (as a sysadmin) that you login to a zone but you need to perform maintenance in the global zone ( i.e. Veritas VM -stuff). In a related, but similar situation. How does one know that they are actually in a non-global zone vs a global zone? (Using a committed interface). -Brian Thanks in advance Remco ___ zones-discuss mailing list zones-discuss@opensolaris.org -- ** John Chase /___/\ (Technical Support OS Group) _\_ \\ \ Sun Support Services _\__\ \\ / / / \/_/ / Sun Microsystems Inc. /___/ / __\//\ 1 Network Drive BLDG 4 \___\//\ __/ / Burlington, MA 01803-0903 /__/ / /\ / M/S UBUR04-268 \___/ \\ \ EMail: [EMAIL PROTECTED] \ \ \\ 1-800-USA4-SUN \___\/ ** ___ zones-discuss mailing list zones-discuss@opensolaris.org -- - Brian Gupta http://opensolaris.org/os/project/nycosug/ ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] how to find global-zone from zone
On 8/29/07, Brandorr [EMAIL PROTECTED] wrote: In a related, but similar situation. How does one know that they are actually in a non-global zone vs a global zone? (Using a committed interface). `ps -ef` and look for pid 0,1,2,3; these should only be visible in a global zone. -- Paul Kraus ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] how to find global-zone from zone
Paul Kraus wrote: On 8/29/07, Brandorr [EMAIL PROTECTED] wrote: In a related, but similar situation. How does one know that they are actually in a non-global zone vs a global zone? (Using a committed interface). `ps -ef` and look for pid 0,1,2,3; these should only be visible in a global zone. Gahh! The contortions! Just use zonename; if it comes back global, you're in a global zone. If anything else, you're not. Attribute is Evolving, is that better than looking for pids? And maybe one day there will be pid 0, 1, 2, 3 in a non-global zone. CT ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] zonename
On 8/29/07, Boyd Adamson [EMAIL PROTECTED] wrote: Sabri Ali [EMAIL PROTECTED] writes: Hello! if i'm in a zone localy how do i know the zone global, with which command ?? Think's This should probably be in the FAQ. It last came up about 2 weeks ago: http://www.opensolaris.org/jive/thread.jspa?threadID=35960 I added it to my OpenSolaris newbie user FAQ: http://www.genunix.org/wiki/index.php/FAQ_Prototype -Brian Boyd ___ zones-discuss mailing list zones-discuss@opensolaris.org -- - Brian Gupta http://opensolaris.org/os/project/nycosug/ ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] zonename
This question has been asked before. This is the trick we use: Since the zone command /usr/sbin/zoneadm list -vi does not display the name of the global zone when logged on to a local zone, we added to the global zone OS filesystem in "/usr/bin" a script/command called "zone-global-name". This script has the global zone name hard coded and echoes its name. e.g. #!/bin/sh echo "global zone name" Now every time we build a new local zone this command is copied or shared with the local zone depending on the type of zone created. This installs a command that will always show you the name of the global zone when you are on logged on to the local zone. Kind of a hack, but it works for us. Boyd Adamson wrote: "Sabri Ali" [EMAIL PROTECTED] writes: Hello! if i'm in a zone localy how do i know the zone global, with which command ?? Think's This should probably be in the FAQ. It last came up about 2 weeks ago: http://www.opensolaris.org/jive/thread.jspa?threadID=35960 Boyd ___ zones-discuss mailing list zones-discuss@opensolaris.org -- Michael Barto Software Architect LogiQwest Inc. 16458 Bolsa Chica Street, # 15 Huntington Beach, CA92649 http://www.logiqwest.com/ [EMAIL PROTECTED] Tel:714 377 3705 Fax:714 840 3937 Cell: 714 883 1949 'tis a gift to be simple This e-mail may contain LogiQwest proprietary information and should be treated as confidential. ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] zonename
Bonjour, It's correct if you have à local zone creating whitout -b option ! but if yoy are creating you local zone whith -b option the /usr in the local zone is not the same in the global zone !! SABRI ALI MEDIAPOST SERVICES DSI - Ressources Administrateur système 9 boulevard du Général de GAULLE 92126 Montrouge CEDEX E.mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Tel : 0146124526 Fax : 0146124550 P Pensons ENVIRONNEMENT: n'imprimer que si nécessaire ... De : Michael Barto [mailto:[EMAIL PROTECTED] Envoyé : mercredi 29 août 2007 17:40 À : Boyd Adamson Cc : Sabri Ali; zones-discuss@opensolaris.org Objet : Re: [zones-discuss] zonename This question has been asked before. This is the trick we use: Since the zone command /usr/sbin/zoneadm list -vi does not display the name of the global zone when logged on to a local zone, we added to the global zone OS filesystem in /usr/bin a script/command called zone-global-name. This script has the global zone name hard coded and echoes its name. e.g. #!/bin/sh echo global zone name Now every time we build a new local zone this command is copied or shared with the local zone depending on the type of zone created. This installs a command that will always show you the name of the global zone when you are on logged on to the local zone. Kind of a hack, but it works for us. Boyd Adamson wrote: Sabri Ali [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] writes: Hello! if i'm in a zone localy how do i know the zone global, with which command ?? Think's This should probably be in the FAQ. It last came up about 2 weeks ago: http://www.opensolaris.org/jive/thread.jspa?threadID=35960 Boyd ___ zones-discuss mailing list zones-discuss@opensolaris.org -- Michael Barto Software Architect LogiQwest Inc. 16458 Bolsa Chica Street, # 15 Huntington Beach, CA 92649 http://www.logiqwest.com/ [EMAIL PROTECTED] Tel: 714 377 3705 Fax: 714 840 3937 Cell: 714 883 1949 'tis a gift to be simple This e-mail may contain LogiQwest proprietary information and should be treated as confidential. circle.gif___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] how to find global-zone from zone
Since this seems to be a common question that has shown up on this list from time to time, I have added our method to our Solaris Zone RunBook which is free and posted it at: http://www.logiqwest.com/dataCenter/Demos/RunBooks/Zones/listingGlobal.html Hope this helps till Sun finally puts a real command in the OS. Remco Fugers wrote: Hi, I was wondering if it's possible to find out to which global zone a zone is related. (And not from Globalzone point of view!) It might happen (as a sysadmin) that you login to a zone but you need to perform maintenance in the global zone ( i.e. Veritas VM -stuff). Thanks in advance Remco ___ zones-discuss mailing list zones-discuss@opensolaris.org -- Michael Barto Software Architect LogiQwest Inc. 16458 Bolsa Chica Street, # 15 Huntington Beach, CA92649 http://www.logiqwest.com/ [EMAIL PROTECTED] Tel:714 377 3705 Fax:714 840 3937 Cell: 714 883 1949 'tis a gift to be simple This e-mail may contain LogiQwest proprietary information and should be treated as confidential. ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Need code review: 6558857 ZSD callback locking cause deadlocks
On Wed, Aug 29, 2007 at 03:52:49PM -0700, Dan Price wrote: On Wed 29 Aug 2007 at 03:47PM, Erik Nordmark wrote: Fixing the above CR requires changing how locking is done across the ZSD callbacks. The new design is to determine what callbacks are needed while holding the usual locks, but not hold any locks across the actual callbacks. This holds up under extreme stress testing where zones come and go at the same time as zone_key_create and zone_key_destroy are being called. The code changes are at: http://cr.grommit.com/~nordmark/6558857/webrev/ Comments? Wow, it's not trivial. I'll try to dig in over the next couple of days. Hmmm, someone commented (in the VSD case) that maybe we ought to have a common object-specific key facility. Here we have fixes to two different object-specific key facilities. I think a heads up to the RE for CR 6588504 is in order. And maybe we should think about having a generic OSD. Nico -- ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Need code review: 6558857 ZSD callback locking cause deadlocks
Nicolas Williams wrote: Hmmm, someone commented (in the VSD case) that maybe we ought to have a common object-specific key facility. Here we have fixes to two different object-specific key facilities. I think a heads up to the RE for CR 6588504 is in order. And maybe we should think about having a generic OSD. Commonality is good but requires some care. For instance, just looking at zsd and the netstack there are quite different ordering requirements with the netstacks needing things to be destroyed in the reverse order of which they were created. Erik ___ zones-discuss mailing list zones-discuss@opensolaris.org