df seems to show wrong disk usage
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
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/lacie699G 37G 628G 6% /media/lacieYet 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
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/lacie699G 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