Quantcast
Channel: Powershell – TheITBros
Viewing all articles
Browse latest Browse all 91

Configure Data Deduplication on Windows Server 2012 R2

$
0
0
windows powershell

In this tutorial we will show you a fast and easy way to configure Data Deduplication via Powershell.

At first we need to add role for deduplication:

Import-Module ServerManager
Add-WindowsFeature -name FS-Data-Deduplication
Import-Module Deduplication

Now we need to enable deduplication (this time on E: drive).

Enable-DedupVolume E: -UsageType Default

If you are planning to make deduplication for Hyper-V machines storages, run this command:

Enable-DedupVolume E: -UsageType HyperV

Now we need to set the minimum age for files (days before the deduplication starts).

Set-Dedupvolume E: -MinimumFileAgeDays 20

If you want, you can add a folder for deduplication

Set-DedupVolume –Volume "E:" -ExcludeFolder "E:\temp"

Now set the minimum size for file:

Set-DedupVolume –Volume "E:" -MinimumFileSize "32768"

At this step we need to disable deduplication for files in use:

Set-DedupVolume –Volume "E:" -OptimizeInUseFiles:$False
Set-DedupVolume –Volume "E:" -OptimizePartialFiles:$False

To get the list of deduplication processes run the following command:

Get-DedupJob

To get deduplication schedule run:

Get-DedupSchedule

If you want to add a new task, run this command — New-DedupSchedule

Here is an example on how to add new optimization task:

New-DedupSchedule –Name "ThroughputOptimization" –Type Optimization –Days on,Tues,Wed,Thurs,Fri,Sunday –Start 00:00 –DurationHours 8 -Priority Normal

Now let`s take a closer look on this example:

Name — new task name
Type — task type (Optimization/GarbageCollection/Scrubbing)
Scrubbing — recovers damaged data
GarbageCollection — free up some space
Optimization — deduplication and data compression
Days in what days should the task run?
Start at what time?
DurationHours how many hours the task will be on run
Priority

To view current deduplication status run command:

Get-DedupVolume

You must get something like this:

Enabled   UsageType    SavedSpace    SavingsRate   Volume
——-           ———             ———-             ————           ——
True          Default          76.94 GB             66 %             E:

In this example, deduplication reduced space from 65GB to 354MB.

And that`s great efficiency! Easy set ups, guys!

The post Configure Data Deduplication on Windows Server 2012 R2 appeared first on TheITBros.


Viewing all articles
Browse latest Browse all 91

Trending Articles