On Windows Server 2019, you can set a maximum size limit on a folder using the File Server Resource Manager (FSRM), a feature that allows you to manage and classify data stored on file servers. FSRM includes a quota management feature that can be used to set size limits on folders. Here’s how you can do it:
Steps to Set a Maximum Size Limit on a Folder:
- Install File Server Resource Manager (FSRM):
- Open Server Manager.
- Click on “Add roles and features.”
- In the wizard, proceed to the “Features” section.
- Check “File Server Resource Manager” under the “File and Storage Services” > “File and iSCSI Services” section.
- Complete the wizard to install FSRM.
- Access File Server Resource Manager:
- After installation, open FSRM from the Server Manager under “Tools” or search for it in the start menu.
- Create a Quota Template (Optional):
- In FSRM, navigate to “Quota Management” and then “Quota Templates.”
- Create a new template with the desired settings (like space limit and notifications).
- Apply a Quota to a Folder:
- In FSRM, go to “Quota Management” and then “Quotas.”
- Right-click and select “Create Quota.”
- Specify the path of the folder you want to apply the quota to.
- You can either apply an existing template or create a custom quota.
- Set the size limit as required.
- Configure Notifications (Optional):
- When setting up the quota, you can also configure notifications to be sent when the quota limit is approached or reached. This can include email notifications, event log entries, or executing command scripts.
- Apply and Save the Configuration:
- After configuring the quota and any notifications, apply and save the settings.
Things to Note:
- Quotas are set on a per-folder basis. Each folder can have its own quota settings.
- Quotas can be hard or soft. A hard quota prevents users from saving files after the space limit is reached, while a soft quota only generates notifications but doesn’t block additional data.
- Regularly monitor the quotas and adjust as necessary, especially in a dynamic environment where storage needs may change.
- Ensure that FSRM is part of your regular backup strategy, as losing FSRM settings can be problematic in a managed environment.
This feature is particularly useful for managing storage on file servers and ensuring that no single user or application consumes excessive disk space.