0

I have an Ubuntu 16.04 with a cephfs mount shared with another 2 Ubuntus.

There is a folder inside the cephfs mount that won't answer to any command (ls, cd, rm, du...). So I guess it's corrupted or it contains some corrupted files and I want to definitively delete it.

When I try to remove it with rm -rf, there is no answer and the session gets completely blocked. Even if I open another terminal and execute strace -p for that process, it gets also blocked.

I can't stop the cephfs service because there are another shared applications in production that are using it.

I'm suspecting about some kind of tons of files inside that folder that can be affecting the use of the iNodes for it, but df -i doesn't return me the amount of iNodes used for the ceph mountpoint (Honestly I don't know if this is a normal behaviour)

Is there something safe that I can do to be able to remove that folder without stopping/restarting services?

1 Answer 1

0

what if you run a find /your_mount/? give a bit of time, if there is like 1 billion files in there, it will take a while.

One funky but fast (better than rm) method to empty an overloaded directory is to use rsync --delete:

rsync -r --delete --numeric-ids /empty_folder/ /your_big_folder/
2
  • Same behaviour when running find ./path_to_folder, the prompt gets blocked and no output for the strace -p <pid_of_find_process> Commented May 7, 2020 at 16:47
  • Nothing in logs? I would say stop the service. Wait for a time slot where users are not/less using it.
    – darxmurf
    Commented May 7, 2020 at 17:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .