You probably want to share pool/home as an NFS share then mount it in 
the zones. The zfs file system itself can't actually be mounted to 
multiple mountpoints, its not a shared filesystem like NFS or QFS.

zfs set sharenfs=on pool/home

then in the zones

mount globalzonehost:/home /home

Where "globalzonehost" is the host name of the server shareing the zfs 
filesystem over nfs. Note that a better approach might be to create a 
separate zfs filesystem for each user rather than just mounting the 
whole home tree.

See:
http://www.solarisinternals.com/wiki/index.php/ZFS_Best_Practices_Guide#ZFS_NFS_Server_Practices


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
>
> Will this work? I'm sorry, but I don't have a OpenSolaris machine on
> to test this theory. Any pointers to documentation that explains things
> would be greatly appreciated!
>
> warm regards, and have a nice 2008,
> Bo Granlund
>
> _______________________________________________
> zones-discuss mailing list
> [EMAIL PROTECTED]
>   
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to