简体中文版经机器翻译而成,仅供参考。如与英语版出现任何冲突,应以英语版为准。

管理客户端权限以快速删除目录

从ONTAP 9.11.1开始、存储管理员可以授予对卷的权限、以允许NFS和SMB客户端自行执行低延迟_fast-directory delete_操作。在集群上启用异步删除后、Linux客户端用户可以使用`mv`命令、Windows客户端用户可以使用`rename`命令将指定卷上的目录移动到默认名为.ontaptrashbin的隐藏目录、从而快速删除该目录。

启用客户端异步目录删除

步骤
  1. 从集群命令行界面中、进入高级权限模式:-privilege advanced

  2. 启用客户端异步删除、并根据需要为trashbin目录提供备用名称:

    volume file async-delete client enable volume volname vserver vserverName trashbinname name

    使用默认垃圾桶名称的示例:

    cluster1::*> volume file async-delete client enable -volume v1 -vserver  vs0
    
    Info: Async directory delete from the client has been enabled on volume "v1" in
          Vserver "vs0".

    指定备用垃圾桶名称的示例:

    cluster1::*> volume file async-delete client enable -volume test -trashbin ntaptrash -vserver vs1
    
    Success: Async directory delete from the client is enabled on volume "v1" in
          Vserver "vs0".
  3. 验证是否已启用客户端异步删除:

    volume file async-delete client show

    示例

    cluster1::*> volume file async-delete client show
    
    Vserver Volume      async-delete client TrashBinName
    ------------ ------------ ----------------------- -------------
    vs1          vol1         Enabled          .ntaptrash
    vs2          vol2         Disabled          -
    
    2 entries were displayed.

禁用客户端异步目录删除

步骤
  1. 在集群CLI中、禁用客户端时间同步目录删除:

    volume file async-delete client disable volume volname vserver vserverName

    示例

    cluster1::*> volume file async-delete client disable -volume vol1 -vserver vs1
    
           Success: Asynchronous directory delete client disabled successfully on volume.
  2. 验证是否已禁用客户端异步删除:

    volume file async-delete client show

    示例

    cluster1::*> volume file async-delete client show
    
    Vserver      Volume      async-delete client      TrashBinName
    ------------ ------------ ----------------------- -------------
    vs1          vol1         Disabled                -
    vs2          vol2         Disabled                -
    
    2 entries were displayed.