Re: [zones-discuss] Mounting /var and /opt as filesystem in container
Brad, sorry for taking so long to answer - christmas time ;-) That problem is exactly Bug 6449301. The workaround is to "add fs" after the zones installation. Detlef On 12/21/06 22:21, Brad Diggs wrote: Hello Detlef, What I want to do is add a new non-gobal zone where the initial zone config includes a legacy mode zfs filesystem. If the zfs filesystem exists but is not mounted, when you install the zone, you get an error similar to the following: Preparing to install zone . ERROR: No such file or directory: cannot mount in non-global zone to install: the source block device or directory cannot be accessed ERROR: cannot setup zone inherited and configured file systems ERROR: cannot setup zone file systems inherited and configured from the global zone ERROR: cannot create zone boot environment zoneadm: zone 'm1': '/usr/lib/lu/lucreatezone' failed with exit code 74. Error: Zone installation failed, return value: 0 I want to know if there are specific steps that I can incorporate into my zonemgr script to enable this without having to wait until the zone is created and add the zfs filesystem as a second step. Thanks in advance, Brad On Thu, 2006-12-21 at 10:42 +0100, Detlef Drewanz wrote: Brad, I am not sure what you are trying to achieve, but http://docs.sun.com/app/docs/doc/819-5461/6n7ht6qsm?a=view lists the ways that are possible, if you want to bring a global Zones ZFS into a zone 1. Look for "Adding ZFS File Systems to a Non-Global Zone" and please note the text in the comment after that ! 2. Another way would be to just create a loopback mount into a zone. e.g.: mount global-zone:/zoneshare in a zone as local-zone:/zoneshare in zonecfg: add fs set type=lofs set dir=/zoneshare set special=/zoneshare set options=rw I assume you mean 1., but 2. also works. Detlef On 12/20/06 17:25, Brad Diggs wrote: Detlef, To be specific, do you mean that within the global zone, you have to do the following: 1. Add the zfs filesystem as legacy filesystem. 2. Manually add entry into /etc/vfstab (please provide example as I don't see one anywhere). 3. Mount the zfs filesystem in the global zone. 4. Create the zone with the legacy mode zfs (type=zfs) as a part of the zone config. 5. Install the zone. 6. Umount the zfs filesystem from the global zone. Is that about it? If you will provide of a working vfstab entry, I will try it out here in my lab. Thanks in advance, Brad On Wed, 2006-12-20 at 16:47 +0100, Detlef Drewanz wrote: I think you have to mount the zfs as legacy mount point via /etc/vfstab, before you can "add fs" this to a zone. (I remember that I've seen this in the manual, but have'nt tried this by myself.) Detlef On 12/20/06 14:06, Shawn LEE C.H. wrote: Ivan thks for the reply... Actually, i tried both, still cannot...with / and without Ivan Buetler wrote: My hint: Missing / in zonecfg:web> instead of #zonecfg:web> special=diskpool/web/var using #zonecfg:web> special=/diskpool/web/var Ivan On Wednesday 20 December 2006 10:53, Shawn LEE C. H. wrote: Hi experts Is there anyway we can mount /var and /opt in a zone in a separate filesystem, noting that /var and /opt within a zone is not empty. I had tried assigning zpool devices to the zone like this: #zfs create diskpool c0t0d0 #zfs create diskpool/web #zfs create diskpool/web/var #zonecfg -z web #zonecfg:web> add fs #zonecfg:web> set dir=/var #zonecfg:web> special=diskpool/web/var #zonecfg:web> set type=zfs #zonecfg:web> end #zonecfg:web> exit When I tried to verify and install the zone, it gives an error saying /opt and /var can't be created and verified. Any ideas how can we achieve this feat?? rgds shawn ___ zones-discuss mailing list zones-discuss@opensolaris.org -- Detlef Drewanz Systems Engineer/OS Ambassador Sun Microsystems GmbH Phone: (+49 30) 747096 856 Komturstrasse 18a mailto:[EMAIL PROTECTED] D-12099 Berlin http://blogs.sun.com/solarium ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Mounting /var and /opt as filesystem in container
Hello Detlef, What I want to do is add a new non-gobal zone where the initial zone config includes a legacy mode zfs filesystem. If the zfs filesystem exists but is not mounted, when you install the zone, you get an error similar to the following: Preparing to install zone . ERROR: No such file or directory: cannot mount in non-global zone to install: the source block device or directory cannot be accessed ERROR: cannot setup zone inherited and configured file systems ERROR: cannot setup zone file systems inherited and configured from the global zone ERROR: cannot create zone boot environment zoneadm: zone 'm1': '/usr/lib/lu/lucreatezone' failed with exit code 74. Error: Zone installation failed, return value: 0 I want to know if there are specific steps that I can incorporate into my zonemgr script to enable this without having to wait until the zone is created and add the zfs filesystem as a second step. Thanks in advance, Brad On Thu, 2006-12-21 at 10:42 +0100, Detlef Drewanz wrote: > Brad, > I am not sure what you are trying to achieve, but > http://docs.sun.com/app/docs/doc/819-5461/6n7ht6qsm?a=view > lists the ways that are possible, if you want to bring a global Zones ZFS > into a zone > > 1. Look for "Adding ZFS File Systems to a Non-Global Zone" and please note > the text in the > comment after that ! > > 2. Another way would be to just create a loopback mount into a zone. > e.g.: mount global-zone:/zoneshare in a zone as local-zone:/zoneshare > > in zonecfg: > add fs > set type=lofs > set dir=/zoneshare > set special=/zoneshare > set options=rw > > I assume you mean 1., but 2. also works. > > Detlef > > On 12/20/06 17:25, Brad Diggs wrote: > > Detlef, > > > > To be specific, do you mean that within the global zone, you have > > to do the following: > > 1. Add the zfs filesystem as legacy filesystem. > > 2. Manually add entry into /etc/vfstab (please provide example as > > I don't see one anywhere). > > 3. Mount the zfs filesystem in the global zone. > > 4. Create the zone with the legacy mode zfs (type=zfs) as a part > > of the zone config. > > 5. Install the zone. > > 6. Umount the zfs filesystem from the global zone. > > > > Is that about it? If you will provide of a working vfstab entry, > > I will try it out here in my lab. > > > > Thanks in advance, > > Brad > > > > On Wed, 2006-12-20 at 16:47 +0100, Detlef Drewanz wrote: > > > >>I think you have to mount the zfs as legacy mount point via /etc/vfstab, > >>before you can > >>"add fs" this to a zone. > >>(I remember that I've seen this in the manual, but have'nt tried this by > >>myself.) > >> > >>Detlef > >> > >>On 12/20/06 14:06, Shawn LEE C.H. wrote: > >> > >>>Ivan > >>> > >>>thks for the reply... > >>> > >>>Actually, i tried both, still cannot...with / and without > >>> > >>>Ivan Buetler wrote: > >>> > >>> > My hint: > > Missing / in zonecfg:web> > instead of > #zonecfg:web> special=diskpool/web/var > > > using > #zonecfg:web> special=/diskpool/web/var > > > > Ivan > > On Wednesday 20 December 2006 10:53, Shawn LEE C. H. wrote: > > > > >Hi experts > > > >Is there anyway we can mount /var and /opt in a zone in a separate > >filesystem, noting that /var and /opt within a zone is not empty. I had > >tried assigning zpool devices to the zone like this: > > > >#zfs create diskpool c0t0d0 > >#zfs create diskpool/web > >#zfs create diskpool/web/var > > > >#zonecfg -z web > >#zonecfg:web> add fs > >#zonecfg:web> set dir=/var > >#zonecfg:web> special=diskpool/web/var > >#zonecfg:web> set type=zfs > >#zonecfg:web> end > >#zonecfg:web> exit > > > >When I tried to verify and install the zone, it gives an error saying > >/opt and /var can't be created and verified. Any ideas how can we > >achieve this feat?? > > > >rgds > >shawn > ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Mounting /var and /opt as filesystem in container
Brad, I am not sure what you are trying to achieve, but http://docs.sun.com/app/docs/doc/819-5461/6n7ht6qsm?a=view lists the ways that are possible, if you want to bring a global Zones ZFS into a zone 1. Look for "Adding ZFS File Systems to a Non-Global Zone" and please note the text in the comment after that ! 2. Another way would be to just create a loopback mount into a zone. e.g.: mount global-zone:/zoneshare in a zone as local-zone:/zoneshare in zonecfg: add fs set type=lofs set dir=/zoneshare set special=/zoneshare set options=rw I assume you mean 1., but 2. also works. Detlef On 12/20/06 17:25, Brad Diggs wrote: Detlef, To be specific, do you mean that within the global zone, you have to do the following: 1. Add the zfs filesystem as legacy filesystem. 2. Manually add entry into /etc/vfstab (please provide example as I don't see one anywhere). 3. Mount the zfs filesystem in the global zone. 4. Create the zone with the legacy mode zfs (type=zfs) as a part of the zone config. 5. Install the zone. 6. Umount the zfs filesystem from the global zone. Is that about it? If you will provide of a working vfstab entry, I will try it out here in my lab. Thanks in advance, Brad On Wed, 2006-12-20 at 16:47 +0100, Detlef Drewanz wrote: I think you have to mount the zfs as legacy mount point via /etc/vfstab, before you can "add fs" this to a zone. (I remember that I've seen this in the manual, but have'nt tried this by myself.) Detlef On 12/20/06 14:06, Shawn LEE C.H. wrote: Ivan thks for the reply... Actually, i tried both, still cannot...with / and without Ivan Buetler wrote: My hint: Missing / in zonecfg:web> instead of #zonecfg:web> special=diskpool/web/var using #zonecfg:web> special=/diskpool/web/var Ivan On Wednesday 20 December 2006 10:53, Shawn LEE C. H. wrote: Hi experts Is there anyway we can mount /var and /opt in a zone in a separate filesystem, noting that /var and /opt within a zone is not empty. I had tried assigning zpool devices to the zone like this: #zfs create diskpool c0t0d0 #zfs create diskpool/web #zfs create diskpool/web/var #zonecfg -z web #zonecfg:web> add fs #zonecfg:web> set dir=/var #zonecfg:web> special=diskpool/web/var #zonecfg:web> set type=zfs #zonecfg:web> end #zonecfg:web> exit When I tried to verify and install the zone, it gives an error saying /opt and /var can't be created and verified. Any ideas how can we achieve this feat?? rgds shawn ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Mounting /var and /opt as filesystem in container
Detlef, To be specific, do you mean that within the global zone, you have to do the following: 1. Add the zfs filesystem as legacy filesystem. 2. Manually add entry into /etc/vfstab (please provide example as I don't see one anywhere). 3. Mount the zfs filesystem in the global zone. 4. Create the zone with the legacy mode zfs (type=zfs) as a part of the zone config. 5. Install the zone. 6. Umount the zfs filesystem from the global zone. Is that about it? If you will provide of a working vfstab entry, I will try it out here in my lab. Thanks in advance, Brad On Wed, 2006-12-20 at 16:47 +0100, Detlef Drewanz wrote: > I think you have to mount the zfs as legacy mount point via /etc/vfstab, > before you can > "add fs" this to a zone. > (I remember that I've seen this in the manual, but have'nt tried this by > myself.) > > Detlef > > On 12/20/06 14:06, Shawn LEE C.H. wrote: > > Ivan > > > > thks for the reply... > > > > Actually, i tried both, still cannot...with / and without > > > > Ivan Buetler wrote: > > > >> My hint: > >> > >> Missing / in zonecfg:web> > >> instead of > >> #zonecfg:web> special=diskpool/web/var > >> > >> > >> using > >> #zonecfg:web> special=/diskpool/web/var > >> > >> > >> > >> Ivan > >> > >> On Wednesday 20 December 2006 10:53, Shawn LEE C. H. wrote: > >> > >> > >>> Hi experts > >>> > >>> Is there anyway we can mount /var and /opt in a zone in a separate > >>> filesystem, noting that /var and /opt within a zone is not empty. I had > >>> tried assigning zpool devices to the zone like this: > >>> > >>> #zfs create diskpool c0t0d0 > >>> #zfs create diskpool/web > >>> #zfs create diskpool/web/var > >>> > >>> #zonecfg -z web > >>> #zonecfg:web> add fs > >>> #zonecfg:web> set dir=/var > >>> #zonecfg:web> special=diskpool/web/var > >>> #zonecfg:web> set type=zfs > >>> #zonecfg:web> end > >>> #zonecfg:web> exit > >>> > >>> When I tried to verify and install the zone, it gives an error saying > >>> /opt and /var can't be created and verified. Any ideas how can we > >>> achieve this feat?? > >>> > >>> rgds > >>> shawn > >>> ___ > >>> zones-discuss mailing list > >>> zones-discuss@opensolaris.org > >>> > > > > > > ___ > > zones-discuss mailing list > > zones-discuss@opensolaris.org > ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Mounting /var and /opt as filesystem in container
I think you have to mount the zfs as legacy mount point via /etc/vfstab, before you can "add fs" this to a zone. (I remember that I've seen this in the manual, but have'nt tried this by myself.) Detlef On 12/20/06 14:06, Shawn LEE C.H. wrote: Ivan thks for the reply... Actually, i tried both, still cannot...with / and without Ivan Buetler wrote: My hint: Missing / in zonecfg:web> instead of #zonecfg:web> special=diskpool/web/var using #zonecfg:web> special=/diskpool/web/var Ivan On Wednesday 20 December 2006 10:53, Shawn LEE C. H. wrote: Hi experts Is there anyway we can mount /var and /opt in a zone in a separate filesystem, noting that /var and /opt within a zone is not empty. I had tried assigning zpool devices to the zone like this: #zfs create diskpool c0t0d0 #zfs create diskpool/web #zfs create diskpool/web/var #zonecfg -z web #zonecfg:web> add fs #zonecfg:web> set dir=/var #zonecfg:web> special=diskpool/web/var #zonecfg:web> set type=zfs #zonecfg:web> end #zonecfg:web> exit When I tried to verify and install the zone, it gives an error saying /opt and /var can't be created and verified. Any ideas how can we achieve this feat?? rgds shawn ___ zones-discuss mailing list zones-discuss@opensolaris.org ___ zones-discuss mailing list zones-discuss@opensolaris.org -- Detlef Drewanz Systems Engineer/OS Ambassador Sun Microsystems GmbH Phone: (+49 30) 747096 856 Komturstrasse 18a mailto:[EMAIL PROTECTED] D-12099 Berlin http://blogs.sun.com/solarium ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Mounting /var and /opt as filesystem in container
Ivan thks for the reply... Actually, i tried both, still cannot...with / and without Ivan Buetler wrote: My hint: Missing / in zonecfg:web> instead of #zonecfg:web> special=diskpool/web/var using #zonecfg:web> special=/diskpool/web/var Ivan On Wednesday 20 December 2006 10:53, Shawn LEE C. H. wrote: Hi experts Is there anyway we can mount /var and /opt in a zone in a separate filesystem, noting that /var and /opt within a zone is not empty. I had tried assigning zpool devices to the zone like this: #zfs create diskpool c0t0d0 #zfs create diskpool/web #zfs create diskpool/web/var #zonecfg -z web #zonecfg:web> add fs #zonecfg:web> set dir=/var #zonecfg:web> special=diskpool/web/var #zonecfg:web> set type=zfs #zonecfg:web> end #zonecfg:web> exit When I tried to verify and install the zone, it gives an error saying /opt and /var can't be created and verified. Any ideas how can we achieve this feat?? rgds shawn ___ zones-discuss mailing list zones-discuss@opensolaris.org ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Mounting /var and /opt as filesystem in container
My hint: Missing / in zonecfg:web> instead of #zonecfg:web> special=diskpool/web/var using #zonecfg:web> special=/diskpool/web/var Ivan On Wednesday 20 December 2006 10:53, Shawn LEE C. H. wrote: > Hi experts > > Is there anyway we can mount /var and /opt in a zone in a separate > filesystem, noting that /var and /opt within a zone is not empty. I had > tried assigning zpool devices to the zone like this: > > #zfs create diskpool c0t0d0 > #zfs create diskpool/web > #zfs create diskpool/web/var > > #zonecfg -z web > #zonecfg:web> add fs > #zonecfg:web> set dir=/var > #zonecfg:web> special=diskpool/web/var > #zonecfg:web> set type=zfs > #zonecfg:web> end > #zonecfg:web> exit > > When I tried to verify and install the zone, it gives an error saying > /opt and /var can't be created and verified. Any ideas how can we > achieve this feat?? > > rgds > shawn > ___ > zones-discuss mailing list > zones-discuss@opensolaris.org ___ zones-discuss mailing list zones-discuss@opensolaris.org