Date: Mon, 10 Oct 2011 21:30:24 -0400 From: freebsd@top-consulting.net To: freebsd-questions@freebsd.org Subject: Problems removing non-empty directory through NFS Message-ID: <20111010213024.16895xplcwm1p7ok@mail.top-consulting.net>
next in thread | raw e-mail | index | archive | help
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 <local ip> 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 ?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111010213024.16895xplcwm1p7ok>