LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 05-24-2011, 09:41 AM   #1
brianmcgee
Member
 
Registered: Jun 2007
Location: Munich, Germany
Distribution: RHEL, CentOS, Fedora, SLES (...)
Posts: 399

Rep: Reputation: 40
no_root_squash zfs nfs export


How may I export a zfs volume with no_root_squash option on freebsd?
 
Old 05-24-2011, 10:17 AM   #2
vermaden
Member
 
Registered: Jan 2006
Location: pl_PL.lodz
Distribution: FreeBSD
Posts: 406

Rep: Reputation: 89
Assuming that Your ZFS pool is mounted under /zpool for example like that:

/etc/exports
Code:
/zpool -maproot=0:0 -network 10.0.0 -mask 255.255.255.0
/etc/rc.conf
Code:
nfs_server_enable=YES
mountd_enable=YES
mountd_flags="-r"
rpcbind_enable=YES
rpc_lockd_enable=YES
rpc_statd_enable=YES
 
1 members found this post helpful.
Old 05-24-2011, 12:45 PM   #3
brianmcgee
Member
 
Registered: Jun 2007
Location: Munich, Germany
Distribution: RHEL, CentOS, Fedora, SLES (...)
Posts: 399

Original Poster
Rep: Reputation: 40
Thank you very much. That were exactly the options I searched for.

However I am using

Code:
# zfs sharenfs="-maproot..." tank/foo
to export the filesystem via nfs.

Btw. After I get to know the -maproot... option, I've found it in the man page of exportfs. I searched only the man pages of the zfs command set...
 
Old 05-24-2011, 02:11 PM   #4
vermaden
Member
 
Registered: Jan 2006
Location: pl_PL.lodz
Distribution: FreeBSD
Posts: 406

Rep: Reputation: 89
Welcome mate.

Quote:
Originally Posted by brianmcgee View Post
However I am using

Code:
# zfs sharenfs="-maproot..." tank/foo
to export the filesystem via nfs.
The zfs sharenfs ... command does exacly the same but the 'exports' are kept in /etc/zfs/exports instead of /etc/exports file.

Code:
# zfs sharenfs="-maproot=0:0" storage/test

# cat /etc/zfs/exports
# !!! DO NOT EDIT THIS FILE MANUALLY !!!

/test   -maproot=0:0
Quote:
Originally Posted by brianmcgee View Post
Btw. After I get to know the -maproot... option, I've found it in the man page of exportfs. I searched only the man pages of the zfs command set...
You mean the man exports page?
 
Old 05-24-2011, 11:47 PM   #5
brianmcgee
Member
 
Registered: Jun 2007
Location: Munich, Germany
Distribution: RHEL, CentOS, Fedora, SLES (...)
Posts: 399

Original Poster
Rep: Reputation: 40
Yeah. I mean the man exports.

Thank you very much for your insight! I greatly appreciate your help!

After I have the solution to a problem I always want to find out how I would get the info from man pages or docs so that next time I know where to search for it.
 
Old 05-25-2011, 05:33 AM   #6
vermaden
Member
 
Registered: Jan 2006
Location: pl_PL.lodz
Distribution: FreeBSD
Posts: 406

Rep: Reputation: 89
Welcome mate, feel free to ask anytime.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
xfs, inode64, NFS export, no_subtree_check and "Stale NFS file handle" message mcacciagrano Red Hat 1 01-16-2011 03:25 PM
export NFS mounted file system via NFS smkamene Linux - Networking 3 02-10-2009 03:12 PM
Cannot share via NFS a ZFS filesystem crisostomo_enrico Solaris / OpenSolaris 1 11-23-2007 02:55 PM
Export NFS Frunktz Linux - Networking 5 02-20-2006 09:34 PM
Export directories via NFS nifflerX Linux - Networking 3 07-07-2005 01:21 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 10:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration