NFS Directory not empty

Hello,

I am receiving the following error when attempting to delete a NFS export:
Error running a command. cmd = [’/bin/rmdir’, ‘/export/userdata’]. rc = 1. stdout = [’’]. stderr = [’/bin/rmdir: failed to remove \xe2\x80\x98/export/userdata\xe2\x80\x99: Directory not empty’, ‘’]

Running ls -la shows the following:
drwxrwxrwx 1 admin admin 0 Apr 30 18:56 .
drwxr-xr-x 1 root root 578 Apr 30 19:04 …

I have been trying to figure out what the . and … are, if anything, but without any luck. Does anyone have any advice?

Thanks in advance.
Eric

@Eric_Stewart Welcome to the Rockstor community. With reference to the dots question: if I understand your post correctly then you do have an empty directory. In unix/linux land there is always a ‘.’ and a ‘…’ entry, the first is a self reference of sorts and the second is a reference to the parent directory. Hence “cd …” to change directory to the parent.

You could try:

ls -lah

as the additional ‘h’ means to show hidden files whose names begin with a ‘.’ eg ".bashrc"
Maybe you have some hidden files there.

(Edit) Sorry @Eric_Stewart that last -h bit is actually bogus, Not sure what I was thinking, you already have hidden files displayed via the -la otherwise you wouldn’t see the ‘.’ entries :blush: the -h is actually for human readable to give more friendly file sizes. Some kind of blip from my long distant past.

I step out of this one and let a more sane person answer for the time being Sorry.

1 Like

No problem, I appreciate the time you took to post the reply!

I figured it out!

The share I wanted to delete was called “userdata”. I used rm -rf userdata in the following locations:
/export
/mnt3

I think what may have happened is that I had some snapshots in those locations which did not show up in my list of snapshots. The reason they didn’t show up might have to do with resetting the Rockstor configuration after accidentally updating Rockstor while it was still being built.

Anyways, hopefully that helps others who might be experiencing the same issues as me.

1 Like