Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 03 Dec 1999 17:42:13 -0500 (EST)
From:      "Alexander N. Kabaev" <ak03@gte.com>
To:        Martin Blapp <mb@imp.ch>
Cc:        freebsd-current@freebsd.org
Subject:   re: rpc.umntall does not work with AIX [LONG]
Message-ID:  <XFMail.991203174213.ak03@gte.com>
In-Reply-To: <Pine.SGI.4.10.9912021147370.24612-100000@mephisto.imp.ch>

next in thread | previous in thread | raw e-mail | index | archive | help
Well, it seems like RPCMNT_UMNTALL call always fails with RPC_SYSTEMERROR on
all systems except FreeBSD. I tested HP/UX, AIX and Solaris boxes - they all
behave identically as follows:

rpc.umntall -h $HOST always fails
rpc.umntall -h $HOST -p $DIR - works just fine since it is using RPCMNT_UMOUNT
umount $HOST:$DIR works just fine

Interesting, even if RPC_UMNTALL call returns error code, it nonetheless
causes mount entry to be removed from the server, i.e. showmount -a $HOST
output does not report my client machine as having any mounts on $HOST anymore.

All entries in my /var/db/mounttab appear to be correct, I do not think they
are causing the problem. 

Also, I have questions regarding the following code fragment from the
rpc.umntall.c file:

1)                 for (mtab = mtabhead; mtab != NULL; mtab = mtab->next) {
2)                         if (*mtab->mtab_host != '\0' &&
3)                             (do_umntall(mtab->mtab_host) ||
4)                             mtab->mtab_time <= (time(now) - expire))) {
5)                                 if (keep && is_mounted(mtab->mtab_host,
6)                                     mtab->mtab_dirp)) {
7)                                         if (verbose) {
8)                                                 warnx("skipping entry %s:%s",
9)                                                     mtab->mtab_host,
10)                                                    mtab->mtab_dirp);
11)                                        }
12)                                } else
13)                                        clean_mtab(mtab->mtab_host, NULL);
14)                        }
15)                }

It seems like it does RPCMNT_UMNTALL call for each mounttab entry regardless of
the -k parameter passed in the command line, while man page suggests that
it should simply skip entries for currently mounted filesystems.


    -k      Keep entries for existing NFS filesystems. Compare the NFS
             filesystems from the mounttab against the kernel mount list and do
             not send the RPC to existing mount entries. Useful during startup
             of the system. It may be possible that there are already mounted
             NFS filesystems, so calling RPC UMNTALL isn't a good idea. This
             is the case if the user has rebooted to 'single user mode' and
             starts up the system again.

Furthermore, using RPC_UMNTALL in the above loop is probably not a good idea
either because client host may have two different directories mounted from the
same server. If -k flag is specified, you cannot use UMNTALL because it will
remove /var/run/mountdtab entries not only for the mount point left over
from the crash but also for all other mounts some of which may be perfectly 
valid and should be kept intact.

May be, we should use RPCMNT_UMOUNT call instead? It seems to me that
RMCMNT_UMNTALL is only applicable when utility is called with -h option as the
only option.


-Alexander Kabaev



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.991203174213.ak03>