Skip to main content
NetApp Knowledge Base

Why does host file system and management softwares show different space usage than in Data ONTAP?

Views:
723
Visibility:
Public
Votes:
0
Category:
clustered-data-ontap-8
Specialty:
core
Last Updated:

Applies to

  • ONTAP 9 
  • Clustered Data ONTAP 8    
  • Data ONTAP 7 and earlier    
  • FlexPod    
  • SAN 

Answer

When turning off LUN space reservations, data inside of the LUN is not represented by space df shows as taking up.

  • Following example uses a freshly created volume that contains a single LUN for illustration purposes. The volume is space guaranteed on the aggregate and has the factional reserve setting at 0%:

storage> lun show -v
/vol/space/space 86.3m (90478080) (r/w, online, mapped)
Serial#: nBLskoOLyq/2
Share: none
Space Reservation: enabled
Multiprotocol Type: windows
Maps: space=0


storage> df -h
Filesystem total used avail capacity Mounted on
/vol/space/ 174MB 86MB 87MB 50% /vol/space/
/vol/space/.snapshot 0TB 0TB 0TB ---% /vol/space/.snapshot

df -h command shows the amount of space in the volume that the LUN is using plus reserved space for the LUN's total size.

  • Disable space reservation:

storage> lun set reservation /vol/space/space disable

storage> df -h
Filesystem total used avail capacity Mounted on
/vol/space/ 174MB 2536KB 171MB 1% /vol/space/
/vol/space/.snapshot 0TB 0TB 0TB ---% /vol/space/.snapshot

With space reservation disabled on LUN, df displays the amount of used space within the LUN on that volume.

  • When space reservation is turned back on and a 30.6MB (30668KB) file is written to this LUN:

storage> lun set reservation /vol/space/space enable

storage> df -h
Filesystem total used avail capacity Mounted on
/vol/space/ 174MB 86MB 87MB 50% /vol/space/
/vol/space/.snapshot 0TB 0TB 0TB ---% /vol/space/.snapshot

The storage system shows the same as when there was no data inside of the LUN.

  • If reservation is turned off again:

storage> df
Filesystem kbytes used avail capacity Mounted on
/vol/space/ 178176 33276 144900 19% /vol/space/
/vol/space/.snapshot 0 0 0 ---% /vol/space/.snapshot

The ~30688KB file is now added to the previous 2536KB.

  • Turn reserve back on and delete the file:

storage> df -h
Filesystem total used avail capacity Mounted on
/vol/space/ 174MB 86MB 87MB 50% /vol/space/
/vol/space/.snapshot 0TB 0TB 0TB ---% /vol/space/.snapshot

Once the file is deleted, the host file system shows the space is available; however, Data ONTAP shows the same 32MB is being used. This behavior occurs because the space used by the file is still allocated on the LUN. The host file system is able to overwrite this space as needed.

NetApp OnCommand System Manager reports different space usage of a LUN

Run the following command to ensure OnCommand System Manager is reporting the same space used as the Data ONTAP CLI:

::> lun show -vserver VSERVER_NAME -path COMPLETE_LUN_PATH -instance

Different VMFS-LUN size reported by VMware Web client than ONTAP

VMware Vsphere 5.x does not automatically release the blocks after any VMs are deleted or moved. Hence the blocks are not marked as free to the storage controller, although from the VMware client itself, it recognizes the blocks as free. 

Additional Information

For more information, see VMware KB Using vmkfstools to reclaim VMFS deleted blocks on thin-provisioned LUNs.