Re: Does zfs have it's own nfs server?

2010-03-22 Thread Charles Sprickman

On Sat, 20 Mar 2010, Willem Jan Withagen wrote:


On 20-3-2010 0:50, Charles Sprickman wrote:

Just wondering, is this using the base nfsd/mountd, or is there some
in-kernel nfs code strictly for zfs? I haven't found much info on the
share* options in the manpage or wiki.


There's also the complete ZFS manual you should read:
http://dlc.sun.com/pdf/819-5461/819-5461.pdf


Anyone know how to tie the version of that document to the current version 
that's in FreeBSD?


Overall, it's a great reference.  Already answered a number of questions.

Here's another Sun doc that I used to get started:

http://hub.opensolaris.org/bin/download/Community+Group+zfs/demos/zfsdemo.pdf

It looks like it's for sales engineers who are going to do a demo of ZFS, 
however it works quite well as a quick-start.  It describes the basic 
concepts well and walks you through creating some pools.  It's hands-down 
my favorite Intro to ZFS doc that I've found so far.


Thanks,

Charles

It's for Solaris, so perhaps not everything works on FreeBSD. But most of it 
will.



Could you give an example of passing options that would say, limit to a
subnet and map root to root using the zfs sharenfs command?


Something like this: (Email might wrap the line)
	zfs set sharenfs='-alldirs -maproot=0 -network 192.168.10.0 -mask 
255.255.255.0' zfsdata/home/wjw


to export /home/wjw which is available as /zfsdata/home/wjw in ZFS.

All the zfs does is add this to the /etc/zfs/exports file.
And then the regular mountd/nfsd combo does the NDS-service.

--WjW





___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: Does zfs have it's own nfs server?

2010-03-20 Thread Willem Jan Withagen

On 20-3-2010 0:50, Charles Sprickman wrote:

Just wondering, is this using the base nfsd/mountd, or is there some
in-kernel nfs code strictly for zfs? I haven't found much info on the
share* options in the manpage or wiki.


There's also the complete ZFS manual you should read:
http://dlc.sun.com/pdf/819-5461/819-5461.pdf

It's for Solaris, so perhaps not everything works on FreeBSD. But most 
of it will.



Could you give an example of passing options that would say, limit to a
subnet and map root to root using the zfs sharenfs command?


Something like this: (Email might wrap the line)
	zfs set sharenfs='-alldirs -maproot=0 -network 192.168.10.0 -mask 
255.255.255.0' zfsdata/home/wjw


to export /home/wjw which is available as /zfsdata/home/wjw in ZFS.

All the zfs does is add this to the /etc/zfs/exports file.
And then the regular mountd/nfsd combo does the NDS-service.

--WjW



___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: Does zfs have it's own nfs server?

2010-03-20 Thread jhell


On Fri, 19 Mar 2010 20:18, Jeremy Chadwick wrote:
In Message-Id: 20100320001820.ga92...@icarus.home.lan


On Fri, Mar 19, 2010 at 07:50:24PM -0400, Charles Sprickman wrote:

On Fri, 19 Mar 2010, Willem Jan Withagen wrote:


On 17-3-2010 9:27, Matthias Gamsjager wrote:

sharenfs does work in freebsd but iscsi does not. I'm not sure about smb.

about nfs: you should take a look at /etc/zfs/exports



On Wed, Mar 17, 2010 at 9:15 AM, Harald Schmalzbauer
h.schmalzba...@omnilan.de  wrote:

Hello,

I observed some very strange filesystem security problems.
Now I found that if I set sharenfs=yes data/pub I can mount_nfs but it
does't respect any settings in /etc/exports. Also I get very strange uid
numbers when writing.
If I turn sharenfs off, limitations in /etc/exports work as expected.
I thought sharenfs and sharesmb are only working on
OpenSolaris. What about
shareiscsi?


