Phần này sẽ kích hoạt hạn ngạch bộ nhớ của người dùng.
Lưu ý
Sẽ mất khoảng 10 phút để hoàn thành phần này.
Sao chép đoạn script bên dưới vào text editor yêu thích của bạn.
$WindowsRemotePowerShellEndpoint = "windows_remote_powershell_endpoint" # ví dụ: "fs-0123456789abcdef.example.com"
enter-pssession -ComputerName ${WindowsRemotePowerShellEndpoint} -ConfigurationName FsxRemoteAdmin
Từ bảng điều khiển Amazon FSx, nhấp vào liên kết đến hệ thống file STG326 - SAZ và chọn tab Network & security. ***Sao chép Windows Remote PowerShell Endpoint của hệ thống file vào khay nhớ tạm (ví dụ: fs-0123456789abcdef.example.com).
Quay lại trình soạn thảo văn bản yêu thích của bạn và thay thế “windows_remote_powershell_endpoint” với Windows Remote PowerShell Endpoint của STG326 - SAZ. ***Sao chép script được cập nhật.
Chuyển đến Remote Desktop Session dành cho Windows Instance 0 của bạn.
Nhấp vào Start >> Windows PowerShell.
Run script đã cập nhật trong cửa sổ Windows PowerShell.
LƯU Ý: Hoàn thành các bước kế tiếp bằng Session PowerShell Remote đến file server FSx.
Xem lại các lệnh chức năng (function commands) PowerShell để quản lý hạn ngạch người dùng có sẵn (user quotas available) bằng cách sử dụng Amazon FSx CLI để quản lý Remote trên PowerShell.
Get-Command *-FSxUserQuota*
Những lệnh nào có sẵn?
Bật hạn ngạch lưu trữ người dùng cho toàn bộ hệ thống file FSx và thiết lập track limit mặc định là 200 GB và track warning limit mặc định ở 100 GB.
Enable-FSxUserQuotas -Track -DefaultLimit 200000000000 -DefaultWarningLimit 100000000000
Mở một Local Windows PowerShell Session mới (KHÔNG PHẢI là Remote Windows PowerShell Session).
Tạo một file sparse 201 GB.
$random = $(Get-Random)
fsutil file createnew Z:\${env:computername}-$random.dat 201000000000
Xác định người dùng nào đang vượt quá giới hạn dung lượng lưu trữ người dùng của họ.
Get-FSxUserQuotaEntries
Đặt hạn ngạch dung lượng người dùng cho admin@example.com.
Set-FSxUserQuotas -Domain example.com -Name admin -Limit 250000000000 -WarningLimit 100000000000
Thay đổi cài đặt hạn ngạch bộ nhớ người dùng từ theo dõi (track) thành thực thi (enforce).
Enable-FSxUserQuotas -Enforce -DefaultLimit 200000000000 -DefaultWarningLimit 100000000000
Tạo một file sparse 1 KB.
$random = $(Get-Random)
fsutil file createnew Z:\${env:computername}-$random.dat 1000
Bạn nhận được lỗi gì?
Tổng dung lượng đĩa đang được sử dụng là bao nhiêu?
Tại sao bạn nhận được lỗi này?
Vô hiệu hóa hạn ngạch bộ nhớ người dùng cho toàn bộ hệ thống file FSx.
Disable-FSxUserQuotas
Tạo một file sparse 1 KB.
$random = $(Get-Random)
fsutil file createnew Z:\${env:computername}-$random.dat 1000
Kết thúc Session PowerShell Remote . Run Exit-PSSession.
Đóng cửa sổ PowerShell. Run Exit.