You need to enable JavaScript to run this app.
Elastic File Storage

Elastic File Storage

Copy page
Download PDF
User Guide
Managing directory quotas
Copy page
Download PDF
Managing directory quotas
The directory quota feature tracks and limits file count and storage usage within a specified EFS directory. This topic introduces how to create and view statistical and restricted directory quotas.​
Quota type​
The directory quota feature offers two types of quotas: statistical and restricted. The details are as follows:​
​
Type​
Feature description​
Statistical​
Tracks file count and storage usage in a specified directory within the file system.​
Restricted​
Combines monitoring and restrictions:​
  • Tracks file count and storage usage in a specified directory within the file system.​
  • Enforces limits on file count and storage usage in a specified directory within the file system.​
warning​
Once you reach the limit for either file count or storage usage, you will not be able to write files to the EFS file system. This includes operations such as expanding file size, creating files or directories, and moving files to a specified directory.​
​
Prerequisites​
You have mounted the file system and specified the directory path. For more information, see Mounting file systems.​
Notes​
​
Category​
Description​
Directory​
  • Directory status: Quota can only be set for existing directories on EFS.​
  • Number of directories: Each file system can enforce quotas on up to 500 directories, and directory paths cannot exceed eight levels deep.​
  • Number of directory quotas: Each directory path can have only one directory quota.​
Restricted directory quota​
  • Latency: The directory quota feature works asynchronously, so activating or deactivating the restricted quota usually takes 5 to 15 minutes.​
  • Risk notice: File writes will be blocked once the restricted quota is reached. Currently, directory quota over-limit alerts are not supported. Please assess and configure restricted quotas carefully.​
​
Statistical directory quota​
Creating a statistical directory quota​
  1. Log in to the EFS console.​
  1. In the top menu bar, select the region of the file system you want to manage.​
  1. In the left navigation pane, select File System.​
  1. On the File System page, click the file system you want to manage.​
  1. In the left navigation pane, select Directory quota.​
  1. On the Directory quota page, click Create directory quota.​
  1. In the Create directory quota dialog, enter the Directory path. The requirements are as follows:​
  • The directory path must start with a forward slash (/).​
  • The directory path can only contain letters, numbers, underscores (_), hyphens (-), or periods (.).​
  • Enter an absolute path for the directory path. For example, if the mount target is /localdir and the target directory path is /localdir/aaa, set the directory path to /aaa.​
  1. Set Restricted type to Statistical.​
  1. Click OK.​
Viewing data statistics results​
  1. Log in to the EFS console.​
  1. In the top menu bar, select the region of the file system you want to manage.​
  1. In the left navigation pane, select File System.​
  1. On the File System page, click the file system you want to manage.​
  1. In the left navigation pane, select Directory quota.​
  1. On the Directory quota page, view information such as Restricted type, Used capacity, and No. of files used.​
Restricted directory quota​
Creating a restricted directory quota​
  1. Log in to the EFS console.​
  1. In the top menu bar, select the region of the file system you want to manage.​
  1. In the left navigation pane, select File System.​
  1. On the File System page, click the file system you want to manage.​
  1. In the left navigation pane, select Directory quota.​
  1. On the Directory quota page, click Create directory quota.​
  1. In the Create directory quota dialog, set the following parameters.​
  • ​
    Parameter​
    Description​
    Directory path​
    Enter the directory path. The requirements are as follows:​
    • The directory path must start with a forward slash (/).​
    • The directory path can only contain letters, numbers, underscores (_), hyphens (-), or periods (.).​
    • Enter an absolute path for the directory path. For example, if the mount target is /localdir and the target directory path is /localdir/aaa, set the directory path to /aaa.​
    Restricted type​
    Select Restricted.​
    File amount limitation​
    The maximum number of files allowed in the directory. Range: 01–1,000,000,000.​
    tip​
    To create a restricted directory quota, you must specify either File amount limitation or Capacity constraints. If left blank, the parameter will default to unlimited.​
    Capacity constraints​
    The maximum storage capacity under the directory. Range: 1–10,485,760 GiB.​
    ​
  1. Click OK.​
Viewing directory limitations and data statistics results​
  1. Log in to the EFS console.​
  1. In the top menu bar, select the region of the file system you want to manage.​
  1. In the left navigation pane, select File System.​
  1. On the File System page, click the file system you want to manage.​
  1. In the left navigation pane, select Directory quota.​
  1. On the Directory quota page, view information such as Restricted type, Used capacity, and No. of files used.​
Related operations​
​
Operation​
Description​
Edit quota type​
  1. On the Directory quota page, click Modify quotas in the Actions column.​
  1. In the modify directory quota dialog, change the restricted type.​
  1. Click OK.​
Edit limits for a restricted quota​
  1. On the Directory quota page, click Modify quotas in the Actions column.​
  1. In the modify directory quota dialog, modify the File amount limitation and Capacity constrains.​
  1. Click OK.​
Delete a directory quota​
  1. On the Directory quota page, click Delete in the Actions column.​
  1. In the Delete directory quotas dialog, click Delete.​
​
FAQs​
Failed to create a directory quota​
What it means​
The directory you have created does not exist on EFS, or it already has a directory quota.​
How to fix it​
Make sure that the directory exists and that no directory quota has been created for it.​
The 'Disk quota exceeded' error occurs when writing data​
What it means​
The storage usage or file count within the directory has exceeded the quota limit.​
How to fix it​
  1. Clean up data to free up space or increase the quota limit.​
  1. After cleanup, do a test write in the directory to refresh the quota cache asynchronously.​
  1. Once it's successful, restart the service.​
​
​
Last updated: 2025.10.27 17:45:23