ONTAP Discussions

du shows alot more space used

ACHOU_SIMG
7,484 Views

Hi,

 

OnTAP 8.1.4P7 7 mode

 

I have a volume that when I do

 

$ df -h /thevol
Filesystem Size Used Avail Use% Mounted on
filer:/vol/thevol
2.1T 1.9T 187G 91% /thevol

 

However, when I did du -sh at the 2nd level:

5.4G lib/dir1
6.0G lib/dir2
...
1.1T proj/dir3
1.4T proj/dir4
16G proj/dir5
...
599G proj/dir6

Note that the sum of 2nd level calcluations (~3.1TB) is much higer than 1.9TB. 

 

https://library.netapp.com/ecmdocs/ECMP1196906/html/GUID-B6AE602A-11E6-419D-828C-F1F0E206A0B8.html mentions "The output of the du command contains the combined space usage of all the files through the directory tree beginning at the level of the directory where the command is issued. Because the usage value displayed by the du command also includes the data blocks for directories, it is higher than the value displayed by a quota report." So it seems to me unless there are tons of files/subdirectories in the directory trees, 1.1TB difference seems to be excessive. Is my assumption correct?

 

is there a way to obtain more accurate calculations on a volume? I've treid quota report on the volume but it comes back with nothing.

 

Thank you.

1 ACCEPTED SOLUTION

YIshikawa
7,441 Views
du is not reliable to monitor disk space consumption as it shows sum of logical file size - not actual used space on disks. Difference of du and df happens not only on NetApp but also on local disks, especially when using sparse files. df on filer is reliable option to obtain actual space usage.

View solution in original post

3 REPLIES 3

JGPSHNTAP
7,478 Views

on the filer type vol size (volumename)

 

 

ACHOU_SIMG
7,471 Views

 JGPSHNTAP.

 

Thanks for the info but how do I get more accurate calcuations at the lower level, something similar to du?

 

thanks,

YIshikawa
7,442 Views
du is not reliable to monitor disk space consumption as it shows sum of logical file size - not actual used space on disks. Difference of du and df happens not only on NetApp but also on local disks, especially when using sparse files. df on filer is reliable option to obtain actual space usage.
Public