mountd not liking /etc/exports in 2.8, 3.0

mountd not liking /etc/exports in 2.8, 3.0

Post by J. D. Vern » Thu, 11 Apr 2002 04:38:11



Greetings,

I know this has been posted before, but I have not seen a conclusive answer
to this mountd problem I, and others, have reported.

Here's the details: mountd is failing to export a filesystem properly.  It
will complain about one or more exports, but still export it.  Trying to
mount this export can take forever, and the -maproot or -mapall options will
be essentially ignored, and behave as if there were no such settings applied
to the export.  Same behaviour on OBSD 2.8 and 3.0 (I just upgraded).

The problem appears to be if you have more than one line in your
/etc/exports.  It looks like the first one on a partition wins.

Here's my /etc/exports:

# public share
/export/public -mapall=nobody:users -network=10.0.0

# www docroot
# the syntax for -network is unclear from the man pages, but I've tried both
ways
# I've also tried exporting to particular hosts, but it just complains about
all of them, in order
/var/www -mapall=www:www -network=10.0.0
# END

Kicking mountd prompts it to report the following in /var/log/messages:

[...]
Apr  9 15:30:01 martini mountd[3966]: Can't change attributes for /var/www
(10.0.0.0).
Apr  9 15:30:01 martini mountd[3966]: Bad exports list entry (10.0.0.0) in
line /var/www -mapall
[...]

Commenting out one line or the other appears to export the other one fine.
If I swap the order of the lines, mountd complains about the second one.
It's almost like it's complaining that I'm reexporting the same directory,
but I'm not.  I *do* have these shared out via SMB (for easier access to the
few Windows boxes left on my network).  Is this a problem?  Both of these
directories are on the same filesystem -- everything is on the same 2Gb
partition, other than swap.

Anyone spare a clue?

jdv

 
 
 

mountd not liking /etc/exports in 2.8, 3.0

Post by Ted » Thu, 11 Apr 2002 05:05:47



Quote:> few Windows boxes left on my network).  Is this a problem?  Both of these
> directories are on the same filesystem -- everything is on the same 2Gb
> partition, other than swap.

That's the problem.  You should make them separate partitions.  You can't
have lines for /export and /var/www if they are both on the same
filesystem.

In short, you want to make your NFS exports separate mountpoints on the
server.

--
If you ever would give them a helping hand,
You can be sure they'll chop off the arm.
Never, ever, never trust a Klingon; you will always regret it.

 
 
 

mountd not liking /etc/exports in 2.8, 3.0

Post by clvrmn » Thu, 11 Apr 2002 11:06:17




> > few Windows boxes left on my network).  Is this a problem?  Both of these
> > directories are on the same filesystem -- everything is on the same 2Gb
> > partition, other than swap.

> That's the problem.  You should make them separate partitions.  You can't
> have lines for /export and /var/www if they are both on the same
> filesystem.

> In short, you want to make your NFS exports separate mountpoints on the
> server.

I guess this is what the BUGS section in the man page for exports is
going on about.  This certainly seems like bug.  What other systems
have this restriction?

It's not possible to add another mountpoint without repartitioning
(not likely) or adding another disk (less likely); I guess I either
have to export with the same options, which kind of defeats the
purpose of having different exports.

jdv

 
 
 

mountd not liking /etc/exports in 2.8, 3.0

Post by Ted » Thu, 11 Apr 2002 12:06:31



Quote:> I guess this is what the BUGS section in the man page for exports is
> going on about.  This certainly seems like bug.  What other systems
> have this restriction?

Not sure.  There is an example in the manpage for exports that contains
several exports of the same filesystem.  However, the semantics are
slightly different, and the mountpoints must be the same at the "top
level".  I'm not entirely sure how to explain this, as I don't have a real
good grasp on it myself.

Quote:> It's not possible to add another mountpoint without repartitioning
> (not likely) or adding another disk (less likely); I guess I either
> have to export with the same options, which kind of defeats the
> purpose of having different exports.

You can export with different options to different hosts, but you have to
export / to both hosts, or some common hierarchy.

The alternative, which I have not tried, is to create more mountpoints.
There are two approaches.  You could use mount_null and export the newly
"created" filesystems.  If that doesn't work, you might want to try
vnconfig.  Create a large file, and using vnconfig, newfs and move the
data inside.  That file can be mounted as a genuine filesystem and
exported.

Disclaimer:  I rarely use NFS, and am by no means an expert.

--
If you ever would give them a helping hand,
You can be sure they'll chop off the arm.
Never, ever, never trust a Klingon; you will always regret it.

 
 
 

1. Problems with mountd using netgroups in /etc/exports

Hi all!

I am using netgroups in my /etc/exports for a long time with mountd
2.2beta16 and it works fine. I just updated one of our PC with the
current SuSe 5.0 distribution which is using mountd 2.2beta25.
The effect is that the mountd responds to showmount with the
netgroup form the exports file, but if I try to mount a filesystem,
I get a permission denied. The message log says

Aug  5 09:54:36 polyphem mountd[84]: Unauthorized access by NFS client 129.70.127.16.
Aug  5 09:54:36 polyphem mountd[84]: Blocked attempt of 129.70.127.16 to mount /volumes/sda4

The ypserv is version 1.2.1, The netgroups work with 2.2beta16 and in
/etc/passwd as well. I already tried 2.2beta26 and 27 but with the
same effect.

Has anybody a newer mountd running using netgroups in /etc/exports
successfully?

Please respond by email since I often miss some articles from this
group.

        Nils
                              ,,,
                             (o o)              
-------------------------oOO--(_)--OOo---------------------
Nils Jungclaus                      University of Bielefeld
phone: +49 521 106-6059                           (Germany)
fax:   +49 521 106-6011                            

-----------------------------------------------------------

--

                              ,,,
                             (o o)              
-------------------------oOO--(_)--OOo---------------------
Nils Jungclaus                      University of Bielefeld
phone: +49 521 106-6059                           (Germany)
fax:   +49 521 106-6011                            

-----------------------------------------------------------

2. xterm -l -lf options not in SCO

3. NFS daemons (nfsd and rpc.mountd): what to do after editing /etc/exports?

4. hostname question

5. PAM: mountd[327]: SECURITY: A user with uid != 0 can write to /etc/exports

6. YES : NO / IS agetty worth it?

7. Is modules-1.2.8 broken w/Slackware 3.0?

8. Euro currency support in Solaris

9. Migrating mail server from 2.8 -> 3.0

10. connectivity problem going from 2.8 to 3.0

11. Stale mount removal under Solaris 2.8 (/etc/mnttab issue)

12. GCC 2.8, Glibc, kernel 2.2, etc

13. Update: Stale mount point issue in Solaris 2.8 (/etc/mnttab issue)