logo

Main Menu

Statistics





Solaris zone in mounted state PDF Print E-mail
User Rating: / 0
PoorBest 
Written by Peter van Gemert (Auteur)   
Monday, 06 December 2010 00:36

I ran a # zoneadm list -cv on my server and found one of my zones to be in the mounted state. Nobody ever told be that a zone could be in the mounted state so what is it? How did the zone get there? How do I get the zone out of the mounted state?

1   Checking my zones

# zoneadm list -cv
ID NAME      STATUS     PATH                 BRAND    IP
0 global     running    /                    native   shared
1 szone1     mounted    /zones/szone1        native   shared
- szone      configured /zones/szone         native   shared

Hee, I can understand the running and configured status of my zones. But what is the mounted state? Let's check the manual page on zones.

 

2   What has the manual page to say

# man zones
A zone can be in one of several states:

CONFIGURED       Indicates that the  configuration  for  the
zone has been completely specified and com-
mitted to stable storage.


INCOMPLETE       Indicates that the zone is in the midst  of
being  installed  or  uninstalled,  or  was
interrupted in the midst of such a  transi-
tion.


INSTALLED        Indicates that the zone's configuration has
been  instantiated  on the system: packages
have been installed under the  zone's  root
path.


READY            Indicates that the "virtual  platform"  for
the   zone   has   been   established.  For
instance, file systems have  been  mounted,
devices   have   been  configured,  but  no
processes associated  with  the  zone  have
been started.


RUNNING          Indicates that  user  processes  associated
with  the  zone application environment are
running.


SHUTTING_DOWN    Indicates that the zone  is  being  halted.
DOWN             The  zone  can become stuck in one of these
states if it is unable  to  tear  down  the
application   environment  state  (such  as
mounted file systems) or if some portion of
the  virtual  platform cannot be destroyed.
Such cases require operator intervention.

Mmhhh, according to the manual page, mounted is not present as a state and therefor it should not be listed in the output of zoneadm.

 

3   What does google say about this

So I google with this search "solaris zone state mounted" and got the following link:
http://osdir.com/ml/solaris.opensolaris.zones/2006-09/msg00029.html, which tells me:

  • It shouldn't be possible to get a zone into a 'mounted' state
  • It's not documented anywhere and shouldn't be user visible.
  • I searched for some of the different states (ready running configured installed) and found the
    #define for ZONE_STATE_STR_MOUNTED.
  • I only found one occasion where it can be *supplied* as a state, in kernel_state_to_user_state().
  • According to the inline doc, execution can only get there if the zone's root is mounted on $ZONEPATH/lu.
  • Indeed, mounted is a state that should only be used by the patch/package tools.

4   What do I have to say to all of this?

Wait. Patching you say. I run a pkgrm command but decide later that I still needed the package so I gave a on the pkrm command.

Aaaah. I remember that I gave the when the pkgrm command was evaluating the szone1 zone.

Ok, so I killed a patch command and that left the zone in a mounted state. How do I resolve this situation.

 

5   Get the zone out the mounted state

(Again from http://osdir.com/ml/solaris.opensolaris.zones/2006-09/msg00029.html)

  • zoneadm -z ( zone name ) unmount, will return it to installed ( halted) state

6   Let's try that

# zoneadm list -cv
ID NAME     STATUS     PATH                      BRAND    IP
0 global    running    /                         native   shared
1 szone1    mounted    /zone/szone1              native   shared
- szone     configured /zones/szone              native   shared

# zoneadm -z szone1 unmount

# zoneadm list -cv
ID NAME     STATUS     PATH                      BRAND    IP
0 global    running    /                         native   shared
- szone     configured /zones/szone              native   shared
- szone1    installed  /zones/szone1             native   shared

As you understand, the unmount subcommand of zoneadm is not documented in the manual page.

7   Disclaimer

I'm in no way responsible for what you do. Not even when you do it after reading my documents.


Last Updated on Thursday, 24 February 2011 17:03
 


Powered by Joomla!. Designed by: computer template (video) mysql table Valid XHTML and CSS.