Hi, I have a freebsd box (6-stable) which export its root slice to NFS. The exports file is: / -alldirs -maproot=root -network 10.0.0 -mask 255.255.255.0 After making world & kernel today, the nfs client said that permission denied. But another freebsd box (making world & kernel today, too) exports its /home slice, and the nfs client did complain about it. Therefore, I try to copy the mountd binary file from another stable (9/30) to the broken nfs server, and it works. Any suggestions?
Hi, On Sun, Oct 15, 2006 at 11:11:44PM +0800, Lin Jui-Nan Eric wrote:> Hi, > > I have a freebsd box (6-stable) which export its root slice to NFS. The > exports file is: > > / -alldirs -maproot=root -network 10.0.0 -mask 255.255.255.0 > > After making world & kernel today, the nfs client said that permission > denied. > But another freebsd box (making world & kernel today, too) exports its /home > slice, and the nfs client did complain about it. > > Therefore, I try to copy the mountd binary file from another stable (9/30) > to the broken nfs server, and it works.Hmm, I recently changed something which might trigger this. Could you back out revision 1.81.2.5 of src/usr.sbin/mountd/mountd.c and let me know whether this fixed the problem? Regards, -- Rink P.W. Springer - http://rink.nu "Patience is for those who cannot afford decent hardware." - Peter Koeleman
Hi, If I revert to revision 1.81.2.4, it worked correctly. On 10/15/06, Rink Springer <rink@freebsd.org> wrote:> Hi, > > Hmm, I recently changed something which might trigger this. Could you > back out revision 1.81.2.5 of src/usr.sbin/mountd/mountd.c and let me > know whether this fixed the problem? >
On 10/15/06, Lin Jui-Nan Eric <ericlin.jnlin@gmail.com> wrote:> Hi, > But another freebsd box (making world & kernel today, too) exports its /home > slice, and the nfs client did complain about it.Sorry, should be "did not complain".
Hi, On Sun, Oct 15, 2006 at 11:30:23PM +0800, Lin Jui-Nan Eric wrote:> Hi, > > If I revert to revision 1.81.2.4, it worked correctly. > > On 10/15/06, Rink Springer <rink@freebsd.org> wrote: > >Hi, > > > >Hmm, I recently changed something which might trigger this. Could you > >back out revision 1.81.2.5 of src/usr.sbin/mountd/mountd.c and let me > >know whether this fixed the problem? > >OK, could you try the attached patch (untested) and let me know whether it works? (it patches the 1.81.2.5 revision of mountd.c) -- Rink P.W. Springer - http://rink.nu "Patience is for those who cannot afford decent hardware." - Peter Koeleman -------------- next part -------------- --- mountd.c.org Thu Sep 21 10:07:57 2006 +++ mountd.c Thu Sep 21 10:08:42 2006 @@ -1912,7 +1912,7 @@ iov[5].iov_base = fsb->f_mntfromname; /* "from" */ iov[5].iov_len = strlen(fsb->f_mntfromname) + 1; - while (nmount(iov, iovlen, fsb->f_flags) < 0) { + while (nmount(iov, iovlen, fsb->f_flags | MNT_UPDATE) < 0) { if (cp) *cp-- = savedc; else
Hi, On 10/15/06, Rink Springer <rink@freebsd.org> wrote:> Hi, > > OK, could you try the attached patch (untested) and let me know whether > it works? (it patches the 1.81.2.5 revision of mountd.c)No, it does not work.
[Second attempt to send this, since my first seems to have been eaten by my ISP. Apologies if it appears twice.] On Sun, Oct 15, 2006 at 05:40:22PM +0200, Rink Springer wrote:> Hi, > > On Sun, Oct 15, 2006 at 11:30:23PM +0800, Lin Jui-Nan Eric wrote: > > Hi, > > > > If I revert to revision 1.81.2.4, it worked correctly. > > > > On 10/15/06, Rink Springer <rink@freebsd.org> wrote: > > >Hi, > > > > > >Hmm, I recently changed something which might trigger this. Could you > > >back out revision 1.81.2.5 of src/usr.sbin/mountd/mountd.c and let me > > >know whether this fixed the problem? > > > > > OK, could you try the attached patch (untested) and let me know whether > it works? (it patches the 1.81.2.5 revision of mountd.c)I had the same problems, but only when trying to export directories from the root filesystem. Your patch below would not help. The following patch (very much inspired by the comment on line 1038 in mountd.c) makes things work for me: Index: mountd.c ==================================================================RCS file: /ncvs/src/usr.sbin/mountd/mountd.c,v retrieving revision 1.81.2.5 diff -u -r1.81.2.5 mountd.c --- mountd.c 14 Oct 2006 23:04:07 -0000 1.81.2.5 +++ mountd.c 15 Oct 2006 21:09:20 -0000 @@ -1911,7 +1911,7 @@ iov[5].iov_base = fsb->f_mntfromname; /* "from" */ iov[5].iov_len = strlen(fsb->f_mntfromname) + 1; - while (nmount(iov, iovlen, fsb->f_flags) < 0) { + while (nmount(iov, iovlen, fsb->f_flags & ~MNT_ROOTFS) < 0) { if (cp) *cp-- = savedc; else> --- mountd.c.org Thu Sep 21 10:07:57 2006 > +++ mountd.c Thu Sep 21 10:08:42 2006 > @@ -1912,7 +1912,7 @@ > iov[5].iov_base = fsb->f_mntfromname; /* "from" */ > iov[5].iov_len = strlen(fsb->f_mntfromname) + 1; > > - while (nmount(iov, iovlen, fsb->f_flags) < 0) { > + while (nmount(iov, iovlen, fsb->f_flags | MNT_UPDATE) < 0) { > if (cp) > *cp-- = savedc; > else-- <Insert your favourite quote here.> Erik Trulsson ertr1013@student.uu.se
Hi, On 10/16/06, Erik Trulsson <ertr1013@student.uu.se> wrote:> > I had the same problems, but only when trying to export directories from > the root filesystem. Your patch below would not help. > The following patch (very much inspired by the comment on line 1038 in > mountd.c) makes things work for me: > > Index: mountd.cThis patch works for me too. Thank you the nice guys!