Re: wierdness with mountd
Yes, with the error vs errno fix, I've got the patch up and running on my system. It seems to be doing the trick. Thanks, -john - Ian Dowse's Original Message - > In message <[EMAIL PROTECTED]>, Ian Dowse writes: > >error? (untested patch below). > > I braino'd that patch (error vs. errno), but I have just committed > a working version that should stop the mountd warnings. > > Ian To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: wierdness with mountd
Thanks, Ian! To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: wierdness with mountd
In message <[EMAIL PROTECTED]>, Ian Dowse writes: >error? (untested patch below). I braino'd that patch (error vs. errno), but I have just committed a working version that should stop the mountd warnings. Ian To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: wierdness with mountd
Le 2001-05-28, Matthew Jacob écrivait : > On startup: > May 28 10:16:04 farrago mountd[216]: can't delete exports for / Same here with -CURRENT as of today. -- Thomas Quinot ** Département Informatique & Réseaux ** [EMAIL PROTECTED] ENST // 46 rue Barrault // 75634 PARIS CEDEX 13 To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: wierdness with mountd
In message <[EMAIL PROTECTED]>, John writes: >Looking in /usr/src/sbin/mountd/mountd.c, under line 930 >shows the following: > >num = getmntinfo(&fsp, MNT_NOWAIT); > >and then runs through a loop 'num' times trying to >delete any export for each entry. Thanks, you're right - this has nothing to do with mountdtab or mounttab. The commit that caused these messages to appear is phk's centralisation of the kernel netexport structure: REV:1.149 ffs_vfsops.c2001/04/25 07:07:50 phk Move the netexport structure from the fs-specific mountstructure to struct mount. ... Doing a MNT_DELEXPORT mount used to be a no-op if there were no exports, but now it returns EINVAL. Maybe that should be changed to ENOENT or something, so that mountd can detect it as a 'normal' error? (untested patch below). Ian Index: sys/kern/vfs_export.c === RCS file: /dump/FreeBSD-CVS/src/sys/kern/vfs_export.c,v retrieving revision 1.310 diff -u -r1.310 vfs_export.c --- sys/kern/vfs_export.c 2001/04/26 20:47:14 1.310 +++ sys/kern/vfs_export.c 2001/05/29 09:28:43 @@ -207,7 +207,7 @@ nep = mp->mnt_export; if (argp->ex_flags & MNT_DELEXPORT) { if (nep == NULL) - return (EINVAL); + return (ENOENT); if (mp->mnt_flag & MNT_EXPUBLIC) { vfs_setpublicfs(NULL, NULL, NULL); mp->mnt_flag &= ~MNT_EXPUBLIC; Index: sbin/mountd/mountd.c === RCS file: /dump/FreeBSD-CVS/src/sbin/mountd/mountd.c,v retrieving revision 1.51 diff -u -r1.51 mountd.c --- sbin/mountd/mountd.c2001/05/25 08:14:02 1.51 +++ sbin/mountd/mountd.c2001/05/29 09:31:43 @@ -903,6 +903,7 @@ struct xucred anon; char *cp, *endcp, *dirp, *hst, *usr, *dom, savedc; int len, has_host, exflags, got_nondir, dirplen, num, i, netgrp; + int error; dirp = NULL; dirplen = 0; @@ -949,10 +950,11 @@ !strcmp(fsp->f_fstypename, "cd9660")) { targs.ua.fspec = NULL; targs.ua.export.ex_flags = MNT_DELEXPORT; - if (mount(fsp->f_fstypename, fsp->f_mntonname, - fsp->f_flags | MNT_UPDATE, - (caddr_t)&targs) < 0) - syslog(LOG_ERR, "can't delete exports for %s", + error = mount(fsp->f_fstypename, fsp->f_mntonname, + fsp->f_flags | MNT_UPDATE, (caddr_t)&targs); + if (error && error != ENOENT) + syslog(LOG_ERR, + "can't delete exports for %s: %m", fsp->f_mntonname); } fsp++; To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: wierdness with mountd
- Ian Dowse's Original Message - > In message <[EMAIL PROTECTED]>, John Polstra writes: > >In article <[EMAIL PROTECTED]>, > >Matthew Jacob <[EMAIL PROTECTED]> wrote: > >> May 28 10:21:43 farrago mountd[217]: can't delete exports for /tmp > >> May 28 10:21:43 farrago mountd[217]: can't delete exports for /usr/obj > > > >I've been seeing this too, on a -current system from around May 5. > > This sounds like there are stale entries in /var/db/mountdtab, but > I'm not familiour enough with the purpose of mountdtab to know why > this is happening. I'll look into this further over the next few > days; for now maybe try cleaning out mountdtab manually? > > Ian Hi, Some info... I've looked into a bit previously.. I have no mountdtab file: %find /var -name 'mount*' /var/db/mounttab /var/log/mount.today /var/log/mount.yesterday /var/run/mountd.lock /var/run/mountd.pid What I have mounted, though it is not a part of this issue.. %cat /var/db/mounttab 990745123 snapserv/pub 990745123 snapserv/mirror/ncvs and then reboot the system: /boot/kernel/kernel: May 29 03:37:57 FreeBSD mountd[270]: can't delete exports for / /boot/kernel/kernel: May 29 03:37:57 FreeBSD mountd[270]: can't delete exports for /usr /boot/kernel/kernel: May 29 03:37:57 FreeBSD mountd[270]: can't delete exports for /tmp /boot/kernel/kernel: May 29 03:37:57 FreeBSD mountd[270]: can't delete exports for /var /boot/kernel/kernel: May 29 03:37:57 FreeBSD mountd[270]: can't delete exports for /usr/obj /boot/kernel/kernel: May 29 03:37:57 FreeBSD mountd[270]: can't delete exports for /snap Looking in /usr/src/sbin/mountd/mountd.c, under line 930 shows the following: num = getmntinfo(&fsp, MNT_NOWAIT); and then runs through a loop 'num' times trying to delete any export for each entry. Maybe it should check to see if there is an export before attempting to delete it by using the MNT_EXPORTED request? Note: These MNT_xxx definitions appear to be only partially documented in mount(2). If you kill and restart mountd the logic appears correct. Bringing mountd up on a newly booted system appears to be the oddball case. Hope this helps.. -john To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: wierdness with mountd
In message <[EMAIL PROTECTED]>, John Polstra writes: >In article <[EMAIL PROTECTED]>, >Matthew Jacob <[EMAIL PROTECTED]> wrote: >> May 28 10:21:43 farrago mountd[217]: can't delete exports for /tmp >> May 28 10:21:43 farrago mountd[217]: can't delete exports for /usr/obj > >I've been seeing this too, on a -current system from around May 5. This sounds like there are stale entries in /var/db/mountdtab, but I'm not familiour enough with the purpose of mountdtab to know why this is happening. I'll look into this further over the next few days; for now maybe try cleaning out mountdtab manually? Ian To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: wierdness with mountd
In article <[EMAIL PROTECTED]>, Matthew Jacob <[EMAIL PROTECTED]> wrote: > > Over the last couple of weeks, I've seen wierd statements coming out of > mountd: > > On startup: > > May 28 10:16:04 farrago mountd[216]: can't delete exports for / > > On a mount of /usr/obj: > > May 28 10:21:43 farrago mountd[217]: can't delete exports for /tmp > May 28 10:21:43 farrago mountd[217]: can't delete exports for /usr/obj I've been seeing this too, on a -current system from around May 5. John To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
wierdness with mountd
Over the last couple of weeks, I've seen wierd statements coming out of mountd: On startup: May 28 10:16:04 farrago mountd[216]: can't delete exports for / On a mount of /usr/obj: May 28 10:21:43 farrago mountd[217]: can't delete exports for /tmp May 28 10:21:43 farrago mountd[217]: can't delete exports for /usr/obj Here's my exports file: /space/compiles/tstsys farrago Say what? Can anyone say what's ailing mountd here? My systems is a mergemaster'd build/installworld from a couple of days ago. -matt Here's my fstab: /dev/da0a / ufs rw 1 1 /dev/da0b noneswapsw 0 0 /dev/ad0a /altrootufs rw,noauto 0 0 proc/proc procfs rw 0 0 blade:/storage0/home/home nfs rw 0 0 beppo:/usr/ports/usr/ports nfs rw 0 0 beppo:/space/freebsd/FreeBSD-current/sys /tstsysnfs rw 0 0 farrago:/space/compiles/tstsys /tstsys/compile nfs rw,noauto 0 0 beppo:/space/freebsd/ncvs /home/ncvs nfs rw,noauto 0 0 and tmp and /tstsys/compile are devices created/mounted in rc.local: mount /home/ncvs mount /tstsys/compile #mount /tstsys/modules # mdconfig -a -t swap -s 128M -u 10 disklabel -r -w md10 auto newfs -f `sysctl -n hw.pagesize` /dev/md10c #tunefs -n enable /dev/md10c mount /dev/md10c /tmp chmod 1777 /tmp To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message