- [Instructor] Hard drive space is relatively cheap.
But that doesn't mean you should take it for granted.
It's still worthwhile to make sure
that you're using your hard drive space wisely.
It used to be that you would deal
with vanishing storage space in one of three ways.
You could implement user quotas
to manage how much one person is allowed to save.
You could add new drives to the server.
Or you could compress a volume.
This third volume has always been a last resort
because it kills performance.
The process of packing up files and unpacking them again
introduced a performance hit as well as
a risk of corruption or loss.
Now there's a new option.
Data deduplication.
It allows you to save space as you store
and access files without the risk
or performance hit that comes from compression.
The basic idea is this.
Information is stored in blocks
of varying size on your hard drive.
With data deduplication, blocks are identified
that are exactly the same.
Redundant copies are removed, and replaced with pointers
to where that information can be stored only once.
There are three different workloads
where this can really make a difference.
A general purpose file server
is likely to contain a bit of redundancy.
Think about how many of your users
store files made from the same template.
There's a block of that file that is identical
in all of the saved iterations of that document.
A backup target is an even more likely candidate
for deduplication.
Think about last week's backup and this week's backup.
How much is exactly the same?
If that redundant information could be stored once,
but accessed uniquely for each backup set,
how much space could that save?
The third workload is a virtual desktop deployment.
If you're running your own desktop as a service environment,
you have several remote desktop environments
that are essentially copies of the same virtual hard drive.
Think of the space saving if you didn't have to have
all of that identical information saved multiple times.
This is a feature that we can make available
on NTFS and REFS volumes.
Here we are back on the server
we've been looking at in this chapter,
and on our NTFS volume and our REFS volume,
I've stored a folder called music.
Now this folder is identical in both locations.
Here it is on the NTFS drive.
It has 1243 files.
Here it is on the REFS drive.
It is the same folder with the same amount of files.
Each of these folders contains my music collection.
A whole lot of files, none of them exist more than once
within a folder.
So let's see what deduplication can do for us.
First, we need to add it, and data deduplication is a role.
So let me go ahead and go to the server manager
to go ahead and install that.
Looks like the progress bar is done,
so let me select to add roles and features.
Move forward through this process
that we've seen a few times.
Now here we are inside the list of server roles.
I need to find file and storage services.
And you can see that one of these components
has already been installed.
Let me go ahead and expand that.
Inside file and iSCSi services,
if we look down the list just a little bit,
there is data deduplication.
Now there's nothing extra to be added,
so let me go ahead and choose this, and move forward.
I'm just going to accept defaults
and allow this installation to run.
All right, it looks like our installation is complete.
So let me go ahead and close this
and I'm going to close these folder properties as well.
We don't need those any more.
Here in the server manager,
I can go to the file and storage services tab.
We can take a look at the different volumes on our server.
Data deduplication is turned on at the volume level,
not the folder level.
So we need to manage this one volume at a time.
From this pane I can right-click on a volume
and choose to configure data deduplication.
There isn't a lot to configure here.
From this top drop-down box,
I can choose which of the three workload scenarios
is best suited for my needs.
This is a file server, so let me go ahead and choose that.
If there were files that I wanted to exclude
from the data deduplication,
I could specify them by extension here,
or I could add specific folders that would be removed
from the deduplication.
This set data deduplication schedule button
would allow us to schedule this to happen
at times when it won't disrupt normal workflows.
Having this process run overnight is not a bad idea.
Well, after I apply this, and accept this,
and move on and do the same for the REFS volume,
configure data deduplication
for a general purpose file server,
apply that, and said okay,
I have now enabled the service.
Since I didn't schedule it,
I need to go ahead and run a job manually.
I'm going to go ahead and open Powershell
as an administrator, and from here,
I'm going to run the command start dedup job.
And there only a couple of parameters
that I need to specify.
The first is the type of deduplication job,
which is optimization.
And I need to specify which volume I want
to remove duplicated data from.
And there's one more parameter that I'm going to use
just for this demonstration.
I'm going to set the priority to high.
You wouldn't do that on a production server
during the workday because that will take away performance
from other things the server might want to do.
But in this demonstration, and in your test environments,
if you're not doing anything else with the server,
that will allow this to run more quickly.
Now I'm going to go ahead and hit start
and that will take a while to run.
So you would likely schedule this optimization
during off hours, but you can take a look at the status
at any time by running get dedup status.
And as time moves along, you can see how things are going,
how much space has been saved,
how many files have been condensed.
And which volumes are involved in this savings.
Data deduplication may not be the right fit
for all volumes and all workloads.
It can get in the way of how databases
and other applications try to manage their own data.
But it is preferred over compression or simply adding drives
until you run out of bays.