f0b9 zfs sharenfs - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Server & Networking > Web & Network Services

Web & Network Services Discussion related to network/web services such as apache, bind, sendmail, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old March 7th, 2011, 22:19
gettons gettons is offline
Junior Member
 
Join Date: Feb 2011
Posts: 19
Thanks: 2
Thanked 0 Times in 0 Posts
Default zfs sharenfs

Hi all,

I am playing with zfs sharenfs and I came across a problem. Unless I put a single host/network, I don't get any export after showmount -e
I presume because the syntax is not quite right... What I need to do is to export:

Code:
/media 192.168.3.0/24 192.168.4.3 192.168.4.21
So not just a network, but also some other hosts. Is it possible to do this with zfs feature? What I tried is the following:

Code:
zfs set sharenfs="-network=192.168.3.0,-mask=255.255.255.0,-alldirs,192.168.4.2" stuff/installs
But it doesn't like it.

Last edited by DutchDaemon; March 8th, 2011 at 02:23. Reason: Formatting & Style: http://forums.freebsd.org/showthread.php?t=8816 / http://forums.freebsd.org/showthread.php?t=18043
Reply With Quote
  #2  
Old March 7th, 2011, 23:01
thuglife's Avatar
thuglife thuglife is offline
Member
 
Join Date: Jul 2009
Location: Athens, Greece
Posts: 159
Thanks: 4
Thanked 40 Times in 25 Posts
Default

You don't need commas. Try the following:

Code:
zfs set sharenfs="-alldirs -network=192.168.3.0/24 192.168.4.2" stuff/installs
Reply With Quote
  #3  
Old March 7th, 2011, 23:48
gettons gettons is offline
Junior Member
 
Join Date: Feb 2011
Posts: 19
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Didn't work either :-(

Last edited by DutchDaemon; March 8th, 2011 at 02:24.
Reply With Quote
  #4  
Old March 8th, 2011, 00:05
thuglife's Avatar
thuglife thuglife is offline
Member
 
Join Date: Jul 2009
Location: Athens, Greece
Posts: 159
Thanks: 4
Thanked 40 Times in 25 Posts
Default

Ok, it doesn't work because it's invalid export syntax.

Code:
zfs set sharenfs="-alldirs -network=192.168.3.0/24" stuff/installs
This works for me, but I don't know how you are going to handle the single host. Nevertheless this has nothing to do with the sharenfs property per se, we need someone with more experience in the syntax.

Last edited by DutchDaemon; March 8th, 2011 at 02:24.
Reply With Quote
  #5  
Old March 8th, 2011, 00:10
ian-nai ian-nai is offline
Junior Member
 
Join Date: Jan 2011
Posts: 49
Thanks: 29
Thanked 4 Times in 3 Posts
Default

Hmm, the man page doesn't list a "=" sign in the network spec. If I understand the sharenfs property, whatever syntax /etc/exports handles should work in zfs set sharenfs="..." on a "per line" basis.

Quote:
Originally Posted by man exports
/u2 -maproot=root friends
/u2 -alldirs -network cis-net -mask cis-mask
Looks like in /etc/exports you would create two lines. One specifying the range of addresses to export to and another line to specify any singular hosts. Try issuing two, separate zfs set sharenfs="..." commands.

Last edited by DutchDaemon; March 8th, 2011 at 02:25. Reason: change quote
Reply With Quote
  #6  
Old March 8th, 2011, 00:18
phoenix's Avatar
phoenix phoenix is offline
Moderator
 
Join Date: Nov 2008
Location: Kamloops, BC, Canada
Posts: 3,144
Thanks: 43
Thanked 703 Times in 579 Posts
Default

sharenfs only works for the "simple" case, as it only holds a single line of text, and thus, only generates a single line in the /etc/zfs/exports file.

If you want to do anything involving more than 1 line of text in an exports(5) file, then you need to do it manually via /etc/exports
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
  #7  
Old March 8th, 2011, 01:43
gettons gettons is offline
Junior Member
 
Join Date: Feb 2011
Posts: 19
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by phoenix View Post
sharenfs only works for the "simple" case, as it only holds a single line of text, and thus, only generates a single line in the /etc/zfs/exports file.

If you want to do anything involving more than 1 line of text in an exports(5) file, then you need to do it manually via /etc/exports
This makes sense.
Unfortunately if you run zfs set .... onlyt the last one would be valid.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
zfs waits for [zio->io_cv] or [zfs] ers General 12 February 18th, 2011 20:28
Help with zfs sharenfs and NFSv4 sim Web & Network Services 3 February 11th, 2011 17:54
Cloned ZFS drive won't boot (zfs send & recv) sim General 6 February 9th, 2011 16:27
ZFS (V15): zfs userspace -> Operation not supported interfasys General 0 August 18th, 2010 02:00
[ZFS] Combine striping and ZFS to use pools more efficient bugboy General 3 February 6th, 2010 00:46


All times are GMT +1. The time now is 22:52.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0