[zones-discuss] Re: Advice wanted - sharing file systems across multiple zones
Hi.. Hello, [...] dir. I have looked at delegating a dataset to samba and creating a new fs for each user but then I cannot share that with www. I also tried creating the fs under the global zone and mounting that via lofs but that did not seem to carry over each underlying fs and lost the quota capability. I cannot share via NFS since non global zones cannot mount from the same server. If you dont't want to use a commercial product to mount the smb share provided by the samba zone (such as sharity), I think your only chance is to share the zone's filesystem via NFS form the global zone. Either you have your zfs dataset just in the global zone and export it to both the samba and the www zone (i don't know if putting a samba share on top of a NFS share is a good idea), or you delegate the zfs pool to the samba zone and then export it from the global zone (like share /zones/zone-samba/root/data/smb if your zone-path ist /zones/zone-samb and your datadir is /data/smb). The more elegant solution in my opinion is the first one as zfs can share filesystems by setting just one parameter. You may have to look if there are any locking issues with samba on top of NFS, i think there were at least some with the Linux NFS implementation. If you choose soloution b, sharing a delegated dataset from the global zone, you have to be sure that all mounts are disconnected and you unshare the mount form the global zone before you shut down the samba zone. If you forget to do that, your samba zone won't come down. The only soloution I found to clear the zone was to reboot the whole box. Hope that helps, Joern This message posted from opensolaris.org ___ 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] Why root zone can't be on ZFS for upgrade ?
Nicolas Dorfsman wrote: Hi, Something is unclear in Solaris containers and Solaris ZFS docs Two extracts : http://docs.sun.com/app/docs/doc/819-5461/6n7ht6qsm?q=zonea=view Consider the following interactions when working with ZFS on a system with Solaris zones installed: A ZFS file system that is added to a non-global zone must have its mountpoint property set to legacy. A ZFS file system cannot serve as zone root because of issues with the Solaris upgrade process. Do not include any system-related software that is accessed by the patch or upgrade process in a ZFS file system that is delegated to a non-global zone. http://docs.sun.com/app/docs/doc/817-1592/6mhahuop2?a=view 4. Set the zone path, /export/home/my-zone in this procedure. zonecfg:my-zone set zonepath=/export/home/my-zone Do not place the zonepath on ZFS for this release. I can't understand why the upgrade process need to have non-global root zone on anything else than zfs. Does the boot cdrom can't mount ZFS volumes ? The installation software does not yet understand ZFS, and is not able to upgrade a Solaris 10 system with a ZFS root file system. Further, it is not able to upgrade a Solaris 10 system with a non-global zone that has a ZFS file system as its zonepath. -- -- Jeff VICTOR Sun Microsystemsjeff.victor @ sun.com OS AmbassadorSr. Technical Specialist Solaris 10 Zones FAQ:http://www.opensolaris.org/os/community/zones/faq -- ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Advice wanted - sharing file systems across multiple zones
Does this help? http://www.sun.com/software/solaris/howtoguides/s10securityhowto.jsp On 20/12/06, Daren R. Sefcik [EMAIL PROTECTED] wrote: Hi.. After searching hi low, I cannot find the answer for what I want to do (or at least understand how to do it). I am hopeful somebody can point me in the right direction. I have (2) non global zones (samba www) I want to be able to have all user home dir's served from zone samba AND be visable under zone www as the users public_html dir. I have looked at delegating a dataset to samba and creating a new fs for each user but then I cannot share that with www. I also tried creating the fs under the global zone and mounting that via lofs but that did not seem to carry over each underlying fs and lost the quota capability. I cannot share via NFS since non global zones cannot mount from the same server. How can I achieve what I want to do? The requirements are: User Quotas (needs a file system for each user) Share file systems across multiple non global zones (rw) I have close to 3000 users so it must be a manageable approach and hopefully allow me to use the root preexec of samba to auto create user dir's. tia for any help, Daren This message posted from opensolaris.org ___ zones-discuss mailing list zones-discuss@opensolaris.org -- Rasputin :: Jack of All Trades - Master of Nuns http://number9.hellooperator.net/ ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Advice wanted - sharing file systems across multiple zones
Daren R. Sefcik wrote: Hi.. After searching hi low, I cannot find the answer for what I want to do (or at least understand how to do it). I am hopeful somebody can point me in the right direction. I have (2) non global zones (samba www) I want to be able to have all user home dir's served from zone samba AND be visable under zone www as the users public_html dir. I have looked at delegating a dataset to samba and creating a new fs for each user but then I cannot share that with www. I also tried creating the fs under the global zone and mounting that via lofs but that did not seem to carry over each underlying fs and lost the quota capability. What file system type are you using? Delegating a dataset implies ZFS, but all of the common file system types can be mounted into a zone using LOFS. What behavior did you see regarding the loss of quotas? If ZFS quotas are not maintained when mounted via LOFS, is it possible to use UFS instead? Is there a reason that you cannot mount the underlying file systems into the zones as well? I cannot share via NFS since non global zones cannot mount from the same server. How can I achieve what I want to do? Perhaps there is another method to achieve your real goal(s). In non-technical terms, what is your goal? In other words, why do you want one zone to serve files to another zone? The requirements are: User Quotas (needs a file system for each user) Share file systems across multiple non global zones (rw) I have close to 3000 users so it must be a manageable approach and hopefully allow me to use the root preexec of samba to auto create user dir's. tia for any help, Daren This message posted from opensolaris.org ___ zones-discuss mailing list zones-discuss@opensolaris.org -- -- Jeff VICTOR Sun Microsystemsjeff.victor @ sun.com OS AmbassadorSr. Technical Specialist Solaris 10 Zones FAQ:http://www.opensolaris.org/os/community/zones/faq -- ___ 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 m1. ERROR: No such file or directory: cannot mount /data/zones/m1/root/zfstest in non-global zone to install: the source block device or directory backup/zfstest cannot be accessed ERROR: cannot setup zone m1 inherited and configured file systems ERROR: cannot setup zone m1 file systems inherited and configured from the global zone ERROR: cannot create zone boot environment m1 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