Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: nfs umount error : Bad MNT RPC: RPC: Timed out



On Sat, Jun 29, 2013 at 10:55:27PM +0000, Christos Zoulas wrote:
> In article <20130629195840.GB7272@ThinkPad>, Jan Kryl  
> <loo%bazmek.net@localhost> wrote:
> >mount protocol has been always handled in userland (except
> >diskless boot). Moving just unmount RPC call to kernel wouldn't
> >be systematic. There should be an interface to obtain mount protocol
> >transport (and other NFS options) from kernel and then umount could
> >use this information to properly unmount filesystem. Linux seems to
> >get this information from /etc/mtab. FreeBSD and Solaris suffer from
> >the same problem as NetBSD.
> 
> This has been fixed on head. We have MNT_GETARGS and that returns the
> information needed.

Thanks Christos ... but it does not work.

njoly@lanfeust [~]> sudo umount -v /mount/banks
/ifs/pasteur/services/banques: unmount from /mount/banks
umount: no <host>:<dirpath> or <dirpath>@<host> spec
Bad MNT RPC: RPC: Timed out

The attached patch does take care of the first line of output
(getnfsargs() expect host+path but the host part has been
removed previously from mntpt).

After that, still no luck ...

njoly@lanfeust [~]> sudo umount -v /mount/banks
/ifs/pasteur/services/banques: unmount from /mount/banks
umount: can't get net id for host "atlas.pasteur.fr": ai_socktype not supported
Bad MNT RPC: RPC: Timed out

No idea how to solve this one.

Thanks for your help.

-- 
Nicolas Joly

Biology IT Center
Institut Pasteur, Paris.
Index: sbin/umount/umount.c
===================================================================
RCS file: /cvsroot/src/sbin/umount/umount.c,v
retrieving revision 1.45
diff -u -p -r1.45 umount.c
--- sbin/umount/umount.c        29 Jun 2013 23:06:29 -0000      1.45
+++ sbin/umount/umount.c        1 Jul 2013 12:32:33 -0000
@@ -396,13 +396,12 @@ getmntproto(const char *mntpt)
        memset(&sa, 0, sizeof(sa));
        nfsargs.addr = (struct sockaddr *)&sa; 
        nfsargs.addrlen = sizeof(sa);
-       if ((name = strdup(mntpt)) == NULL)
-               err(EXIT_FAILURE, "strdup");
+       if ((name = getmntname(mntpt, MNTFROM, NULL)) == NULL)
+               err(EXIT_FAILURE, "getmntname");
        if (!getnfsargs(name, &nfsargs))
                proto = IPPROTO_UDP;
        else
                proto = nfsargs.proto;
-       free(name);
 
        // XXX: Return udp6/tcp6 too?
        return proto == IPPROTO_UDP ? "udp" : "tcp";


Home | Main Index | Thread Index | Old Index