This section will enable user storage quotas.
Note
It will take approximately 10 minutes to complete this section.
Copy the script below into your favorite text editor.
$WindowsRemotePowerShellEndpoint = "windows_remote_powershell_endpoint" # e.g. "fs-0123456789abcdef.example.com"
enter-pssession -ComputerName ${WindowsRemotePowerShellEndpoint} -ConfigurationName FsxRemoteAdmin
From the Amazon FSx console, click the link to the STG326 - SAZ file system and select the Network & security tab. Copy the Windows Remote PowerShell Endpoint of the file system to the clipboard (e.g. fs-0123456789abcdef.example.com).
Return to your favorite text editor and replace “windows_remote_powershell_endpoint” with the Windows Remote PowerShell Endpoint of STG326 - SAZ. Copy the updated script.
Go to the remote desktop session for your Windows Instance 0.
Click Start >> Windows PowerShell.
Run the updated script in the Windows PowerShell window.
NOTE: Complete the next few steps using the remote PowerShell session to the FSx file server.
Review the PowerShell function commands for managing user quotas available using the Amazon FSx CLI for remote management on PowerShell.
Get-Command *-FSxUserQuota*
What commands are available?
Enable user storage quotas for the entire FSx file system and set the default track limit to 200 GB and the default track warning limit to 100 GB.
Enable-FSxUserQuotas -Track -DefaultLimit 200000000000 -DefaultWarningLimit 100000000000
Open a new local Windows PowerShell session (NOT a Remote Windows PowerShell Session).
Create a 201 GB sparse file.
$random = $(Get-Random)
fsutil file createnew Z:\${env:computername}-$random.dat 201000000000
Determin which users are exceeding their user storage quota limit.
Get-FSxUserQuotaEntries
Set user storage quotas for the admin@example.com.
Set-FSxUserQuotas -Domain example.com -Name admin -Limit 250000000000 -WarningLimit 100000000000
Change the user storage quotas setting from track to enforce.
Enable-FSxUserQuotas -Enforce -DefaultLimit 200000000000 -DefaultWarningLimit 100000000000
Create a 1 KB sparse file.
$random = $(Get-Random)
fsutil file createnew Z:\${env:computername}-$random.dat 1000
What error do you get?
How much total disk space is being used?
Why are you getting this error?
Disable user storage quotas for the entire FSx file system.
Disable-FSxUserQuotas
Create a 1 KB sparse file.
$random = $(Get-Random)
fsutil file createnew Z:\${env:computername}-$random.dat 1000
End the remote PowerShell session. Run Exit-PSSession.
Close the PowerShell window. Run exit.