I'm really amazed how you pull this stuff.
I'm gonna have a look right now
You know, I already switched to OpenSolaris on my new NAS box ... mainly
for this reason (automatic nfs sharing)
Granted, I really liked the stuff that happened with SMB sharing and
'shadow copies' (older versions) on Win32 client machines.
Awesome-frickin-awesome stuff that too
> --
> To post to this group, send email to zfs-...@googlegroups.com
> To visit our Web site, click on http://zfs-fuse.net/
root@karmic:~# mount -o ro
karmic:/MUBI/zfs/PersoonlijkeBestanden/MyPictures /tmp/HerPictures
mount.nfs: access denied by server while mounting
karmic:/MUBI/zfs/PersoonlijkeBestanden/MyPictures
Syslog:
Feb 15 14:33:29 karmic mountd[4340]: refused mount request from
127.0.1.1 for /MUBI/zfs/PersoonlijkeBestanden/MyPictures (/): not exported
I'm assuming I need the in-kernel nfs server?
A bit more context:
root@karmic:~# zfs get sharenfs -s local
NAME
PROPERTY VALUE SOURCE
desktop/PersoonlijkeBestanden/MyPictures
sharenfs on local
root@karmic:~# zfs list desktop/PersoonlijkeBestanden/MyPictures
NAME USED AVAIL REFER MOUNTPOINT
desktop/PersoonlijkeBestanden/MyPictures 7.90G 12.0G 7.90G
/MUBI/zfs/PersoonlijkeBestanden/MyPictures
Yes you need the exportfs command, the one which maintains the mounts in /var/lib/nfs/etab.
So once you have done :
zfs set sharenfs=on filesystem
if it displays no error then you should see the share in /var/lib/nfs/etab with the default options used.
I just commited a big change which makes the non default options usable, because passing directly the exportfs options really didn't work.
So now the syntax is :
sharenfs=off -> disabled
on -> default options : ro,fsid=100,no_subtree_check for any host
(gdb) break zfsfuse_share
(gdb) run set sharenfs=on desktop/PersoonlijkeBestanden/MyPictures
(gdb) shell zfs get sharenfs -s local
NAME PROPERTY VALUE SOURCE
desktop/PersoonlijkeBestanden/MyPictures sharenfs on local
(gdb) run share -a
Starting program: /usr/local/sbin/zfs share -a
[Thread debugging using libthread_db enabled]
Program exited normally.
(gdb) run unshare -a
Starting program: /usr/local/sbin/zfs unshare -a
[Thread debugging using libthread_db enabled]
Program exited normally.
(gdb) run share -a
Starting program: /usr/local/sbin/zfs share -a
[Thread debugging using libthread_db enabled]
Program exited normally.
>
> Also it calls exportfs using the system(3) call, and I have read that
> on some distributions, when root uses the system call, they use a bash
> version which drops its privileges before executing the command. This
> is security in the path of efficiency, debian does not do that (so
> ubuntu does not neither probably). Don't know about fedora and redhat...
Ubuntu here. I suppose priviliges aren't dropped. Although the
restricted bash shell may be used (bash -r if I recall). This may impact
PATH to make it fail.
>
> Hope you can make it work, it would be too bad it can work only here !
> ;-)
>
> 2010/2/15 sgheeren <sghe...@hotmail.com <mailto:sghe...@hotmail.com>>
>> <mailto:sghe...@hotmail.com>>
>> zfs-...@googlegroups.com <mailto:zfs-...@googlegroups.com>
>> >> To visit our Web site, click on http://zfs-fuse.net/
>> >>
>> >
>> >
>>
>> --
>> To post to this group, send email to
>> zfs-...@googlegroups.com <mailto:zfs-...@googlegroups.com>
>> To visit our Web site, click on http://zfs-fuse.net/
>>
>>
>>
>>
>> --
>> zfs-fuse git repository :
>> http://rainemu.swishparty.co.uk/cgi-bin/gitweb.cgi?p=zfs;a=summary
>> --
>> To post to this group, send email to zfs-...@googlegroups.com
>> <mailto:zfs-...@googlegroups.com>
>> To visit our Web site, click on http://zfs-fuse.net/
>
> --
> To post to this group, send email to zfs-...@googlegroups.com
> <mailto:zfs-...@googlegroups.com>
at least you're committing :) I can't say the same here so no
complaints. I'm just quick to test ? Will try tomorrow night (no time
before that)
Emmanuel Anne wrote:
> Ok, the shares handling apprently works in a way a little strange in
> opensolaris : when you set the sharenfs property, it just checks if
> there is already a share for this mountpoint, and there is one, it
> just enables it, ignoring the new sharenfs value !
>
> So it's quite disturbing when you make some adjustements to the
> sharenfs value.
> In the new commit, it updates the shares based on sharenfs value
> always, even if there is already another share.
>
> It means that if you already have a share for host1 on /zip
> and you do zfs set sharenfs=host2:rw zip
> you'll just add a share for host2 while keeping the share for host1
> but then if you do
> zfs set sharenfs=off zip
> you'll remove all the shares for zip, including the one for host1 (zfs
> is supposed to handle all the shares in this case).
>
> Also I fixed a bug where zfsfuse_findshare could check only the
> beginning of the path, and not the whole path in some specific conditions.
>
> Maybe I commited a little too fast yesterday, so excuse me then !
>
> <mailto:sghe...@hotmail.com> <mailto:sghe...@hotmail.com
> >> <mailto:sghe...@hotmail.com <mailto:sghe...@hotmail.com>>>
> <mailto:zfs-...@googlegroups.com <mailto:zfs-...@googlegroups.com>>
> >> >> To visit our Web site, click on http://zfs-fuse.net/
> >> >>
> >> >
> >> >
> >>
> >> --
> >> To post to this group, send email to
> >> zfs-...@googlegroups.com
> <mailto:zfs-...@googlegroups.com>
> <mailto:zfs-...@googlegroups.com <mailto:zfs-...@googlegroups.com>>
> >> To visit our Web site, click on http://zfs-fuse.net/
> >>
> >>
> >>
> >>
> >> --
> >> zfs-fuse git repository :
> >>
> http://rainemu.swishparty.co.uk/cgi-bin/gitweb.cgi?p=zfs;a=summary
> >> --
> >> To post to this group, send email to
> zfs-...@googlegroups.com <mailto:zfs-...@googlegroups.com>
> >> <mailto:zfs-...@googlegroups.com
> <mailto:zfs-...@googlegroups.com>>
> >> To visit our Web site, click on http://zfs-fuse.net/
> >
> > --
> > To post to this group, send email to
> zfs-...@googlegroups.com <mailto:zfs-...@googlegroups.com>
> > <mailto:zfs-...@googlegroups.com
I'm curious as to where the info for what is being shared via 'zfs
share' is stored?
I also seem to remember someone talking about what a pain it is to
have to type in long strings to make several shares at once.
Why not keep a file in /etc/zfs called zfs-share and keep the info
there or have it updated by the daemon when you create/delete a share
so that it can be auto-parsed on startup each time?
Emmanuel Anne wrote:
> Good news then. Maybe there is a problem with the canmount property
> then ? I never tested this !
>
> 2010/2/18 sgheeren <sghe...@hotmail.com <mailto:sghe...@hotmail.com>>
>> <mailto:sghe...@hotmail.com>>
I'm gonna update to your latest code since you improved it, but I thought I'd let you know!
On Feb 20, 6:23 pm, Emmanuel Anne <emmanuel.a...@gmail.com> wrote:
> Cool, glad to know you like it !
A lot, did I mention that?
>
> For the default ro : it's in the default exportfs options, I guessed it was
> probably a good idea to keep it.
> So I guess the root=sehe means use this option + the default options for all
> the hosts, equivalent to "*:root=sehe" with current zfs-fuse syntax ?
Well, yes that is the intent. The thing is the option itself:
exportfs -o root=sehe,fsid=11,no_subtree_check '*:/bbs/media/Video'
returned an error
--
To post to this group, send email to zfs-...@googlegroups.com
To visit our Web site, click on http://zfs-fuse.net/