SEO

vBulletin Search Engine Optimization


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > Sun Solaris Administration

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-16-2008, 10:34 AM
Liam Greenwood
 
Posts: n/a
Default Splitting /usr into multiple inherit-pkg-dir directories

Hi

We have an appliation that installs *one* file into /usr/man. The
application is hosted in a Solaris 10 U3 zone. Because of the
one file the zone is installed as whole-root model (before I
was involved!). I'd much rather have the option to run with
a sparse-root model, and in particular I would rather make that
decision on a more compelling reason than one man page.

If I was doing it I would have at least faked it out somehow, and
just put the file in the right place from the global zone.

However, I wouldn't want to recommend that as a good solution. I'd
rather have a more defensible solution.

One that I have considered is to not have /usr as an inherit-pkg-dir
directory and instead have each directory subordinate to /usr
(/usr/bin /usr/lib etc etc) individually defined as inherit-pkg-dir,
leaving out /usr/man.

The issue I see with this is that one *doesn't* define /usr as
inherit-pkg-dir - it's a default that is not in the config file.
Is choosing a sparse-root model an all-or-nothing choice in
respect of those default dirs?

Does anyone have any other ideas?

Cheers, Liam
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-16-2008, 10:34 AM
Greg Andrews
 
Posts: n/a
Default Re: Splitting /usr into multiple inherit-pkg-dir directories

Liam Greenwood <[email protected]> writes:
>
>
>The issue I see with this is that one *doesn't* define /usr as
>inherit-pkg-dir - it's a default that is not in the config file.
>Is choosing a sparse-root model an all-or-nothing choice in
>respect of those default dirs?
>


Nope, you can specify /usr as a non-inherited filesystem
when installing that zone. You can use the default the
same as your other zones, and make an exception (re-define
the /usr filesystem) before performing the commit.

I wrote a script where I did exactly that, but I don't have
it in front of me. I should be able to get it by tomorrow,
though.

One caveat: /usr has LOTS of files, so copying them takes
a good amount of time when the zone is created.


An alternative might be to create a symbolic link in the
global zone that points the single file created by the
application to a place that's local/writable by the
non-global zone.

That's not a great solution, but for a single file on a
single zone, it avoids duplicating all of /usr. You can
decide which is better for your server.


-Greg
--
Do NOT reply via e-mail.
Reply in the newsgroup.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-16-2008, 10:34 AM
Sak Wathanasin
 
Posts: n/a
Default Re: Splitting /usr into multiple inherit-pkg-dir directories

In article <[email protected]>,
Liam Greenwood <[email protected]> wrote:

> The issue I see with this is that one *doesn't* define /usr as
> inherit-pkg-dir - it's a default that is not in the config file.
> Is choosing a sparse-root model an all-or-nothing choice in
> respect of those default dirs?
>
> Does anyone have any other ideas?


I loopback mount /usr/local in some of my zones so I can install special
versions of Apache, PHP etc. The zone admin manual describes how to do it:

$ zonecfg -z hosting1-zone export
create -b
set zonepath=/zones/hosting1
set autoboot=true
add inherit-pkg-dir
set dir=/lib
end
add inherit-pkg-dir
set dir=/platform
end
add inherit-pkg-dir
set dir=/sbin
end
add inherit-pkg-dir
set dir=/usr
end
add inherit-pkg-dir
set dir=/opt/sfw
end
add fs
set dir=/usr/local
set special=/zones/hosting1-local
set type=lofs
add options rw
add options nodevices
end
....etc...

--

Sak Wathanasin
Network Analysis Limited
http://www.network-analysis.ltd.uk