メインコンテンツまでスキップ

Linuxコマンド「df」と「du」の結果が異なるのはなぜですか?

Views:
832
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
nas
Last Updated:

環境

  • ONTAP 9
  • NFS

回答

  • du ターゲットを確認し、各オブジェクトのスペース使用量をカウントします。
  • ターゲットには、ディレクトリ、サブディレクトリ、ファイル、またはファイルシステム全体を指定できます。
  • df ファイルシステムに現在のスペース使用量を照会
  • ストレージシステムが有効にした ボリューム効率化

例:

[root@user1]# df -Ph | grep DB
192.xxx.xxx.xxx:/vol1    12T  784G  12T   7% /DB

[root@user1]# du -sh /DB/
2.7T  /DB

DF
/vol/vol1/    12884901888  847244892 12037656996     7%  /vol/vol1/
/vol/vol1/.snapshot      0      0      0     0%  /vol/vol1.snapshot

DF -S
Filesystem         used     total-saved   %total-saved   deduplicated   %deduplicated   compressed   %compressed   vbn zero   %vbn zero
/vol/vol1/     847244892     2560004340       75%    1515678176        44%   1044326164       31%   726488260      21%

 

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.