On Wed, 2 Jan 2008, 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 >
It's not recommended practice to modify the zone config files directly (bad boy James!). While configuring the zone you can do this: add fs set dir=/tanku/home set special=/tanku/home set type=lofs set options=nodevices end commit My preference is to add the user in the zone using useradd with no "-m" or "-d" switch, and then followup by setting the /etc/passwd entry to /tanku/home/username and avoid using the /export/home and /home conventions. This leaves open the possibility of some NFS mounts later. Also, if you upgrade a box which has the UFS home filesystem mounted as /export/home to use ZFS filesystems, you may elect to leave the old drive(s) in place and keep the legacy data mounted as /export/home and the new home directories using ZFS type names - like pool and tank etc. Regards, Al Hopper Logical Approach Inc, Plano, TX. [EMAIL PROTECTED] Voice: 972.379.2133 Fax: 972.379.2134 Timezone: US CDT OpenSolaris Governing Board (OGB) Member - Apr 2005 to Mar 2007 http://www.opensolaris.org/os/community/ogb/ogb_2005-2007/ Graduate from "sugar-coating school"? Sorry - I never attended! :) _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss