Skip to main content

Set quotas

Procedure

fg-dc-nas-3.4.1-1

The mount directory of the file system in this article is illustrated with/ mnt as an example.

  1. Log in to ECS (Linux system) as root.

    quota The tool needs to run on the machine with NAS attached (such as ECS) and must be run as root. This article aims to run quota on the ECS Tool as an example.

  2. Download the quota_Tool tool.

    wget https://nasimport.oss-cn-shanghai.aliyuncs.com/quota_tool_v1.0-O quota_tool__
  3. Add quota_ Tool tool execution permission

    sudo chmod a+x quota_tool
  4. Set quotas.

    Set the quota command format to sudo . / quota_tool set -- dir [DIR][OPTION] The following is an example of quota setting.

    • If you want to set the statistical quota for the/ mnt /data/directory and count all the files under the directory, execute the following command:

      sudo ./quota_tool set --dir / mnt / data/ --accounting --alluser
    • If you want to set a statistical quota for the/ mnt /data/directory to count all files with a Uid of 505 users under the directory, execute the following command:

      sudo ./quota_tool set --dir / mnt / data/ --accounting --uid 505