Cannot delete old NFS directory: Device or resource busy
Posted
by Jakobud
on Server Fault
See other posts from Server Fault
or by Jakobud
Published on 2010-03-16T16:48:54Z
Indexed on
2010/03/16
16:51 UTC
Read the original article
Hit count: 675
On server1, we had an NFS share mounted from server 2 like this:
/nfs/server2/share
Recently, we took down server2 to install a new OS on it. Now we can't get NFS setup the way it was. When I do this:
ls -l /nfs
I get this:
drwxr-xr-x 2 root root 0 2010-03-15 09:59 server2
Notice how the directory size is 0 instead of 4096 like usual? Anyways I go into server2 expecting to see a share directory, but I don't. It's empty. So therefore I cannot mount my share at /nfs/server2/share.
When I try to create /nfs/server2/share directory, I get
mkdir: cannot create directory `share': No such file or directory
I think this is because it doesn't really think the /nfs/server2 directory really exists. Even if I use the -p option with mkdir, it doesn't work.
Next I tried to remove /nfs/server2 so I could just recreate it. I try to rm -r /nfs/server2 but I get
rm: cannot remove directory `/nfs/server2': Device or resource busy
So now I'm at a loss. I need to mount this NFS share in the same exact place on server1 (at /nfs/server2/share) because other software on server1 depend on this. But if I can't create that share directory and I can't remove that directory, what do I do?
Also, just for testing, I attempted to mount the share at /nfs/testing/share and it mounted just fine. But like I said, I need to mount it back in the same location.
© Server Fault or respective owner