I do not use /etc/exports for zfs shares
But instead of yes as value, you can use the NFS-options as string
and that gets it into /etc/zfs/exports.


Just wondering, is this using the base nfsd/mountd, or is there some
in-kernel nfs code strictly for zfs?  I haven't found much info on
the share* options in the manpage or wiki.


ZFS on FreeBSD's sharenfs option does nothing more than manage data in
a flat file (/etc/zfs/exports) and automatically send a SIGHUP to
mountd's pid (based on reading the contents of the file
_PATH_MOUNTDPID).  If you grep through /usr/src/cddl you can see what
I'm referring to.

So how does mountd know about /etc/zfs/exports?

$ ps -auxw | grep mount
root  861  0.0  0.0  6836  1716  ??  Is   10Mar10   0:00.00 
/usr/sbin/mountd -r -l /etc/exports /etc/zfs/exports

This is defined/referenced in /etc/rc.d/mountd.

All that said:

I avoid use of the sharenfs option in ZFS on RELENG_7 and RELENG_8, as
I found certain quirks/behavioural oddities (such as mountd not picking
up changes, or claims of not exporting something which visually
confirmed should have been exported -- and in one case, mounting of a
ZFS-exported NFS filesystem worked but then any I/O would block on the
client indefinitely.  Don't ask me how/why that happened).  Possibly
these were bugs that existed during ZFS's transitional phase between 7.x
and 8.x, but the unreliable nature of the situation left a bad taste in
my mouth.  The workaround:

Using /etc/exports to reference the local ZFS filesystems I want
exported, HUP mountd, done.  Above oddities/quirks no longer happened.
And there's an added bonus: all your exports are therefore kept in one
single place: a text file that's existed since what, 1989 or so?

Of course, the advantage is that with ZFS properties you can inherit
options -- that might be useful to some, but not to me.

There's also known quirks/issues with the parsing logic with sharenfs.
This was discussed in December 2009.


Could you give an example of passing options that would say, limit
to a subnet and map root to root using the zfs sharenfs command?


zfs create pool/fs
zfs set sharenfs=-maproot=blah -network x.x.x.x -mask y.y.y.y pool/fs

Right now I'm more or less avoiding NFS as much as possible, as the
number of severe/major bug reports on RELENG_8 keep coming in, and that
scares me greatly.





There is also this:

http://www.freebsd.org/cgi/query-pr.cgi?pr=17

Which I filed a while back that shows a bug in at least stable/7 that does 
not unshare/remove shared filesystems from /etc/zfs/exports.


PJD has taken this PR and asked for a followup if this can be confirmed on 
a 8.X system as he believes it is fixed there.


If someone of this thread is running a 8.X system would you please 
followup to this PR with YES/NO it exists or not, and it would be greatly 
appreciated.


I believe this also has a part of sending HUP to mountd but I could not 
test that either on stable/7 or stable/8.


--

 jhell

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: Does zfs have it's own nfs server?

2010-03-19 Thread Willem Jan Withagen

On 17-3-2010 9:27, Matthias Gamsjager wrote:

sharenfs does work in freebsd but iscsi does not. I'm not sure about smb.

about nfs: you should take a look at /etc/zfs/exports



On Wed, Mar 17, 2010 at 9:15 AM, Harald Schmalzbauer
h.schmalzba...@omnilan.de  wrote:

Hello,

I observed some very strange filesystem security problems.
Now I found that if I set sharenfs=yes data/pub I can mount_nfs but it
does't respect any settings in /etc/exports. Also I get very strange uid
numbers when writing.
If I turn sharenfs off, limitations in /etc/exports work as expected.
I thought sharenfs and sharesmb are only working on OpenSolaris. What about
shareiscsi?


I do not use /etc/exports for zfs shares
But instead of yes as value, you can use the NFS-options as string and 
that gets it into /etc/zfs/exports.


--WjW
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: Does zfs have it's own nfs server?

2010-03-19 Thread Charles Sprickman

On Fri, 19 Mar 2010, Willem Jan Withagen wrote:


On 17-3-2010 9:27, Matthias Gamsjager wrote:

sharenfs does work in freebsd but iscsi does not. I'm not sure about smb.

about nfs: you should take a look at /etc/zfs/exports



On Wed, Mar 17, 2010 at 9:15 AM, Harald Schmalzbauer
h.schmalzba...@omnilan.de  wrote:

Hello,

I observed some very strange filesystem security problems.
Now I found that if I set sharenfs=yes data/pub I can mount_nfs but it
does't respect any settings in /etc/exports. Also I get very strange uid
numbers when writing.
If I turn sharenfs off, limitations in /etc/exports work as expected.
I thought sharenfs and sharesmb are only working on OpenSolaris. What 
about

shareiscsi?


I do not use /etc/exports for zfs shares
But instead of yes as value, you can use the NFS-options as string and that 
gets it into /etc/zfs/exports.


Just wondering, is this using the base nfsd/mountd, or is there some 
in-kernel nfs code strictly for zfs?  I haven't found much info on the 
share* options in the manpage or wiki.


Could you give an example of passing options that would say, limit to a 
subnet and map root to root using the zfs sharenfs command?


Thanks,

Charles


--WjW
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: Does zfs have it's own nfs server?

2010-03-19 Thread Jeremy Chadwick
On Fri, Mar 19, 2010 at 07:50:24PM -0400, Charles Sprickman wrote:
 On Fri, 19 Mar 2010, Willem Jan Withagen wrote:
 
 On 17-3-2010 9:27, Matthias Gamsjager wrote:
 sharenfs does work in freebsd but iscsi does not. I'm not sure about smb.
 
 about nfs: you should take a look at /etc/zfs/exports
 
 
 
 On Wed, Mar 17, 2010 at 9:15 AM, Harald Schmalzbauer
 h.schmalzba...@omnilan.de  wrote:
 Hello,
 
 I observed some very strange filesystem security problems.
 Now I found that if I set sharenfs=yes data/pub I can mount_nfs but it
 does't respect any settings in /etc/exports. Also I get very strange uid
 numbers when writing.
 If I turn sharenfs off, limitations in /etc/exports work as expected.
 I thought sharenfs and sharesmb are only working on
 OpenSolaris. What about
 shareiscsi?
 
 I do not use /etc/exports for zfs shares
 But instead of yes as value, you can use the NFS-options as string
 and that gets it into /etc/zfs/exports.
 
 Just wondering, is this using the base nfsd/mountd, or is there some
 in-kernel nfs code strictly for zfs?  I haven't found much info on
 the share* options in the manpage or wiki.

ZFS on FreeBSD's sharenfs option does nothing more than manage data in
a flat file (/etc/zfs/exports) and automatically send a SIGHUP to
mountd's pid (based on reading the contents of the file
_PATH_MOUNTDPID).  If you grep through /usr/src/cddl you can see what
I'm referring to.

