-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle deleted files on Linux #444
Comments
That is an interesting edge case. I can imagine this being a common problem for sysadmins. dust works by walking thru the filesystem, if I'm currently not keen on adding this feature. Like you said, it would require walking the file descriptors, checking if that path matched the path dust was run for, then working out if it had already been included. Then if I were to show it I'd need a way of marking it as 'different' because it wouldn't be removed if you 'rm' the file. I think we are probably better served with |
Yes you are correct, dust or ls can't find the file with a syscall in the filesystem, the only way is through /proc/ The workflow you describe is what I imagined. Yes The thing is, using I can help to make a demo implementation if you want |
If you were to have this If you are hunting down lost disk space your procedure for actual files in the filesystem is going to be different than for processes that are holding on to deleted files. So I'm proposing this:
What do you think about this ? |
Hi, I think it's better to merge the deleted files with the regular files, because in the end, both are taking up space. The name of the deleted files are suffixed by the kernel with
If you want to test, you can do the following:
|
Hi,
On Linux, if a file is deleted while a process still has a handle on it, the disk space is still used, but not visible on the FS (ls, find.. will not find it). This is a common sysadmin issue, so I think it would be great to add an option to search for deleted files
The only way to know that a file is still taking up space, is by walking the file descriptors under
/proc/$pid/fd/
, and checking if the files still exist.We can use
lsof
to show the deleted files:Do you think it would be a worthy feature to add to dust?
The text was updated successfully, but these errors were encountered: