[zones-discuss] Creating ZFS filesystems prior to zoneadm install
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/ 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//root prior to initial boot) zlogin -z zonename -C zfs create -o mountpoint=/usr/local rpool/zones//fs/local zfs create -o mountpoint=/export rpool/zones//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
Re: [zones-discuss] Creating ZFS filesystems prior to zoneadm install
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 end exit Will that work for you? --JeffV On Thu, Jan 22, 2009 at 1:17 PM, Jason King 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/ > 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//root prior to initial boot) > > zlogin -z zonename -C > > > zfs create -o mountpoint=/usr/local rpool/zones//fs/local > zfs create -o mountpoint=/export rpool/zones/ zfs create rpool/zones//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 > -- --JeffV ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Creating ZFS filesystems prior to zoneadm install
On Sun, Jan 25, 2009 at 9:59 AM, Jeff Victor wrote: > 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 > end > exit > > Will that work for you? That's what I ended up having to do. ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Creating ZFS filesystems prior to zoneadm install
Le 25 janv. 09 à 17:32, Jason King a écrit : On Sun, Jan 25, 2009 at 9:59 AM, Jeff Victor wrote: 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 end exit Will that work for you? Another solution is to put a link like : /usr/local -> /opt/local smime.p7s Description: S/MIME cryptographic signature ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Creating ZFS filesystems prior to zoneadm install
Why not simply create a writable /opt/local and using a symlink to it from /usr/local ? On Sun, Jan 25, 2009 at 10:59 AM, Jeff Victor wrote: > 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 > end > exit > > Will that work for you? > > --JeffV > > On Thu, Jan 22, 2009 at 1:17 PM, Jason King 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/ >> 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//root prior to initial boot) >> >> zlogin -z zonename -C >> >> >> zfs create -o mountpoint=/usr/local rpool/zones//fs/local >> zfs create -o mountpoint=/export rpool/zones/> zfs create rpool/zones//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 >> > > > > -- > --JeffV > ___ > zones-discuss mailing list > zones-discuss@opensolaris.org > ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Creating ZFS filesystems prior to zoneadm install
Unfortunately, there is software that feels it must be smarter than the OS and will refuse to dereference symlinks (as well as hard code paths in their software) :) If only vendors would package software correctly... :) On Mon, Jan 26, 2009 at 1:03 PM, Fredrich Maney wrote: > Why not simply create a writable /opt/local and using a symlink to it > from /usr/local ? > > On Sun, Jan 25, 2009 at 10:59 AM, Jeff Victor wrote: >> 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 >> end >> exit >> >> Will that work for you? >> >> --JeffV >> >> On Thu, Jan 22, 2009 at 1:17 PM, Jason King 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/ >>> 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//root prior to initial boot) >>> >>> zlogin -z zonename -C >>> >>> >>> zfs create -o mountpoint=/usr/local rpool/zones//fs/local >>> zfs create -o mountpoint=/export rpool/zones/>> zfs create rpool/zones//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 >>> >> >> >> >> -- >> --JeffV >> ___ >> zones-discuss mailing list >> zones-discuss@opensolaris.org >> > ___ > zones-discuss mailing list > zones-discuss@opensolaris.org > ___ zones-discuss mailing list zones-discuss@opensolaris.org