Why is there a size mismatch between my FSx for ONTAP file system and the NFS client when I use quotas?

4 分钟阅读
0

When I use quotas, there's a size mismatch between my Amazon FSx for NetApp ONTAP file system and the Linux Network File System (NFS) client.

Resolution

The Linux NFS client where you mounted your volumes sees a size mismatch with the FSx for ONTAP file system in the following scenarios:

  • You didn't configure the hard disk quota for the qtree.
  • The available space that's in the volume is less than the remaining tree quota space.

In these scenarios, when you run the df command on the client, the command's calculation uses the quota in the qtree. To calculate the volume size, the command adds the available space that's in the volume to the quota that's in the qtree. As a result, the output from the df command shows a size mismatch between the client and the file system. For more information, see How the df command accounts for file size on the NetApp website.

Example

In the following example, the df command output shows a size mismatch between the FSX for ONTAP file system and the Linux NFS client.

1.    To check the size of the aggregate and its volumes, run the df and volume show commands:

::> df -A -h -aggregate aggr1
Aggregate          total       used       avail       capacity
aggr1              861GB       1655MB     860GB       0%
aggr1/.snapshot    45GB        20KB       45GB        0%
2 entries were displayed.
::> volume show
Vserver    Volume       Aggregate      State       Type     Size       Available  Used%
---------  ------------ ------------   ----------  ----     ---------- ---------- -----
fsx        fsx_root     aggr1          online      RW       1GB        972.0MB    0%
fsx        vol1         aggr1          online      RW       300GB      285.0GB    0%
fsx        vol2         aggr1          online      RW       2.93TB     860.1GB    0%
3 entries were displayed.

In the preceding example, the size of vol1 is 300 GB and the size of vol2 is 2.93 TB.

2    To see the qtree details, run the volume qtree show, volume quota policy, and volume quota show commands:

::> volume qtree show -vserver fsx
Vserver     Volume         Qtree        Style        Oplocks   Status
----------  -------------  ------------ ------------ --------- --------
fsx         fsx_root       ""           unix         enable    normal
fsx         vol1           ""           unix         enable    normal
fsx         vol1           q1           mixed        enable    normal
fsx         vol2           ""           unix         enable    normal
fsx         vol2           q2           mixed        enable    normal
5 entries were displayed.
::> volume quota policy rule show
Vserver: fsx                   Policy: default          Volume: vol1
                                                 Soft             Soft
                              User      Disk      Disk     Files   Files
Type     Target     Qtree     Mapping   Limit     Limit    Limit   Limit    Threshold
-----    --------   -------   -------   --------  -------  ------  -------  ---------
tree     ""         ""        -         250GB     -        -       -        -
tree     q1         ""        -         250GB     -        -       -        -

Vserver: fsx                   Policy: default          Volume: vol2
                                                  Soft             Soft
                              User      Disk      Disk     Files   Files
Type     Target     Qtree     Mapping   Limit     Limit    Limit   Limit    Threshold
-----    --------   -------   -------   --------  -------  ------  -------  ---------
tree     ""         ""        -         1.46TB    -        -       -        -
tree     q2         ""        -         1.46TB    -        -       -        -
4 entries were displayed.
::> volume quota show
                                             Scan
Vserver     Volume         State             Status
---------   ------------   ---------------   ------
fsx         fsx_root       off               -
fsx         vol1           on                -
fsx         vol2           on                -
3 entries were displayed.

In the preceding examples, vol1 has a Disk Limit of 250GB and vol2 has a Disk Limit of 1.46TB. Quotas are applied.

3.    At the operating system (OS) level, mount the volume, and then run the df command to check its space:

# df -Th
Filesystem              Type       Size   Used  Avail  Use%  Mounted on
devtmpfs                devtmpfs   4.0M   0     4.0M   0%    /dev
tmpfs                   tmpfs      453M   0     453M   0%    /dev/shm
tmpfs                   tmpfs      182M   416K  181M   1%    /run
/dev/nvme0n1p1          xfs        8.0G   1.6G  6.5G   19%   /
tmpfs                   tmpfs      453M   0     453M   0%    /tmp
svm-dns-name:/vol1/q1   nfs4       250G   0     250G   0%    /data1
svm-dns-name:/vol2/q2   nfs4       861G   0     861G   0%    /data2
tmpfs                   tmpfs      91M    0     91M    0%    /run/user/0

In the preceding example, the size of vol1 matches the Disk Limit size in the FSx for ONTAP file system. The Disk Limit for vol2 doesn't match.

AWS 官方
AWS 官方已更新 6 个月前