Usually we install local zones for our customer as sparse root. That is /lib, 
/platform, /sbin and /usr as inherit-pkg-dir.

Now suppose our customer requires a software to be installed in a single zone 
below /usr. In the first step this is not possible since /usr is read-only.
I already know about several workaround for this like:
- using pkgadd with different BASEDIR (if it's a relocatable package)
- using symlinks below /usr (created in global zone) pointing to some zone 
local storage.
- etc.

With all these workarounds (if they work at all) we have a big problem.
Software to be installed is mostly commercial software for which our customer 
pays for support. And in a support case vendor might find the software is 
installed in some "unsupported" way (from the software vendors point of view). 
Therefore we can't use any workaround for installing software in "unsupported" 

Sure, we should make these software vendors fix their software being fully 
compatible with standard zone configurations. Another point is to reject 
installation of this kind of software or do a complete reinstall of the local 
zone. But you cannot do this to a VIC (very important customer). Don't ask.

But hey, I've got another Idea and want to ask you if that might be possible.
Let's talk about a zone configured with /usr as inherit-pkg-dir.
We want to convert /usr from inherit-pkg-dir to a copied filesystem like in a 
full root zone.
How can we do this? Imagine:

1. doing "zoneadm -z myzone halt"

2. change zone config with
    $ zonecfg  -z myzone  
    zonecfg:myzone> remove inherit-pkg-dir dir=/usr   
    zonecfg:myzone> commit  
    zonecfg:myzone> exit

3. copy /usr from global zone to myzone
   $ cp -R -p@ /usr/. /zones/myzone/root/usr/.
Maybe I should use other copy tools to get a clean copy. But that's not the 

4. Boot the zone "zoneadm -z myzone boot"

I did not test this, yet.
I suspect some pitfalls with packaging tools. Maybe somewhere inside /var/pkg 
requires changes!?
What else might go wrong?

NB: I've sent this question to our sun support center. They told me that this 
type of request is not covert by our support contract.
This message posted from
zones-discuss mailing list

Reply via email to