Skip to contentSkip to conversation

df seems to show wrong disk usage

DISCUSSION Sami Liedes 2 participants 3 messages Jun 20, 2009 – Jun 21, 2009 2 messages not in the archive NILFS2 filesystem

lore
Share & tools
lore
#0 lore raw

Hi,

I've been copying data to a 700 GiB nilfs2 volume from a fast disk for 2.5 hours now. df -h shows there's only 37 GiB of data there:

/dev/mapper/lacie 699G 37G 628G 6% /media/lacie

Yet running du -csh in one big directory in /media/lacie at the same time shows disk usage to be 62G in that directory alone.

Are the df figures somehow inaccurate for nilfs2 volumes?

I'm using the version of nilfs2 in stock 2.6.30 kernel.

Sami

_______________________________________________
users mailing list
[email protected]
https://www.nilfs.org/mailman/listinfo/users

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 7 lines · Sami Liedes

I've been copying data to a 700 GiB nilfs2 volume from a fast disk for 2.5 hours now. df -h shows there's only 37 GiB of data there:

/dev/mapper/lacie 699G 37G 628G 6% /media/lacie

Yet running du -csh in one big directory in /media/lacie at the same time shows disk usage to be 62G in that directory alone.

Looking at the data, it contains a lot of hard links, so this may be something to do with them.

Sami

_______________________________________________
users mailing list
[email protected]
https://www.nilfs.org/mailman/listinfo/users

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Hi!

Quoted 6 lines · Sami Liedes
Quoted 5 lines · Sami Liedes

I've been copying data to a 700 GiB nilfs2 volume from a fast disk for 2.5 hours now. df -h shows there's only 37 GiB of data there:

/dev/mapper/lacie 699G 37G 628G 6% /media/lacie

Quoted 7 lines
Quoted 2 lines

Yet running du -csh in one big directory in /media/lacie at the same time shows disk usage to be 62G in that directory alone.

Looking at the data, it contains a lot of hard links, so this may be something to do with them.

Sami

For nilfs, df -h' shows the real disk usage which includes past data as well as metadata. OTOH, du -h' does not count neither.

Usually, df -h shows larger values than du -h if hardlinks are taken into account (this is default behavior).

So, something looks strange in your case.

Could you try lssu commands?

It displays disk usage state of nilfs.

`lssu -a' shows all segments in the nilfs partition.

$ expr \( `lssu | wc -l` - 1 \) \* 8

shows disk usage in Mega bytes unit.

If this value differs from the value of 'df -h', the on-disk value of in-use segments likely went wrong.

Thanks,
Ryusuke Konishi