From owner-freebsd-questions@FreeBSD.ORG Tue Oct 11 01:30:28 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37F16106564A for ; Tue, 11 Oct 2011 01:30:28 +0000 (UTC) (envelope-from freebsd@top-consulting.net) Received: from smtp3.emailarray.com (smtp3.emailarray.com [65.39.216.17]) by mx1.freebsd.org (Postfix) with ESMTP id BC6348FC0A for ; Tue, 11 Oct 2011 01:30:27 +0000 (UTC) Received: (qmail 13780 invoked by uid 89); 11 Oct 2011 01:30:26 -0000 Received: from unknown (HELO localhost) (freebsd@top-consulting.net@192.168.1.6) (POLARISLOCAL) by smtp3.emailarray.com with (DHE-RSA-AES256-SHA encrypted) SMTP; 11 Oct 2011 01:30:25 -0000 Received: from ns4.top-consulting.net (ns4.top-consulting.net [65.39.216.2]) by mail.top-consulting.net (Horde Framework) with HTTP; Mon, 10 Oct 2011 21:30:24 -0400 Message-ID: <20111010213024.16895xplcwm1p7ok@mail.top-consulting.net> Date: Mon, 10 Oct 2011 21:30:24 -0400 From: freebsd@top-consulting.net To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.3.7) X-Originating-IP: 65.39.216.2 X-DSPAM-Result: Innocent X-DSPAM-Processed: Mon Oct 10 21:30:26 2011 X-DSPAM-Confidence: 0.9905 X-DSPAM-Improbability: 1 in 10429 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 1,4e939c3211841399311352 X-DSPAM-Factors: 27, FreeBSD, 0.00441, FreeBSD, 0.00441, this+error, 0.00598, idem, 0.01000, NFS+server, 0.01000, Subject*removing, 0.01000, Beta2, 0.01000, FreeBSD+6, 0.01000, a+NFS, 0.01000, NFS, 0.01000, NFS, 0.01000, Subject*empty, 0.01000, =+2, 0.01000, Rename, 0.01000, FreeBSD+9, 0.01000, O_NONBLOCK, 0.01000, is+empty, 0.01000, on+FreeBSD, 0.01000, rpcbind, 0.01000, chmod, 0.01000, lockd, 0.01000, directory+that, 0.01000, =+19, 0.01000, NFS+share, 0.01000, "+2), 0.01000, this+?, 0.01000, Read+Write, 0.01000 X-PolarisMail-Flags: x Subject: Problems removing non-empty directory through NFS X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Oct 2011 01:30:28 -0000 I have a NFS server configured on FreeBSD 9.0 Beta2 that only serves a share through NFS v3 TCP. All the processes ( mountd, rpcbind, lockd, etc ) are started with -h on both the server and the clients. The NFS clients range from FreeBSD 6.1 to 8.2. On all the clients, it is impossible for me to erase a directory that contains other data and is from that NFS share. I get this error: rm -rf nick/ rm: fts_read: Input/output error same is true if I give the full path: rm -rf /usr/nfs.mount/nick rm: fts_read: Input/output error if the directory is empty, I can use rm -rf or rmdir without problems. Besides this I can read all the files, erase files, chmod, chown, etc without any problem. I just can't erase directories. Running a truss on the rm -rf shows ( towards the end ): lseek(4,0x0,SEEK_SET) = 0 (0x0) close(4) = 0 (0x0) stat("new",{mode=drwx------ ,inode=53090640,size=512,blksize=4096}) = 0 (0x0) open("new",O_NONBLOCK,027757765430) = 4 (0x4) fstat(4,{mode=drwx------ ,inode=53090640,size=512,blksize=4096}) = 0 (0x0) fcntl(4,F_SETFD,FD_CLOEXEC) = 0 (0x0) fstatfs(0x4,0xbfbfe8c0) = 0 (0x0) fstat(4,{mode=drwx------ ,inode=53090640,size=512,blksize=4096}) = 0 (0x0) fchdir(0x4) = 0 (0x0) getdirentries(0x4,0x8051000,0x1000,0x8050014) = 512 (0x200) getdirentries(0x4,0x8051000,0x1000,0x8050014) = 0 (0x0) lseek(4,0x0,SEEK_SET) = 0 (0x0) close(4) = 0 (0x0) open("..",O_RDONLY,00) = 4 (0x4) fstat(4,{mode=drwx------ ,inode=53090635,size=512,blksize=4096}) = 0 (0x0) fchdir(0x4) = 0 (0x0) close(4) = 0 (0x0) rmdir(0x80525a8) = 0 (0x0) unlink("dovecot.index.log") = 0 (0x0) unlink("dovecot.index.cache") = 0 (0x0) unlink("dovecot-uidlist") = 0 (0x0) unlink("dovecot.index.log.2") = 0 (0x0) unlink("dovecot.index") = 0 (0x0) open("..",O_RDONLY,00) ERR#5 'Input/output error' rm: write(2,"rm: ",4) = 4 (0x4) fts_readwrite(2,"fts_read",8) = 8 (0x8) : write(2,": ",2) = 2 (0x2) Input/output error write(2,"Input/output error\n",19) = 19 (0x13) exit(0x1) process exit, rval = 256 There are no errors visible on the server. Here is the output of nfsstat on the server: Server Info: Getattr Setattr Lookup Readlink Read Write Create Remove 107929047 19257084 240622998 121 11209701 19004949 0 8754163 Rename Link Symlink Mkdir Rmdir Readdir RdirPlus Access 4115334 1108983 38 1845 15557465 14771644 0 110311954 Mknod Fsstat Fsinfo PathConf Commit 0 4492462 47 0 14146384 Server Ret-Failed 0 Server Faults 0 Server Cache Stats: Inprog Idem Non-idem Misses 0 0 0 579078451 Server Write Gathering: WriteOps WriteRPC Opsaved 19004949 19004949 0 Anyone has any ideas what might be causing this ?