Automatic notifications can be set up to be sent out to users whenever a configured quota limit is reached on a Nutanix Files share.
There are two quota levels:
- User: Sets a specific amount of storage for a single user. For example, if an administrator allots only 1 GB, then you cannot take more than 1 GB.
- Group: Sets the amount of space that is available to each user in that group. For example, a group with a policy of 10 GB and 10 users can potentially use 100 GB of data (10 x 10 = 100 GB) under that quota policy.
How do notifications work?
When the quota reaches 90 percent consumption, Files sends warning emails to the recipients. When the quota reaches 100 percent consumption, Files sends alert emails to the recipients. If the quota has a soft limit and you continue to consume over 100 percent of the storage, then Files sends an email notification to the recipients every 24 hours.
The quota set up can be achieved by either using Web GUI or nCLI.
To configure quota in Prism follow the steps below:
- In the Prism web console, click Home > File Server. Click Share/Export.
- Select the share name and click + Add Quota Policy.
- Enter the Active Directory domain services (AD) names for the group or user.
- Enter the space for the quota limit (in GB) in the Quota field. Select the enforcement type.
- Hard Limit: Prevents further writes after reaching quota limit.
- Soft Limit: Does not prevent writes. Sends email notifications to email recipients.
- Note: You cannot set both a soft and hard limit for the same user or group.
- Check the Send email notification to user box to enable email notifications and add other email recipients. Click Save.
To configure automatic email notifications from nCLI follow the steps below:
- Determine UUID of the three components: file server, quota policy and share.
- Configure email notifications using the command below:
TIP: Copy and paste values from the nCLI to nCLI directly to ensure no character is altered.
Below is the example only:
Retrieve file server UUID:
ncli fs ls
Uuid : db890abcs-fbcd-abcd-0000-c6240654bbbb
Name : MD-FS
Version : 3.5.2
Container ID : 0005922b-abcd-abcd-0000-002590c84bb8::81306
Container Uuid : 714c4d88-955a-48df-94a7-508b29c4a6d8
Retrieve share UUID:
ncli fs list-shares uuid=db890ac6-f1be-47fb-9e41-c6240654b029
Uuid : db890ac6-ffff-abcd-0000-c6240654b029
Share UUID : 91f57b34-ffff-abcd-0000-50ed14be9359
Name : TEST
Share Description : File Server
Name : MD-FS
Retrieve quota policy UUID (notice "true" value for Send Quota Notifications in the example, if yours is set to "false" you would have to change the flag to true in the following step):
ncli fs list-quota-policies uuid=db890ac6-ffff-abcd-0000-c6240654b029 share-uuid=91f57b34-ffff-abcd-0000-50ed14be9359
Quota Policy UUID : 2090e879-ffff-abcd-0000-8e2e85656bee
Share UUID : 91f57b34-ffff-abcd-0000-50ed14be9359
Principal Type : user
Principal Value : _default Quota Size In GiB : 10
Quota Enforcement Type : SOFT
Send Quota Notificatio... : true Notification Recipients : :]
Enable notifications (if not enabled), define recipients' email addresses and optionally quota size:
ncli fs update-quota-policy uuid=db890ac6-ffff-abcd-0000-c6240654b029 share-uuid=91f57b34-ffff-abcd-0000-50ed14be9359 quota-policy-uuid=2090e879-ffff-abcd-0000-8e2e85656bee notification-recipients=user@company.com quota-size-gib=2 send-quota-notifications-to-user=true
Verify:
ncli fs list-quota-policies uuid=db890ac6-ffff-abcd-0000-c6240654b029 share-uuid=91f57b34-ffff-abcd-0000-50ed14be9359 quota-policy-uuid=2090e879-ffff-abcd-0000-8e2e85656bee
Quota Policy UUID : 2090e879-ffff-abcd-0000-8e2e85656bee
Share UUID : 91f57b34-ffff-abcd-0000-50ed14be9359
Principal Type : user
Principal Value : _default
Quota Size In GiB : 2
Quota Enforcement Type. : SOFT
Send Quota Notificatio...: true
Notification Recipients : :user@company.com]
Should you wish to refresh your memory on the concept of quotas with Nutanix AFS please refer to this KB-6842 Nutanix Files - Quota FAQ
For all things Nutanix Files including notifications configurations from Prism please refer to Nutanix Files Guide (v3.6)
Command reference for nCLI, Nutanix Files relevant (file-server module).