Hi, Why would I ever need to specify ZFS mount(s) in /etc/vfstab at all? I see it in some documents that zfs can be defined in /etc/vfstab with fstype zfs. Thanks. This message posted from opensolaris.org
On 1/10/07, Vahid Moghaddasi <vahid at cckeeper.com> wrote:> Hi, > Why would I ever need to specify ZFS mount(s) in /etc/vfstab at all? I see it in some documents that zfs can be defined in /etc/vfstab with fstype zfs. > Thanks. >I don''t think it''s a question of needing to be able to do so as much as it is a useful transitional mechanism. Some people might not be comfortable with how ZFS keeps track of filesystems and where they should be mounted, and vfstab is something they''re used to dealing with. For example, at a previous job, we had a sanity-check script running out of cron to verify that every file system that should have been mounted actually was mounted and that every file system that actually was mounted should have been mounted (in other words, that the mapping of vfstab entries to (non-auto-)mounted filesystems was both one-to-one and onto.)[1] In the pre-ZFS world, knowing what "should" be mounted was simply a question of looking at vfstab. With ZFS, the filesystems that "should" be mounted are those filesystems that _are_ mounted. In this model, a sanity-check script like this is meaningless, because there''s no longer an independent source of information to say what "should" be mounted. This is an example where this feature is convenient. There might be other examples where this feature is necessary. Chad Mynhier [1] Note that the purpose of the script was mostly to guard against operator error rather than system problems. With vfstab, it would take two independent actions to change what is mounted on a server and the concept of what should be mounted there. With ZFS, a single action can change both of those.
On Wed, Jan 10, 2007 at 08:07:59PM -0800, Vahid Moghaddasi wrote:> > Why would I ever need to specify ZFS mount(s) in /etc/vfstab at all? I > see it in some documents that zfs can be defined in /etc/vfstab with > fstype zfs. >Besides legacy scripts or environments, this also may be required if you want to place a system directory (/var, /usr, etc) on a separate ZFS dataset. This is because normal ZFS datasets do not get mounted as part of filesystem/minimal, but as part of filesystem/local. It''s possible to scan for such datasets earlier, but given the workaround of using legacy mounts, it hasn''t been high priority. - Eric -- Eric Schrock, Solaris Kernel Development http://blogs.sun.com/eschrock
> On Wed, Jan 10, 2007 at 08:07:59PM -0800, Vahid > Moghaddasi wrote: > > > > Why would I ever need to specify ZFS mount(s) in > /etc/vfstab at all? I > > see it in some documents that zfs can be defined in > /etc/vfstab with > > fstype zfs. > > > > Besides legacy scripts or environments, this also may > be required if you > want to place a system directory (/var, /usr, etc) on > a separate ZFS > dataset. This is because normal ZFS datasets do not > get mounted as part > of filesystem/minimal, but as part of > filesystem/local. It''s possible > to scan for such datasets earlier, but given the > workaround of using > legacy mounts, it hasn''t been high priority. > >I never created /var or /usr under ZFS so I guess if I do so, then I need to put them in vfstab to make them mount before other ZFS or while in single user. I believe this will apply to any FS that I need to mount during filesystem/local mounts. I can''t think any situation in our environment that I will need to use vfstab to mount ZFS. Thank you all, Vahid. This message posted from opensolaris.org