Hi Jason,

I frequently recommend creating a writable /usr/local under the
read-only /usr to solve this problem.

One simple method to do this is:

zonecfg -z myzone
add fs
set special=/mypool/zones/usr-local
set dir=/usr/local
set type=lofs

Will that work for you?


On Thu, Jan 22, 2009 at 1:17 PM, Jason King <ja...@ansipunx.net> wrote:
> Is there any way to create non-legacy, canmount=yes filesystems with
> set mountpoints for a zone prior to zoneadm install?
> I'm trying to do some zone creation automation, and one of the things
> is a per-zone, writable /usr/local (yes it's not 'standard' but then I
> can count on one hand the number of packages that properly install in
> /opt, so not even worth going there).  The current solution I've been
> doing is something like this:
> zfs create pool/zones/<zonename>
> chmod 700 pool
> zfs create -o mountpoint=none pool/zones/fs
> zonecfg -z zonename
> create
> ...
> ...
> add dataset
>    set name = rpool/zones/fs
> end
> ...
> zoneadm -z zonename install
> (tweak a few files under /zones/<zonename>/root prior to initial boot)
> zlogin -z zonename -C
> <run through sysid cfg>
> zfs create -o mountpoint=/usr/local rpool/zones/<zonename>/fs/local
> zfs create -o mountpoint=/export rpool/zones/<zonename/fs/export
> zfs create rpool/zones/<zonename>/fs/export/home
> ... and so on
> However, since some packages install into /usr/local (again it's
> something that has to be dealt with), it would be desirable to have
> /usr/local available during the zoneadm install process.  But as far
> as I can tell, you cannot set the mountpoint property (without setting
> canmount to no or noauto) until the zone is running (and only then
> within the zone).
> Any ideas?
> _______________________________________________
> zones-discuss mailing list
> zones-discuss@opensolaris.org

zones-discuss mailing list

Reply via email to