So how does mountd know about /etc/zfs/exports?

$ ps -auxw | grep mount
root  861  0.0  0.0  6836  1716  ??  Is   10Mar10   0:00.00 
/usr/sbin/mountd -r -l /etc/exports /etc/zfs/exports

This is defined/referenced in /etc/rc.d/mountd.

All that said:

I avoid use of the sharenfs option in ZFS on RELENG_7 and RELENG_8, as
I found certain quirks/behavioural oddities (such as mountd not picking
up changes, or claims of not exporting something which visually
confirmed should have been exported -- and in one case, mounting of a
ZFS-exported NFS filesystem worked but then any I/O would block on the
client indefinitely.  Don't ask me how/why that happened).  Possibly
these were bugs that existed during ZFS's transitional phase between 7.x
and 8.x, but the unreliable nature of the situation left a bad taste in
my mouth.  The workaround:

Using /etc/exports to reference the local ZFS filesystems I want
exported, HUP mountd, done.  Above oddities/quirks no longer happened.
And there's an added bonus: all your exports are therefore kept in one
single place: a text file that's existed since what, 1989 or so?

Of course, the advantage is that with ZFS properties you can inherit
options -- that might be useful to some, but not to me.

There's also known quirks/issues with the parsing logic with sharenfs.
This was discussed in December 2009.

 Could you give an example of passing options that would say, limit
 to a subnet and map root to root using the zfs sharenfs command?

zfs create pool/fs
zfs set sharenfs=-maproot=blah -network x.x.x.x -mask y.y.y.y pool/fs

Right now I'm more or less avoiding NFS as much as possible, as the
number of severe/major bug reports on RELENG_8 keep coming in, and that
scares me greatly.

-- 
| Jeremy Chadwick   j...@parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Does zfs have it's own nfs server?

2010-03-17 Thread Harald Schmalzbauer

Hello,

I observed some very strange filesystem security problems.
Now I found that if I set sharenfs=yes data/pub I can mount_nfs but it 
does't respect any settings in /etc/exports. Also I get very strange uid 
numbers when writing.

If I turn sharenfs off, limitations in /etc/exports work as expected.
I thought sharenfs and sharesmb are only working on OpenSolaris. What 
about shareiscsi?


Thanks,

-Harry



signature.asc
Description: OpenPGP digital signature


Re: Does zfs have it's own nfs server?

2010-03-17 Thread Matthias Gamsjager
sharenfs does work in freebsd but iscsi does not. I'm not sure about smb.

about nfs: you should take a look at /etc/zfs/exports



On Wed, Mar 17, 2010 at 9:15 AM, Harald Schmalzbauer
h.schmalzba...@omnilan.de wrote:
 Hello,

 I observed some very strange filesystem security problems.
 Now I found that if I set sharenfs=yes data/pub I can mount_nfs but it
 does't respect any settings in /etc/exports. Also I get very strange uid
 numbers when writing.
 If I turn sharenfs off, limitations in /etc/exports work as expected.
 I thought sharenfs and sharesmb are only working on OpenSolaris. What about
 shareiscsi?

 Thanks,

 -Harry


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: Does zfs have it's own nfs server?

2010-03-17 Thread Svein Skogen (Listmail Account)
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 17.03.2010 09:27, Matthias Gamsjager wrote:
 sharenfs does work in freebsd but iscsi does not. I'm not sure about smb.

shareiscsi no longer works in Opensolaris either. The legacy iscsitgtd
has been replaced with the COMSTAR stack, giving a lot of new features,
along them the splendid sysadminfriendliness of having to handle GUIDs
on cli. ;)

//Svein

- -- 
- +---+---
  /\   |Svein Skogen   | sv...@d80.iso100.no
  \ /   |Solberg Østli 9| PGP Key:  0xE5E76831
   X|2020 Skedsmokorset | sv...@jernhuset.no
  / \   |Norway | PGP Key:  0xCE96CE13
|   | sv...@stillbilde.net
 ascii  |   | PGP Key:  0x58CD33B6
 ribbon |System Admin   | svein-listm...@stillbilde.net
Campaign|stillbilde.net | PGP Key:  0x22D494A4
+---+---
|msn messenger: | Mobile Phone: +47 907 03 575
|sv...@jernhuset.no | RIPE handle:SS16503-RIPE
- +---+---
 If you really are in a hurry, mail me at
   svein-mob...@stillbilde.net
 This mailbox goes directly to my cellphone and is checked
even when I'm not in front of my computer.
- 
 Picture Gallery:
  https://gallery.stillbilde.net/v/svein/
- 
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuglOsACgkQODUnwSLUlKTO2QCeKt4QnRRRuKczVBSrH2chG7mX
gy0AoKhO0V0WZdkZ/kRSCaBcDuEvKC2T
=fqHn
-END PGP SIGNATURE-
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org