mapr-demos / mapr-fs-replication-extension

MapR FS real time replication and API
Apache License 2.0
0 stars 0 forks source link

rm -rf on a directory that is not empty fails #51

Open mkieboom opened 8 years ago

mkieboom commented 8 years ago

Steps to reproduce:

Create a subfolder (works fine) [mapr@maprdemo source1]$ mkdir subfolder1

Remove an empty subfolder using rmdir (works fine) [mapr@maprdemo source1]$ rmdir subfolder1/

Create a subfolder (works fine) [mapr@maprdemo source1]$ mkdir subfolder2 Add a file into the subfolder (works fine) [mapr@maprdemo source1]$ echo "abc" >> subfolder2/abc.txt

Remove a not-empty subfolder using rm -rf (FAILS) [mapr@maprdemo source1]$ rm -rf subfolder2/ rm: cannot remove `subfolder2': Directory not empty

[mapr@maprdemo source1]$ ls -al subfolder2/ total 2 drwxrwxr-x 2 mapr mapr 1 Sep 27 01:22 . drwxr-xr-x 3 mapr mapr 2 Sep 27 01:22 .. -rw-rw-r-- 1 mapr mapr 16 Sep 27 01:22 .nfs0000000018756c2300000001

Looks like the .nfs file is blocking the rm -rf to remove the directory.

tgrall commented 8 years ago

Related to this: http://nfs.sourceforge.net/#faq_d2

ideally, we need to find a way to solve that without restarting the process