SUMMARY: How to Un-inherit-pkg-dir

From: Crist Clark <Crist.Clark_at_globalstar.com>
Date: Mon Mar 17 2008 - 20:00:08 EDT
Thank you to a number of respondents. However, I ended up
just sticking with the method I outlined in my original
message. I did a lofs mount of /opt/local over /usr/local
all internal to the particular zone.

One other solution a number of people sent me was a variation
on that where you do the loopback mount from the global
zone into the non-global zone using zonecfg(1M) commands,

	zonecfg:ainterdoc> add fs
	zonecfg:ainterdoc:fs> set dir=/usr/local
	zonecfg:ainterdoc:fs> set special=/opt/local
	zonecfg:ainterdoc:fs> set type=lofs
	zonecfg:ainterdoc:fs> end

That way the global /opt/local gets mounted in the non-global
zone. For my case, it didn't seem to offer any advantages over
just doing it all internal to the zone, so I did not go that
way.

The other option two people presented was to ignore the
zonecfg(1M) command's warning that "removing inherit-pkg-dir
not allowed," and do so manually by editing the zone's
configuration file. The file in question is the,

	/etc/zones/<zonename>.xml

File. Just look for the "inherit-pkg-dir" line for the
file system of interested and remove it. My procedure would
have been,

	1. Halt zone.
	2. Edit zone's XML file.
	3. Copy /usr from global zone to the non-global zone.
	4. Restart zone.

But I opted not to go this way. I don't think the actual
procedure would have caused problems, but the potential
for future administration headaches when patching the system
made me decide the loopback mount of /opt/local was the
best way to go short of tearing down the whole thing and
starting over.

Thanks again fellow Sun managers.

On 3/6/2008 at 1:43 PM, "Crist Clark" <Crist.Clark@globalstar.com>
wrote:
> I've got a non-global zone that has the default four
> directories from the global zone set to inherit-pkg-dir,
> /lib, /platform, /sbin, and /usr. However, now it is
> turning out that we have some (poorly assembled) software
> that is insisting on being installed in /usr/local.
> Obviously, this does not work with /usr mounted as a
> read-only loopback.
> 
> My initial response was to bring down the zone, copy the
> global /usr to the zone's /usr and then just un-inherit
> the directory. However, the zonecfg(1M) is not allowing
> me to un-inherit,
> 
> 	zonecfg:ainterdoc> remove inherit-pkg-dir dir=/usr
> 	Zone ainterdoc already installed; remove inherit-pkg-dir not
> allowed.
> 
> Is there a way to force the removal without destroying
> (uninstalling) the zone?
> 
> A workaround I've thought of is to do something like,
> 
> 	# cd /zone/ainterdoc/root/opt
> 	# (cd /usr ; tar cf - local) | tar xf -
> 
> Then add an entry into the non-global zone's vfstab to
> loopback mount its /opt/local over /usr/local. The
> problem with this is that any future packages or patches
> to things installed in the global /usr/local be inconsistent
> in the zone. The files will not be touched, but the /var/sadm
> database will. (Right?)
> 
> As for future installations, anyone have a workaround for
> this kind of problem so we can still share /usr, but have
> /usr/local unique to the zone for broken software
> installations?


BB<information contained in this e-mail message is confidential, intended
only for the use of the individual or entity named above. If the reader
of this e-mail is not the intended recipient, or the employee or agent
responsible to deliver it to the intended recipient, you are hereby
notified that any review, dissemination, distribution or copying of this
communication is strictly prohibited. If you have received this e-mail
in error, please contact postmaster@globalstar.com 
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Mon Mar 17 19:00:45 2008

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:44:10 EST