Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

There's a directory on our fileserver (Ubuntu Hardy) that takes up much more space than the files and subdirectories in it combined. I'm checking the directory size with "du" and file sizes with "ls -l" and I have no idea what's occupying the "phantom space".

I checked with lsof but there's no process with files open in that directory. Anybody have an idea what's happening here?

share|improve this question
    
Please paste the outputs of "du -sk .", "du -sk *" and "ls -la" in the directory concerned - thanks! –  MadHatter Jan 20 '11 at 10:43
    
What does du --apparent-size tell you? –  Dennis Williamson Jan 20 '11 at 16:13

3 Answers 3

Are there any hidden files in the directory ? Does the output of ls -al show any additional files that use up the space? Hidden files will have a filename that begins with a . e.g. .bashrc .

share|improve this answer
    
No, there are no hidden files. It's a Samba share so it's just regular files copied over from an Apple computer. –  Jonas Jan 23 '11 at 13:06

Call both commands with the same block size: --block-size (for both commmands). Perhaps they have different configurations.

share|improve this answer

Does the directory subtree contain any mountpoint by any chance? Would it be possible that some data was mistakenly stored in the target folder at a time when the mountpoint was not enabled?

share|improve this answer
    
No but even so, those files should be part of the calculation by "du", I think. –  Jonas Jan 23 '11 at 13:07
1  
Hi Jonas... I'm afraid not, du will iterate over the fs it finds, if a mountpoint is set on a folder it will cover any preexisting files in there (although they will occupy space...) –  Eddy Feb 24 '11 at 9:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.