Bug 909 - exports: Bad lines. mountd won't export FS
Summary: exports: Bad lines. mountd won't export FS
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 2.1-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1995-12-22 20:20 UTC by Jin Guojun
Modified: 1995-12-23 11:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jin Guojun 1995-12-22 20:20:01 UTC
	There is no way to export two (2) subdirectories on a same
	files system.
	-----------------------------------------------------------------
	This is working when /usr/other is on /usr, and /usr/local is
	on a different file system:
# more /etc/fstab
/dev/wd0s2b              none            swap    sw 0 0
/dev/wd0a                /               ufs     rw 1 1
/dev/wd0s2e              /usr            ufs     rw 1 1
/dev/wd0s3e              /usr/local      ufs     rw 1 1
# more /etc/exports
/usr/local -ro -mapall=nobody:100 -network xxxx.yyyy.zzzz -mask a.b.c.d
/usr/other -ro -mapall=nobody:100 -network xxxx.yyyy.zzzz -mask a.b.c.d

	-----------------------------------------------------------------
	This is not working:
# more /etc/fstab
/dev/wd0s2b              none            swap    sw 0 0
/dev/wd0a                /               ufs     rw 1 1
/dev/wd0s2e              /usr            ufs     rw 1 1
# more /etc/exports
/usr/other -ro -mapall=nobody:100 -network xxxx.yyyy.zzzz -mask a.b.c.d
/usr/local -ro -mapall=nobody:100 -network xxxx.yyyy.zzzz -mask a.b.c.d

Dec 22 05:56:17 myname mountd[76]: Can't change attributes for /usr/local. 
Dec 22 05:56:17 myname mountd[76]: Bad exports list line /usr/local -ro -mapall
Dec 22 05:56:17 myname mountd[76]: Bad exports list line /usr/local -ro -mapall

	If changing the /etc/exports to
/usr -ro -mapall=nobody:100 -network xxxx.yyyy.zzzz -mask a.b.c.d
	then the clients can only mount entire /usr, but not /usr/local and
	/usr/other.
	-----------------------------------------------------------------

Fix: 

I hope this can be fixed. If this problem is the original
	design for the kernel and won't be resolved, please let me know.
	Thanks.
How-To-Repeat: 
	This can be repeated following above description.
Comment 1 Joerg Wunsch 1995-12-23 09:36:14 UTC
As Jin Guojun[ITG] wrote:
> 
> 	There is no way to export two (2) subdirectories on a same
> 	files system.

> /usr/other -ro -mapall=nobody:100 -network xxxx.yyyy.zzzz -mask a.b.c.d
> /usr/local -ro -mapall=nobody:100 -network xxxx.yyyy.zzzz -mask a.b.c.d
> 
> Dec 22 05:56:17 myname mountd[76]: Can't change attributes for /usr/local. 
> Dec 22 05:56:17 myname mountd[76]: Bad exports list line /usr/local -ro -mapall
> Dec 22 05:56:17 myname mountd[76]: Bad exports list line /usr/local -ro -mapall

Please, read the man page for exports(5).

By the nature of how NFS exporting works, you can have only one set of
attributes per physical file system.  Our exports enforces this by
only allowing multiple subdirectories of a single physical file system
if they appear in the same line:

/usr/other /usr/local -ro -mapall=nobody:100 -network xxxx.yyyy.zzzz -mask a.b.c.d
-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)
Comment 2 Joerg Wunsch freebsd_committer freebsd_triage 1995-12-23 11:54:51 UTC
State Changed
From-To: open->closed

Pilot error.  The behaviour is described in the man page of 
exports(5).