Bug 109911 - mountd(8) does not accept identical host sets on different mount entries on the same file system
Summary: mountd(8) does not accept identical host sets on different mount entries on t...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 5.5-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-05 10:40 UTC by Antuan Avdioukhine
Modified: 2017-12-31 22:36 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 Antuan Avdioukhine 2007-03-05 10:40:03 UTC
If /etc/exports contains mount entries, belongs to one file system and
exported for identical host sets mountd(8) produces an error "can't
change attributes for <mountpoint path>" and "bad export line <mountpoint
path>" for each mount entry excluding first one. This is happens whether
different mount options was used or not.

Fix: 

Workaround:

For host sets specified with network-mask pair it is possible to split
network using longer masks, eg.

/tmp/u1 -network 10.0.0.0 -mask 255.255.255.0
/tmp/u2 -network 10.0.0.0 -mask 255.255.255.128
/tmp/u2 -network 10.0.0.128 -mask 255.255.255.128

I don't know suitable workaround for host sets specified with host lists.
How-To-Repeat: 1. Create two directories for mount points on the same file system, eg:
   /tmp/u1 and /tmp/u2, check that this directories are suitable for
   export (eg. have proper permissions) and no other filesystems mounted
   on this directories.

2. Start NFS server as usual. Check that syslog catches daemon facility
   at notice level or lower. mountd started with flags: -l -r -n

3. create /etc/exports file entries:     
    
/tmp/u1 10.0.0.1
/tmp/u2 10.0.0.1

4. run 'kill -1 `head -1 /var/run/montd.pid`'

5. Check log for mountd reporting. It is expected to see messages:
Mar  5 13:02:35 tyger mountd[50813]: can't change attributes for /tmp/u2
Mar  5 13:02:35 tyger mountd[50813]: bad exports list line /tmp/u2 10.0.0.1

You may also change host sets from single host to list of hosts or
networks, with the only condition: if you are using networks, all
networks must be with identical addreses and masks.
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:37 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped