Well, ignore my post, a kernel engineer would know. I had no idea you
could loopback mount the same filesystem into multiple zones, or am I
missing something? This would certainly be more efficient than using nfs.

Lou

James C. McPherson wrote:
> Bo Granlund wrote:
>   
>> Hi,
>>
>> [Sorry for cross-posting, but I think either list can provide the
>>  solution I'm looking for.]
>>
>> I have been up all night researching zones and ZFS for a particular
>> project we are going to build soon. It's going to feature the latest
>> and greatest of OpenSolaris, and use ofcourse ZFS pool to manage the
>> available disk without allowing disk device files in the zones.
>>
>> The thing I want to be done (sorry if this is a really stupid question,
>> but I'm a bit of a newbie in ZFS and zones, althought I like the concept
>> a lot!), is to create a pool, say pool/home, and then have that pool
>> mounted read write in a couple of zones running probably OpenSolaris
>> on Nexenta, depending on the breaks. So my question is, is it possible
>> to mount the pool/home pool to several different zones? I've been trying
>> just about every concievable name combination in google, but haven't
>> found a definitive answer. The thing is, one zone is going to run sendmail/
>> postfix/whatever, that stores the mail in the /home/$user/Maildir. Then
>> there'll be another zone that runs some imap server application, like
>> Dovecot for example, and it reads the mail from /home/$user/Maildir.
>> Can this be done with ZFS?
>>
>> Reading documentation on the net, I came to wonder about this kind of
>> solution
>> host# zfs create pool/home
>> host# zonecfg -z myzone
>>     
>>> add dataset
>>>       
>> dataset> set name=pool/home
>> dataset> end
>>     
>>> ^D
>>>       
>> host# zoneadm -z myzone boot
>> host# zlogin myzone
>>
>> myzone# zfs set mountpoint=/home pool/home
>>     
>
>
> I think you're on the right track. Here's what I have in my
> global zone:
>
>
> $ zfs list sink/home
> NAME        USED  AVAIL  REFER  MOUNTPOINT
> sink/home  6.68G  59.9G  6.68G  /export/home
>
> $ zfs get mountpoint sink/home
> NAME       PROPERTY    VALUE         SOURCE
> sink/home  mountpoint  /export/home  local
>
> set with "zfs set mountpoint=/export/home sink/home"
>
>
> Then in each of my zones, I have this in the zone config file:
>
>
>    <filesystem special="/export/home/jmcp" directory="/export/home/jmcp" 
> type="lofs">
>      <fsoption name="rw"/>
>    </filesystem>
>
>
>
> So then in each zone's /etc/auto_home I have
>
> jmcp    localhost:/export/home/jmcp
>
>
>
>
> James C. McPherson
> --
> Senior Kernel Software Engineer, Solaris
> Sun Microsystems
> http://blogs.sun.com/jmcp     http://www.jmcp.homeunix.com/blog
> _______________________________________________
> zones-discuss mailing list
> zones-discuss@opensolaris.org
>   
_______________________________________________
zones-discuss mailing list
zones-discuss@opensolaris.org

Reply via email to