Freigeben über


Server 2012 R2 - Lab Guide - Part 2 - Step by Step - Storage

In this lab we dive into the storage pooling and deduplication features of Hyper-V.

This lab assumes that you have completed the prior installation and configuration lab found here:

Server 2012 R2 - Lab Guide - Part 1 - Step by Step - Including Dual Boot Instructions

 

Part  1 – Storage Spaces

Part  2 – Deduplication

 

Overview

In Part 1, you will see how Windows Server 2012 implements the technology known as Storage Spaces or Storage Pools. A storage pool is a collection of disks that can contain virtual disks and volumes. All disks in a storage pool are monitored and managed as a unit.

In Part 2, you will see how Windows Server 2012 implements data deduplication. You will implement deduplication on an existing storage pool.

 

Objectives

In this series of exercises, you will explore the following:

· Creation of a Storage Pool.

· Creation and provisioning of a virtual disk to use a Storage Pool.

· Creation of volumes on a Storage Pool.

· Adding additional physical disks to a Storage Pool.

· Implement data deduplication on an existing Storage Pool.

 

Part 1 – Storage Spaces

Create and Attach Storage

  1. Log on to Host Server
  2. In Hyper-V Manager, Create 4 Hard Disks with the following characteristics:Names: disk1.vhd, disk2.vhd, disk3.vhd, disk4.vhd

Default size, Dynamically Expanding

Place these in the <drive> :\Images\Disks folder

Attach the Disks to the Storage Virtual Machine

  1. Right Click the machine named Storage and select Settings.
  2. Select SCSI Controller, in the middle pane, click Hard Drive and click Add.
  3. Browse to <drive> :\Images\Disks and select disk1.vhd and click Apply.
  4. Repeat Steps 3 - 5 to attach disk2.vhd, disk3.vhd and disk4.vhd. Click OK.  

Create a Storage Pool

  1.   Log on to the Storage console as corp\administrator Account.  Password is p@ssw0rd
  2.   Open Server Manager.
  3.   Click File and Storage Services, and then click Storage Pools.
  4.   Under Storage Pools, click Tasks, and then click New Storage Pool.
  5.   Click Next.
  6.   In Name, type Pool1, and then click Next.
  7.   Check PhyscialDisk1, PhyscialDisk2, PhysicalDisk3, and then click Next.
  8.   Click Create, and then click Close.

Create a virtual disk and provision it to use a Storage Pool

  1.   Click Pool1, and then in Virtual Disks, click Tasks, and select New Virtual Disk.
  2.   Click Next.
  3.   Click Next to accept the selection Pool1.
  4.   In Name, type “VirtualDisk1-Parity”, and then click Next.
  5.   In Layout, select Parity, and then click Next.
  6.   In Provisioning type, click Thin, and then click Next.
  7.   In Size, type 1, select “TB”, and then click Next.
  8.   Click Create.
  9.   Click Close. The New Volume Wizard will appear.

Create a Volume on a Storage Pool

  1.   In the New Volume Wizard, click Next.
  2.   Select Disk 5, and click Next.
  3.   Accept the default size, and click Next.
  4.   Continue clicking Next, and click Create.
  5.   Click Close.
  6.   Verify that your new E: volume is there:
  7. Open File Explorer
  8. Click on Computer, and notice your drive’s new volume E: is present and is .99TB in size.
  9.   Close File Explorer.

Add additional physical disks to a Storage Pool

  1. Back in side Server Manager, Right-click Pool1, and then click Add Physical Disk.
  2. Check PhysicalDisk4, and then click OK.
  3. Click Close.

Part 2 – Deduplication

IMPORTANT: You must complete Lab 1 prior to performing this lab.

Installing Deduplication

  1. Log on to Storage as Administrator account.
  2. From the Start Screen, open Windows PowerShell (right click and launch PowerShell as Administrator),
  3. Type the following command and press ENTER:

Get-WindowsFeature *Deduplication* | Install-WindowsFeature

Enable and configure Deduplication on an existing volume

  1. In Windows PowerShell type the following commands, pressing ENTER after each.

Enable-DedupVolume e:

Get-DedupStatus e:

  1. Open Server Manager, or if it is already open, click on the Refresh button in the ribbon at the top of the screen.
  2. Click File and Storage Services.
  3. Click Disks, and then select VirtualDisk1-Parity.
  4. In Volumes, click E: .
  5. Right-click E: , and then click Configure Data Deduplication.
  6. In Deduplicate files older than (in days) , type 0.  Notice that you can also set the Deduplication schedule here as well.
  7. Click OK.

Observing the results of Deduplication

  1. On the Hyperv01 desktop open File Explorer, navigate to E:\images\base, right click and choose to copy the Server2012R2.VHDX, we will paste it somewhere in the following steps.
  2. Still in File Explorer, browse to  [\\192.168.1.11\e$\](file://\\192.168.1.11\e$\) and then paste the file here.  This will take a little bit of time.  Once it is finished, switch back to the Storage console, inside File Explorer check to see that the Server2012R2EVAL file exists.  Now create a folder on the E: drive named COPY, now copy and paste the Server2012R2EVAL file into this new directory such that there are two identical copies of the file present. Note: You are creating two identical files to observe the results of deduplication.
  3. Click Windows PowerShell.   Type:

Start-DedupJob -Type Optimization -Volume E: <ENTER >

Get-Dedupjob <ENTER> Run this command every few minutes until there are no active jobs.  This will take approximately 15 minutes on an SATA-based physical hard drive on a typical laptop.   To this note, this is why scheduling the optimizations may be a good idea if the server is already under significant CPU strain before optimization jobs are running.

Get-DedupStatus <ENTER>

Note: This series of commands will initiate a deduplication of the volume, and save you approximately 8 GB of storage space, which is the size of one of the Server2012R2EVAL files you copied earlier.  Important to note, running virtual machine disk files is not supported in deduplication other than for offline backups, or for live 2012 R2 VDI environments.

Turn off all Virtual Machines.

 

Check back soon for the next labs in the series!

Lab Guide 3 – Windows 2012 R2 – Continuously Available File Shares

Lab Guide 4 – Windows 2012 R2 – Hyper-V Over SMB

Lab Guide 5 – Windows 2012 R2 – Enabling Hyper-V Replica

Lab Guide 6 – Windows 2012 R2 – Shared Nothing Live Migration

 

More Information:

Windows Server 2012 Product Download

https://aka.ms/ws2012r2tplg

Microsoft Virtual Academy

https://aka.ms/tpva

Windows Server 2012 Virtual Labs

https://technet.microsoft.com/en-us/windowsserver/hh968267.aspx

Windows Azure 30-Day Free Trial Page

https://aka.ms/mshosting