Is there a difference between setting mountpoint=legacy and mountpoint=none? -- Rasputin :: Jack of All Trades - Master of Nuns http://number9.hellooperator.net/
Just spotted one - is this intentional? You can''t delegate a dataset to a zone if mountpoint=legacy. Changing it to ''none'' works fine. vera / # zfs create tank/delegated vera / # zfs get mountpoint tank/delegated NAME PROPERTY VALUE SOURCE tank/delegated mountpoint legacy inherited from tank vera / # zfs create tank/delegated/ganesh vera / # zfs get mountpoint tank/delegated/ganesh NAME PROPERTY VALUE SOURCE tank/delegated/ganesh mountpoint legacy inherited from tank vera / # zonecfg -z ganesh zonecfg:ganesh> add dataset zonecfg:ganesh:dataset> set name=tank/delegated/ganesh zonecfg:ganesh:dataset> end zonecfg:ganesh> commit zonecfg:ganesh> exit vera / # zoneadm -z ganesh boot could not verify zfs dataset tank/delegated/ganesh: mountpoint cannot be inherited zoneadm: zone ganesh failed to verify vera / # zfs set mountpoint=none tank/delegated/ganesh vera / # zoneadm -z ganesh boot vera / # On 28/11/06, Dick Davies <rasputnik at gmail.com> wrote:> Is there a difference between setting mountpoint=legacy and mountpoint=none?-- Rasputin :: Jack of All Trades - Master of Nuns http://number9.hellooperator.net/
Is there a difference - Yep, ''legacy'' tells ZFS to refer to the /etc/vfstab file for FS mounts and options whereas ''none'' tells ZFS not to mount the ZFS filesystem at all. Then you would need to manually mount the ZFS using ''zfs set mountpoint=/mountpoint poolname/fsname'' to get it mounted. In a nutshell, setting ''none'' means that ''zfs mount -a'' wont mount the FS cause there is no mount point specified anywhere Dick Davies wrote On 11/28/06 17:15,:> Is there a difference between setting mountpoint=legacy and > mountpoint=none? >Hope that helps, Sincerely, -- Terence Donoghue Senior Engineer Sun Microsystems +41 44 908 9000
On Tue, Nov 28, 2006 at 06:08:23PM +0100, Terence Patrick Donoghue wrote:> Dick Davies wrote On 11/28/06 17:15,: > > >Is there a difference between setting mountpoint=legacy and > >mountpoint=none?> Is there a difference - Yep, > > ''legacy'' tells ZFS to refer to the /etc/vfstab file for FS mounts and > options > whereas > ''none'' tells ZFS not to mount the ZFS filesystem at all. Then you would > need to manually mount the ZFS using ''zfs set mountpoint=/mountpoint > poolname/fsname'' to get it mounted. > > In a nutshell, setting ''none'' means that ''zfs mount -a'' wont mount the > FS cause there is no mount point specified anywhereBut you could presumably get that exact effect by not listing a filesystem in /etc/vfstab. Ceri -- That must be wonderful! I don''t understand it at all. -- Moliere -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20061128/b76c491c/attachment.bin>
On Tue, Nov 28, 2006 at 06:06:24PM +0000, Ceri Davies wrote:> > But you could presumably get that exact effect by not listing a > filesystem in /etc/vfstab. >Yes, but someone could still manually mount the filesystem using ''mount -F zfs ...''. If you set the mountpoint to ''none'', then it cannot be mounted, period. Note that this predates the ''canmount'' property. Presumably you could get the same behavior by doing ''mountpoint=legacy'' and ''canmount=off''. I''m not sure where the ''canmount'' property is enforced, but I don''t think its checked in the kernel, so one could presumably avoid this check by manually issuing a mount(2) syscall. - Eric -- Eric Schrock, Solaris Kernel Development http://blogs.sun.com/eschrock
On Tue, Nov 28, 2006 at 11:13:02AM -0800, Eric Schrock wrote:> On Tue, Nov 28, 2006 at 06:06:24PM +0000, Ceri Davies wrote: > > > > But you could presumably get that exact effect by not listing a > > filesystem in /etc/vfstab. > > > > Yes, but someone could still manually mount the filesystem using ''mount > -F zfs ...''. If you set the mountpoint to ''none'', then it cannot be > mounted, period.Aha, that''s the key then, thanks. Ceri -- That must be wonderful! I don''t understand it at all. -- Moliere -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20061129/27966afe/attachment.bin>
On 28/11/06, Terence Patrick Donoghue <Terence-Patrick.Donoghue at sun.com> wrote:> Is there a difference - Yep, > > ''legacy'' tells ZFS to refer to the /etc/vfstab file for FS mounts and > options > whereas > ''none'' tells ZFS not to mount the ZFS filesystem at all. Then you would > need to manually mount the ZFS using ''zfs set mountpoint=/mountpoint > poolname/fsname'' to get it mounted.Thanks Terence - now you''ve explained it, re-reading the manpage makes more sense :) This is plain wrong though: " Zones A ZFS file system can be added to a non-global zone by using zonecfg''s "add fs" subcommand. A ZFS file system that is added to a non-global zone must have its mountpoint property set to legacy." It has to be ''none'' or it can''t be delegated. Could someone change that? -- Rasputin :: Jack of All Trades - Master of Nuns http://number9.hellooperator.net/
On Tue, Nov 28, 2006 at 04:48:19PM +0000, Dick Davies wrote:> Just spotted one - is this intentional? > > You can''t delegate a dataset to a zone if mountpoint=legacy. > Changing it to ''none'' works fine. > > > vera / # zfs create tank/delegated > vera / # zfs get mountpoint tank/delegated > NAME PROPERTY VALUE SOURCE > tank/delegated mountpoint legacy inherited from tank > vera / # zfs create tank/delegated/ganesh > vera / # zfs get mountpoint tank/delegated/ganesh > NAME PROPERTY VALUE SOURCE > tank/delegated/ganesh mountpoint legacy inherited from > tank > vera / # zonecfg -z ganesh > zonecfg:ganesh> add dataset > zonecfg:ganesh:dataset> set name=tank/delegated/ganesh > zonecfg:ganesh:dataset> end > zonecfg:ganesh> commit > zonecfg:ganesh> exit > vera / # zoneadm -z ganesh boot > could not verify zfs dataset tank/delegated/ganesh: mountpoint cannot be inherited > zoneadm: zone ganesh failed to verify > vera / # zfs set mountpoint=none tank/delegated/ganesh > vera / # zoneadm -z ganesh boot > vera / #Does it actually boot then? Eric is saying that the filesystem cannot be mounted in the ''none'' case, so presumably it doesn''t. Ceri -- That must be wonderful! I don''t understand it at all. -- Moliere -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20061129/c1e1701c/attachment.bin>
On Wed, Nov 29, 2006 at 10:25:18AM +0000, Ceri Davies wrote:> On Tue, Nov 28, 2006 at 04:48:19PM +0000, Dick Davies wrote: > > Just spotted one - is this intentional? > > > > You can''t delegate a dataset to a zone if mountpoint=legacy. > > Changing it to ''none'' works fine. > > > > > > vera / # zfs create tank/delegated > > vera / # zfs get mountpoint tank/delegated > > NAME PROPERTY VALUE SOURCE > > tank/delegated mountpoint legacy inherited from tank > > vera / # zfs create tank/delegated/ganesh > > vera / # zfs get mountpoint tank/delegated/ganesh > > NAME PROPERTY VALUE SOURCE > > tank/delegated/ganesh mountpoint legacy inherited from > > tank > > vera / # zonecfg -z ganesh > > zonecfg:ganesh> add dataset > > zonecfg:ganesh:dataset> set name=tank/delegated/ganesh > > zonecfg:ganesh:dataset> end > > zonecfg:ganesh> commit > > zonecfg:ganesh> exit > > vera / # zoneadm -z ganesh boot > > could not verify zfs dataset tank/delegated/ganesh: mountpoint cannot be inherited > > zoneadm: zone ganesh failed to verify > > vera / # zfs set mountpoint=none tank/delegated/ganesh > > vera / # zoneadm -z ganesh boot > > vera / # > > Does it actually boot then? Eric is saying that the filesystem cannot > be mounted in the ''none'' case, so presumably it doesn''t.Not to worry, I see what you''re doing now. Ceri -- That must be wonderful! I don''t understand it at all. -- Moliere -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20061129/a92ac683/attachment.bin>
On 29/11/06, Dick Davies <rasputnik at gmail.com> wrote:> On 28/11/06, Terence Patrick Donoghue <Terence-Patrick.Donoghue at sun.com> wrote: > > Is there a difference - Yep, > > > > ''legacy'' tells ZFS to refer to the /etc/vfstab file for FS mounts and > > options > > whereas > > ''none'' tells ZFS not to mount the ZFS filesystem at all. Then you would > > need to manually mount the ZFS using ''zfs set mountpoint=/mountpoint > > poolname/fsname'' to get it mounted. > > Thanks Terence - now you''ve explained it, re-reading the manpage > makes more sense :) > > This is plain wrong though: > > " Zones > A ZFS file system can be added to a non-global zone by using > zonecfg''s "add fs" subcommand. A ZFS file system that is > added to a non-global zone must have its mountpoint property > set to legacy." > > It has to be ''none'' or it can''t be delegated. Could someone change that?I''ve had one last go at understanding what the hell is going on, and what''s *really* being complained about is the fact that the mountpoint attribute is inherited (regardless of whether the value is ''none'' or ''legacy''). Explicitly setting the mountpoint lets the zone boot. -- Rasputin :: Jack of All Trades - Master of Nuns http://number9.hellooperator.net/