From owner-freebsd-stable@FreeBSD.ORG Fri Feb 19 20:09:37 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E92471065693 for ; Fri, 19 Feb 2010 20:09:37 +0000 (UTC) (envelope-from mamalos@eng.auth.gr) Received: from vergina.eng.auth.gr (vergina.eng.auth.gr [155.207.18.1]) by mx1.freebsd.org (Postfix) with ESMTP id 5553C8FC12 for ; Fri, 19 Feb 2010 20:09:36 +0000 (UTC) Received: from mamalacation.ee.auth.gr (mamalacation.ee.auth.gr [155.207.33.29]) by vergina.eng.auth.gr (8.14.3/8.14.1) with ESMTP id o1JK9ani083729 for ; Fri, 19 Feb 2010 22:09:36 +0200 (EET) (envelope-from mamalos@eng.auth.gr) Message-ID: <4B7EEFFA.90104@eng.auth.gr> Date: Fri, 19 Feb 2010 22:09:30 +0200 From: George Mamalakis User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.5) Gecko/20100115 Thunderbird/3.0 MIME-Version: 1.0 To: freebsd-stable@freebsd.org References: <4B7EB1E5.3080907@eng.auth.gr> <4B7ED454.3020404@eng.auth.gr> In-Reply-To: <4B7ED454.3020404@eng.auth.gr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: mountd segfaults in NFSv4 if -alldirs is present in exports X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 20:09:38 -0000 On 19/02/2010 20:11, George Mamalakis wrote: > [root@fbsdclient ~]# mount_newnfs -onfsv4,sec=krb5 > filesrv.ee.auth.gr:/export /mnt > nfsv4 err=10016 > mount_newnfs: /mnt, : Input/output error I performed some more test on this setup and I can shed a bit more light to the issue. My /etc/export on my server (filesrv.ee.auth.gr) reads: V4: / -sec=krb5 /home If I run: # mount_newnfs -onfsv4,sec=krb5 filesrv.ee.auth.gr:/home /mnt as root, without having kinited to some principal, the partition gets mounted in /mnt and I can perform operations on it. Once I kinit to some user I get the error: nfsv4 err=10016 Then, I read the article on http://code.google.com/p/macnfsv4/wiki/FreeBSD8KerberizedNFSSetup a bit more thoroughly (with regard to nfsv4), and changed /etc/fstab to read: V4: / -sec=krb5 /home -sec=krb5 I restarted nfsd and mountd, switched to a simple user (mamalos), kinited as mamalos principal, and typed: [mamalos@fbsdclient ~]$ mount_newnfs -onfsv4,sec=krb5 filesrv.ee.auth.gr:/home mnt where mnt is a directory in mamalos' homefolder owned by that user. Of course, one has to run sysctl vfs.usermount=1 in order to allow simple users to mount filesystems (as was already suggested by the aforementioned article). This time the mount worked! I ls'd the directory, cd'd to a folder owned by mamalos (permissions 700), even touched a file in it. The only problem was that the first time I touched a file, it took a few seconds for the touch command to complete. After that, all subsequent touch commands were executed immediately. So, for the time being, mounting nfsv4 partitions with sec=krb5 has been established, but with a few limitations. I'll test now what can be done with solaris and linux clients. Good night everybody (~GMT+2). -- George Mamalakis IT Officer Electrical and Computer Engineer (Aristotle Un. of Thessaloniki), MSc (Imperial College of London) Department of Electrical and Computer Engineering Faculty of Engineering Aristotle University of Thessaloniki phone number : +30 (2310) 994379