Can't delete files/folders from share or via CLI

Status
Not open for further replies.

Lessbones

Dabbler
Joined
Oct 17, 2016
Messages
22
Hi all--

I've been trying to do some cleaning of my server, and there are a whole bunch of folders and files which I cannot delete by any means. I'm accessing via a mac with SMB, and on the mac side it says a file is "in use". When I ssh into the server to try to manually delete files using "rm -r" or "rm -rf" I get "Directory not empty". What does this mean? I've had this server running for 2+ years now, and there have consistently been files I just cannot move or delete no matter what, as root or otherwise. Is there no way to force the system to trash these as a root user? It seems like every other system i've ever worked on has a way to say "JUST F***ING DELETE IT" except for freebsd...
 
Joined
Jan 7, 2015
Messages
1,155
See this HERE. If the folders and things in question are mounted, they wont delete. Make sure everything is unmounted. You might be able to turn off sharing and then try?
 

Lessbones

Dabbler
Joined
Oct 17, 2016
Messages
22
If I try to unmount the disk it tells me "device busy" probably because of transmission or some such thing. But if I were to be able to get it unmounted... how would I access it to delete the files/folders? I tried changing the flags etc from the linked thread, but that didn't help any...
 
Joined
Jan 7, 2015
Messages
1,155
Sorry, the ZFS pools need to be mounted, but the shares and mounted drives on a different system do not. If they are they might not allow to delete.
 

Lessbones

Dabbler
Joined
Oct 17, 2016
Messages
22
So i've tried this, stopped all sharing and any jails running on my system, but no change-- still getting "Device busy" when trying to delete one folder, and a page full of "Directory not empty" when I try the other. Any other suggestions? Thank you for the help... this is just incredibly frustrating...

edit: also scrubbed the pool for good measure
 
Joined
Jan 7, 2015
Messages
1,155
Ive never personally had this happen. So im shooting in the dark but could these be datasets and not folders? Maybe they need destroyed and not deleted. What is the output of fstat -f from one or all of these directories? Should give a hint.

Can you rename these directories? Can you create a directory in it? Can you then remove that directory?
 
Status
Not open for further replies.
Top