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

NFS クライアントの「 df 」出力でクォータがどのように表示されますか。

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

のとう  

に適用されます

Data ONTAP クォータ

回答

クォータには、ツリー、ユーザ、グループの 3 種類があります。Data ONTAP では、 Windows ID にグループクォータは適用されません。

  • これらのクォータは、クォータルールを使用して管理されます。
  • クォータ ルールは常にボリュームに固有です。
  • クォータ ルールは、クォータ ルールに定義されているボリュームでクォータがアクティブ化されるまで作用しません。
  • クォータポリシーは、 SVM のすべてのボリュームのクォータルールの集合です。
  • クォータポリシーは SVM 間で共有されません。SVM には、最大 5 つのクォータポリシーを設定できます。これにより、クォータポリシーのバックアップコピーを作成できます。
  • SVM には、いつでも 1 つのクォータポリシーが割り当てられます。

 

ツリークォータが適用されると、 NFS クライアントと CIFS クライアントの df 出力に反映されます。



cluster-usa::> version
NetApp Release 8.3.2P7: Mon Oct 03 10:59:56 UTC 2016

cluster-usa::>
cluster-usa::> vol size nfs
vol size: Volume "nfssvm:nfs" has size 50g.

cluster-usa::>
cluster-usa::> qtree show nfs
Vserver    Volume        Qtree        Style        Oplocks   Status
---------- ------------- ------------ ------------ --------- --------
nfssvm     nfs          ""           unix         enable    normal
nfssvm     nfs           unix         unix         enable    normal
3 entries were displayed.

cluster-usa::>
cluster-usa::> quota policy rule show -volume nfs

Vserver: nfssvm            Policy: default           Volume: nfs

                                               Soft             Soft
                         User         Disk     Disk   Files    Files
Type   Target    Qtree   Mapping     Limit    Limit   Limit    Limit  Threshold
-----  --------  ------- -------  --------  -------  ------  -------  ---------
tree   unix     ""      -             1GB        -       -        -          -

cluster-usa::>


:ツリークォータを 1G に設定したボリュームは 50G です 次に、 Linux クライアントから qtree をマウントし、サイズ

[root@sj ~]# mount nfssvm:/nfs/unix /mnt
[root@sj ~]#
[root@sj ~]# df -h /mnt
Filesystem            Size  Used Avail Use% Mounted on
nfssvm:/nfs/unix      1.0G     0  1.0G   0% /mnt
[root@sj ~]#


を確認します。一方、ユーザクォータ、 CIFS マッピング(マッピングされたドライブサイズ)にのみ反映されますが、 NFS クライアントの df 出力には反映されません。



cluster-usa::> vol size vol_user
vol size: Volume "nfssvm:vol_user" has size 20g.

cluster-usa::>
cluster-usa::> quota policy rule show -volume vol_user

Vserver: nfssvm            Policy: default           Volume: vol_user

                                               Soft             Soft
                         User         Disk     Disk   Files    Files
Type   Target    Qtree   Mapping     Limit    Limit   Limit    Limit  Threshold
-----  --------  ------- -------  --------  -------  ------  -------  ---------
user   5839      home    off           1GB        -       -        -          -
user   RTP2K8DOM2\jsiva  home off   1GB        -       -        -          -
2 entries were displayed.

cluster-usa::>


:上記の 20G ボリュームの例では、 Windows ユーザ rtp2k8dom2\jsiva と UNIX ユーザ ID 5839 の両方に、 home という qtree のディスククォータ制限を 1G に設定します。
qtree に NTFS セキュリティ形式が設定されていて、 CIFS ユーザが qtree をマッピングした場合、マップされたドライブのサイズは Windows では 1G になります。

ただし、 UNIX では、ユーザクォータが設定されている場合でも、 qtree の NFS マウントにボリュームのフルサイズが表示されます。


[root@sj ~]# mount nfssvm:/vol_user/home /home
[root@sj ~]#
[root@sj ~]# df -h /home
Filesystem            Size  Used Avail Use% Mounted on
nfssvm:/vol_user/home
                       19G  4.5M   19G   1% /home
[root@sj ~]#


ユーザーの jsiVA ( UID 5839 )が、 1 G を超えるクォータサイズを許可されたデータを作成しようとすると、

[root@sj ~]# su - jsiva
bash-4.1$
bash-4.1$ df -h .
Filesystem            Size  Used Avail Use% Mounted on
nfssvm:/vol_user/home
                       19G  4.5M   19G   1% /home
bash-4.1$
bash-4.1$ dd if=/dev/zero of=/home/jsiva/myfile bs=10485760 count=120
dd: closing output file `/home/jsiva/myfile': Input/output error
bash-4.1$


失敗して次のエラーが表示されます。 NFS クライアントからユーザクォータをチェックするには、コントローラ側で rquota を有効にする必要があります。

cluster-usa::> vserver nfs modify -vserver nfssvm -rquota enabled

cluster-usa::>

bash-4.1$ quota jsiva
Disk quotas for user jsiva (uid 5839):
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
nfssvm:/vol_user/home
                1048532  1048576 1048576               2  4294967295 4294967295
bash-4.1$

 

追加情報

ここにテキストを追加します。

 

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.
  • この記事は役に立ちましたか?