0

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?

2
  • Please paste the outputs of "du -sk .", "du -sk *" and "ls -la" in the directory concerned - thanks!
    – MadHatter
    Jan 20, 2011 at 10:43
  • What does du --apparent-size tell you? Jan 20, 2011 at 16:13

3 Answers 3

1

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 .

1
  • 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, 2011 at 13:06
0

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

0

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?

2
  • No but even so, those files should be part of the calculation by "du", I think.
    – Jonas
    Jan 23, 2011 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, 2011 at 9:47

You must log in to answer this question.

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