From owner-freebsd-current Fri Dec 3 14:43:50 1999 Delivered-To: freebsd-current@freebsd.org Received: from [132.197.97.45] (h132-197-97-45.gte.com [132.197.97.45]) by hub.freebsd.org (Postfix) with ESMTP id AAA8114A16 for ; Fri, 3 Dec 1999 14:43:46 -0800 (PST) (envelope-from ak03@gte.com) Received: (from ak03@localhost) by [132.197.97.45] (8.9.3/8.9.3) id RAA69023; Fri, 3 Dec 1999 17:42:19 -0500 (EST) (envelope-from ak03) Message-ID: X-Mailer: XFMail 1.3.1 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Fri, 03 Dec 1999 17:42:13 -0500 (EST) Organization: GTE Laboratories Inc. From: "Alexander N. Kabaev" To: Martin Blapp Subject: re: rpc.umntall does not work with AIX [LONG] Cc: freebsd-current@freebsd.org Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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