This section will enable data deduplication.
Note
It will take approximately 20 minutes to complete this section.
Important
Read through all steps below and watch the quick video before continuing.
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 data deduplication available using the Amazon FSx CLI for remote management on PowerShell.
Get-Command *-FSxDedup*
What commands are available?
Enable data depduplication for the entire FSx file system.
Enable-FSxDedup
Examine your data deduplication environment using the commands in the table below.
Command |
Get-FSxDedupConfiguration |
Get-FSxDedupStatus |
Get-FSxDedupJob |
Get-FSxDedupMetadata |
Get-FSxDedupSchedule |
Measure-FSxDedupFileMetadata -path “D:\share” |
Were all these commands successful? Why not?
When is the next scheduled “Optimization” task?
End the remote PowerShell session. Run Exit-PSSession.
Close the PowerShell window. Run exit.
Important
Read through all steps below and watch the quick video before continuing.
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.
Important
Complete the next few steps using the remote PowerShell session to the FSx file server.
Create a new data deduplication optimization schedule.
New-FSxDedupSchedule
Prompt | Value |
Name | DailyOptimization |
Type | Optimization |
What time will the optimization start?
Examine the different options available to data deduplication jobs.
Set-FSxDedupSchedule -?
Copy the command below into your favorite text editor and update the start_time parameter with the current time plus 2 minutes. Look at the clock in bottom right corner of the remote desktop window. Add 2 minutes to this time and replace the start_time parameter with this value. (i.e. 5:32pm). This time is in UTC.
Set-FSxDedupSchedule -Name DailyOptimization -Start start_time
Run the updated command in the Windows PowerShell window.
Wait for the time of the DailyOptimization scheduled job to pass (i.e. 1 minute after the start_time you entered above) and Run the command below to check the status.
Run the command in the Remote Windows PowerShell Session.
Get-FSxDedupStatus
Did the optimization schedule run?
How many files were optimized and how much space is saved?
Attribute |
LastOptimizationResult |
OptimizedFilesCount |
OptimizedFilesSavingsRate |
OptimizedFilesSize |
SavedSpace |
Do you see any optimization? Why not?
Quickly read the Enabling data deduplication section of the Amazon FSx for Windows File Server User Guide to find the answer.
Get-FSxDedupConfiguration
What is the MinimumFileAgeDays attribute value?
Update the data deduplication configuration and set the minimum file age days attribute to 0.
Set-FSxDedupConfiguration -MinimumFileAgeDays 0
Update the DailyOptimization data deduplication schedule to Run in 2 minutes.
Copy the command below into your favorite text editor and update the start_time parameter with the current time plus 2 minutes. Look at the clock in bottom right corner of the remote desktop window. Add 2 minutes to this time and replace the start_time parameter with this value. (i.e. 5:32pm)
Set-FSxDedupSchedule -Name DailyOptimization -Start start_time
Run the updated command in the Remote Windows PowerShell Session.
Wait for the time of the DailyOptimization scheduled job to pass (i.e. 1 minute after the start_time you entered above) and Runthe command below to check on the status.
Run the command in the Remote Windows PowerShell Session.
Get-FSxDedupStatus
Did the optimization schedule run?
The active data deduplication job may still be running. run the following command in the Remote Windows PowerShell Session to check on the status of the data deduplication job.
Get-FSxDedupJob
Continue to re-Runthe Get-FSxDedupJob command every few minutes to check on the status of the job. This may take 5-10 minutes depending on the amount of data you creating during the test performance section.
Continue with the tutorial while the data deduplication job runs in the background.
If the Get-FSxDedupJob command returns an error, then there are no more active jobs and the job has completed.
Run the command in the Remote Windows PowerShell Session.
Get-FSxDedupStatus
How many files were optimized and how much space is saved?
Attribute |
LastOptimizationResult |
OptimizedFilesCount |
OptimizedFilesSavingsRate |
OptimizedFilesSize |
SavedSpace |
End the remote PowerShell session. Run Exit-PSSession.
Close the PowerShell window. Run exit.