Set quotas
The mount directory of the file system in this article is illustrated with/ mnt as an example.
Procedure
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 ECS Tool as an example.
Download quota_ Tool tool.
wget https://nasimport.oss-cn-shanghai.aliyuncs.com/quota_tool_v1.0-O quota_tool__
Add quota_ Tool tool execution permission
sudo chmod a+x quota_tool
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