Windows: Using deduplication on a volume


since Server 2012R2 Windows has the ability to enable deduplication on volumes. This means Windows can find identically blocks on a volume and create references to them. So the block is just stored one time.

To use deduplication the Windows feature Data Deduplication (FS-Data-Deduplication) has to be enabled.

PS d:\> Import-Module ServerManager
PS d:\> Add-WindowsFeature -name FS-Data-Deduplication

The deduplication ratio can evaluated without enabling. Use the ddpeval command.

C:\>ddpeval e:\FolderToDeDup
Data Deduplication Savings Evaluation Tool
Copyright (c) 2013 Microsoft Corporation.  All Rights Reserved.

Evaluated folder: e:\FolderToDeDup
Evaluated folder size: 1,59 TB
Files in evaluated folder: 1041406

Processed files: 409789
Processed files size: 1,59 TB
Optimized files size: 610,76 GB
Space savings: 1012,87 GB
Space savings percent: 62

Optimized files size (no compression): 634,29 GB
Space savings (no compression): 989,35 GB
Space savings percent (no compression): 60

Files excluded by policy: 631617
     Small files (<32KB): 631617
Files excluded by error: 0

The expected saving for this volume is 62%. It makes sense to active deduplication.

Load the necessary powershell modules for managing deduplication.

PS d:\> Import-Module Deduplication

Enable deduplication on Volume E:

PS d:\> Enable-DedupVolume -Volume E: -UsageType Default

To List all volumes where dedup is enabled use Get-DeDupVolume

PS d:\> Get-DedupVolume

Deduplication does not work on the fly during files are stored on the volume. Means the deduplication process on a volume must triggered periodically.
Start-DedupJob starts a deduplication one time.

PS d:\> Start-DedupJob –Volume E: –Type Optimization -InputOutputThrottleLevel Medium -Memory 70 -Priority Normal 

To Schedule a deduplication use New-DedupSchedule

PS d:\> New-DedupSchedule -Days Saturday -DurationHours 0 -InputOutputThrottleLevel Medium -Memory 70 -Name "Dedup Scheduled optimization" -Start "18:00" -StopWhenSystemBusy -Type Optimization

To disable dedup on a volume. Remove the schedule and disable it. Ensure that the volume is large enough to hold the whole data :-).

PS d:\> if((Get-Volume E).Size -le (Get-DedupStatus -Volume E:).UnoptimizedSize){write-warning "Not enough Space for disable deduplication"}

Disable deduplication

PS d:\> 
PS d:\> Remove-DedupSchedule -Name "Dedup Scheduled optimization"
PS d:\> Disable-DedupVolume -Volume E: 


Advertisment to support

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.