Tuesday, March 21, 2017

Discover new storage capabilities in Windows Server 2016

Discover new storage capabilities in Windows Server 2016

Objective

In this lab, you will learn about new storage technologies in Windows Server 2016 RTM. These technologies include Storage Spaces Direct, Storage Quality of Service (QoS), and storage resiliency. In this lab, you will:
  • Implement a 4-node failover cluster.
  • Enable Storage Spaces Direct.
  • Create a storage pool.
  • Create storage tiers.
  • Create a Cluster Shared Volume.
  • Create a Scale-Out File Server.
  • Deploy a Nano Server virtual machine that uses the underlying Storage Spaces Direct as the storage for the virtual hard disk.
  • Implement and test Storage QoS.
  • Test resiliency of the Storage Spaces Direct cluster.
  • Test cluster quarantine.

Scenario

New to Windows Server 2016 is Storage Spaces Direct. Storage Spaces Direct is the next iteration of Software Defined Storage that appeared in Windows Server 2012 with Storage Spaces and that introduced the concept of large, scalable, pooled storage using low-cost, industry-standard hardware. In Windows Server 2012, Storage Spaces required the use of Serial Attached SCSI (SAS) devices. Storage Spaces Direct is able to use locally attached SAS, Serial Advanced Technology Attachment (SATA), and NVMe devices. 

Because of the improvements in disk and virtualization technology that are leveraged to enable Storage Spaces Direct, high-performance and shareable storage pools can be created without having to rely on expensive SAN hardware. 

Storage Spaces Direct supports multiple storage tiers in the same storage pool to leverage the different characteristics of the disk devices. For example, fast, flash-based SSDs could act as a cache repository for a capacity tier that uses traditional spinning HDDs. The SSDs are placed in a striped or mirrored space for better performance, while the HDDs are placed in a parity space. 

Resilience and fault tolerance are the result of configuring Storage Spaces as mirror or parity spaces. 

Another improvement in storage that is covered in this lab is Storage QoS. With Windows Server 2016, you can now create centralized policies for Storage QoS. You can create Storage QoS policies on a Scale-Out File Server and then assign these policies to one or more virtual disks.

Virtual Machines

  1. WS2012Router
  2. DC01
  3. VMHost
  4. Compute1
  5. Compute2
  6. File1
  7. File2
  8. File3
  9. File4
  10. SRV01
  11. SRV02

Exercise 1 : Familiarize yourself with the lab environment

The Integrated Digital Lab (IDL) environment you are using to perform this lab has a number of features to help ensure that you complete the steps accurately and get the most out of the lab experience. In this brief exercise, you will familiarize yourself with some of the interactive features used in the IDL lab environment that are designed to promote and realize the learning goals of the lab.

If you are already familiar with the IDL lab environment, please ensure that you perform the first step in this exercise to sign in to DC01 and then click Done to progress through the remaining steps in the exercise to get to the next exercise of the lab: Implement Storage Spaces Direct.
  1. Ensure you are signed in to DC01
    Click the Switch to Machine icon to the right of this instruction to ensure that you are on the DC01 virtual machine. If necessary, sign in as CONTOSO\Administrator using Passw0rd! as the password.
  2. Explore knowledge and automation features
    This Integrated Digital Lab features both knowledge and automation. Whenever you see the Action [Bolt] icon next to text, all or part of the step has been automated, and you can click the Action icon to perform the step. Whenever you see the Knowledge [Bulb in Head] icon, the Alert [Triangle] icon, the Screenshot [Camera] icon, or the Video [Movie Camera] icon, additional information has been provided to enhance your lab experience. Click the Action [Bolt] icon, Knowledge [Bulb in Head] icon, and Screenshot [Camera] icon now.
    This is an alert. Alerts are mandatory elements that will pop up to draw your attention to critical information or to provide warnings.
    This is the Knowledge task enhancement. Although it is used in a variety of ways, its primary purpose is to provide additional information, explanations, and context for the steps you are performing. It is also used to provide tips and to serve as a container for long commands.

    Unlike the Alert task enhancement, the Knowledge task enhancement is not mandatory. The Knowledge element will not pop up when you click on a step in which the element is present; however, the icon will light up and shake to draw your attention to its presence.
    PowerShell -Command "Write-Host 'Nice work, you ran this command.'"
  3. Use the Type Text icon
    Open a Command Prompt window, if one is not already open. Click in the Command Prompt window. Click the Type Text icon to the right of this instruction, and then press ENTER. The network information for DC01 is displayed.
    Whenever you see an instruction to type a text string, such as a Windows PowerShell command, accompanied by the Type Text icon, you can click on the Type Text icon to paste the command to the appropriate window in the virtual machine.
    ipconfig /all
  4. Close all open windows
    Close all open windows.

Exercise 2 : Implement Storage Spaces Direct

Windows Server 2016 introduces Storage Spaces Direct, which enables the cost-effective creation of highly-available storage systems using local storage. In this exercise, you will implement Storage Spaces Direct by first creating a four-node failover cluster. Each of the nodes in the cluster contain four locally attached, virtual SCSI disks. After creating the cluster, you will enable Storage Spaces Direct. You will then create a storage pool that contains all 16 locally attached disks. You will then create two storage tiers: a three-way mirror and a parity space tier. Finally, you will create a virtual disk that spans the 16 locally attached disks on the four nodes, and you will create a Cluster Shared Volume.
  1. Open Windows PowerShell as Administrator
    On the taskbar, right-click Windows PowerShell, and then click Run as Administrator.
  2. Create a failover cluster
    At the Windows PowerShell command prompt, type the following command, and then press ENTER. Alternatively, click the Type Text icon to the right of this instruction.
    New-Cluster -Name VHDStore -staticaddress 10.10.10.101 -Node File1,File2,File3,File4 -NoStorage
    You will see a warning message upon creation of the cluster. This message is displayed because no disks are available for a cluster quorum. In a production environment, you would want to configure either a file share or a cloud witness for the cluster; however, Storage Spaces Direct does not require that you configure a file share or a cloud share witness. As a result, you can safely ignore this warning.

    IMPORTANT: It is necessary for you to create the cluster using the NoStorage parameter option. Otherwise, disks may be added to the cluster that you will need to remove because these disks will not be included in the Storage Spaces Direct pool.

    Storage and network hardware requirements for Storage Spaces Direct: You must have a minimum of three storage nodes with local storage. Storage Spaces Direct uses the network to communicate between the nodes. In a production environment, you should use network cards that support SMB Direct and Remote Direct Memory Access (RDMA) or RDMA over Converged Ethernet (RoCE).
    New-Cluster -Name VHDStore -staticaddress 10.10.10.101 -Node File1,File2,File3,File4 -NoStorage
  3. Open a script in the Windows PowerShell ISE
    At the Windows PowerShell command prompt, type PowerShell_ISE.exe "C:\LabFiles\cleanup-disks.ps1", and then press ENTER.
    The cleanup-disks.ps1 script opens in the Windows PowerShell ISE. This script ensures that that the drives in the VHDStore are empty and contain no partitions.
    PowerShell_ISE.exe "C:\LabFiles\cleanup-disks.ps1"
  4. Ensure the disks are clean
    In the Windows PowerShell ISE, click the Run icon (green right-facing arrow on the menu bar). The expected output is shown in the Screenshot.
    Storage Spaces Direct requires that you use clean disks—the disks need to be empty and have no partitions. If a disk has partitions or data, it will not be included in the Storage Spaces Direct system. The script in this step ensures that the disks are ready to be included in the Storage Spaces Direct system.

    The script ensures that the disks in the newly create VHDStore cluster are empty and contain no partitions. This step is provided as a demonstration only. It is not necessary to run the script in the lab environment.
  5. Close the Windows PowerShell ISE
    Close the Windows PowerShell ISE.
  6. Enable Storages Spaces Direct
    At the Windows PowerShell command prompt, type the following command, and then press ENTER. When prompted to confirm the command, press Y, and then press ENTER.
    Enable-ClusterS2D -CimSession VHDStore -CacheState Disabled -AutoConfig:0
    Typically, you would run a shorter version of this command—for example Enable-ClusterStorageSpacesDirect –CimSession .

    By default, the Enable-ClusterStorageSpacesDirect cmdlet places the storage system in Storage Spaces Direct mode. Unless you override the default behavior, the cmdlet will automatically perform the following tasks.
    • Create a pool: Create a single large pool that is given a name like Storage Spaces Direct on .
    • Configure the Storage Spaces Direct cache: If there is more than one media type available for Storage Spaces Direct use, the cmdlet will configure the most performant storage media as cache devices—read and write in most cases.
    • Create tiers: Create two tiers as default tiers. One is called Capacity and the other called Performance. The cmdlet analyzes the devices and configures each tier with the appropriate mix of device types and resiliency. 
    The switches you use in the command override this default behavior. You are overriding this default behavior so that you can do a manual configuration of the Storage Spaces Direct elements to get a better sense of what is "under the hood".

    The caching mode is set to disabled because the cluster uses one form of storage—HDD. If more than one storage type is included, such as HDD and SSD, or SSD and NVMe, then caching uses the faster of the two storage media.

    Enable-ClusterS2D is an alias for Enable-ClusterStorageSpacesDirect.
    Enable-ClusterS2D -CimSession VHDStore -CacheState Disabled -AutoConfig:0
  7. Create a variable for physical disks
    At the command prompt, type $PD = Get-PhysicalDisk -CanPool $True -CimSession VHDStore, and then press ENTER.
    This command gets all of the physical disks claimed by the VHDStore cluster that are not already in a storage pool and assigns the array of objects to the $PD variable.
    $PD = Get-PhysicalDisk -CanPool $True -CimSession VHDStore
  8. Display the contents of a variable
    At the Windows PowerShell command prompt, type $PD, and then press ENTER. The output should show 16 physical disks, each with a size of 50 GB.
    The contents of the variable show all of the disks that will be brought together through the software storage bus layer such that all the direct attached disk devices for each node will be accessible to all the nodes of the cluster.

    For more information on the software storage bus layer, please see https://blogs.technet.microsoft.com/clausjor/2015/11/19/storage-spaces-direct-under-the-hood-with-the-software-storage-bus/.
    $PD
  9. Create Storage Pool
    At the Windows PowerShell command prompt, type the following command, and then press ENTER.
    New-StoragePool -StorageSubSystemFriendlyName *Cluster* -FriendlyName S2DPool -ProvisioningTypeDefault Fixed -PhysicalDisk $PD -CimSession VHDStore
    A storage pool is a logical construct that is made up of a group of physical disks that can be managed as a single entity. The capacity of the storage pool is the combined value of sizes of the physical disks. There are two kinds of pools.
    • Primordial Pool: The unallocated disks in a storage pool that are available to form a concrete pool. The unallocated disks have the property "CanPool -eq True".
    • Concrete Pool: A collection of physical disks that can be used to create Storage Spaces (virtual disks).

    New-StoragePool -StorageSubSystemFriendlyName *Cluster* -FriendlyName S2DPool -ProvisioningTypeDefault Fixed -PhysicalDisk $PD -CimSession VHDStore
  10. Enter a remote Windows PowerShell session
    At the Windows PowerShell command prompt, type Enter-PSSession VHDStore, and then press ENTER.
    In the previous steps, you have been using the -CimSession parameter to perform remote operations on the VHDStore cluster. In this task, you will connect to a remote session of the VHDCluster to perform management tasks.
    Enter-PSSession VHDStore
  11. Set the media type to HDD
    At the remote Windows PowerShell command prompt, type the following command, and then press ENTER.
    Get-StorageSubsystem *cluster* | Get-PhysicalDisk | Where MediaType -eq "UnSpecified" | Set-PhysicalDisk -MediaType HDD
    Please ensure that you are connected to the VHDStore remote Windows PowerShell session before performing this command. Please see the Screenshot for clarification.
    Storage Spaces Direct supports three different types of attached devices: Non-Volatile Memory Express (NVMe), Serial Attached SCSI (SAS), and Serial Advanced Technology Attachment (SATA). NVMe devices are attached directly to the PCIe bus and provide the fastest speeds. The SATA and SAS devices can be either SSDs or HDDs. All three device types can coexist in the same storage pool used for Storage Spaces Direct.

    Note that removable devices—for example, USB or Firewire attached devices—are not supported for Storage Spaces Direct. All SATA and SAS devices must be attached to a simple SAS Host Bus Adapter (HBA). This means that the devices are not attached to either a RAID or a SATA controller, neither of which is supported.

    Each device must have a unique disk signature and must show a unique device ID. If using an external storage enclosure, the storage enclosure must have a unique ID.

    For more information on hardware options for Storage Spaces Direct, please see https://blogs.technet.microsoft.com/clausjor/2015/11/23/hardware-options-for-evaluating-storage-spaces-direct-in-technical-preview-4/.
    Get-StorageSubsystem *cluster* | Get-PhysicalDisk | Where MediaType -eq "UnSpecified" | Set-PhysicalDisk -MediaType HDD 
  12. Define a variable for the Storage Pool
    At the remote Windows PowerShell command prompt, type $Pool = Get-StoragePool S2DPool and then press ENTER.
    $Pool = Get-StoragePool S2DPool
  13. Create a performant storage tier
    At the remote Windows PowerShell command prompt, type the following command, and then press ENTER.
    New-StorageTier -StoragePoolUniqueID ($pool).UniqueID -FriendlyName Performance -MediaType HDD -ResiliencySettingName Mirror
    Windows Server 2016 supports Multi-Resiliency Virtual Disks. This feature allows one virtual disk to include two different resiliency types—for example, a three-way mirror and parity. This allows you to optimize writes for performance and, in the background, convert to parity when needed to optimize physical disk usage.

    The mirror storage type provides protection against failure of one (two-way mirror) or two (three-way mirror) physical disks; however, disk utilization is not efficient compared to other storage types. Data to disk usage is 2:1 for a two-way mirror and 3:1 for a three-way mirror.

    In the next step, you will create the capacity tier—parity resiliency type.
    New-StorageTier -StoragePoolUniqueID ($pool).UniqueID -FriendlyName Performance -MediaType HDD -ResiliencySettingName Mirror
  14. Create a capacity storage tier
    At the remote Windows PowerShell command prompt, type the following command, and then press ENTER.
    New-StorageTier -StoragePoolUniqueID ($pool).UniqueID -FriendlyName Capacity -MediaType HDD -ResiliencySettingName Parity
    A parity storage type is similar to RAID 5, in which computation is used to recover data from a failed disk. Because a parity calculation needs to be made for every write to the disk, it offers lower write performance than simple or mirrored resiliency types. As such, parity resiliency types are best suited for workloads that are almost exclusively read based.

    The parity storage types offers better disk utilization than the mirrored storage type.

    For more information on this topic, please see http://social.technet.microsoft.com/wiki/contents/articles/15200.storage-spaces-designing-for-performance.aspx.
    New-StorageTier -StoragePoolUniqueID ($pool).UniqueID -FriendlyName Capacity -MediaType HDD -ResiliencySettingName Parity
  15. Create a new volume
    At the remote Windows PowerShell command prompt, type the following command, and then press ENTER.
    New-Volume -StoragePool $pool -FriendlyName DistributedVol -FileSystem CSVFS_REFS -StorageTierFriendlyNames Performance, Capacity -StorageTierSizes 100GB, 300GB
    The New-Volume cmdlet brings together many operations that would otherwise have to be performed by using individual cmdlets. In fact, this cmdlet could have been used to create the two storages tiers you created earlier in separate tasks.
    New-Volume -StoragePool $pool -FriendlyName DistributedVol -FileSystem CSVFS_REFS -StorageTierFriendlyNames Performance, Capacity -StorageTierSizes 100GB, 300GB
  16. Exit the remote session
    At the remote Windows PowerShell command prompt, type Exit, and then press ENTER.
    Please ensure you perform this step; otherwise a subsequent step might fail.
  17. Open Cluster Manager
    On the Start menu, click Failover Cluster Manager.
    In this and subsequent steps, you will visually confirm that the Cluster Shared Volume you created in the previous step is online.
    start Cluadmin.msc
  18. Connect to the cluster
    In the Failover Cluster Manager console, in the Actions pane, click Connect to Cluster. In the Select Cluster dialog box, type vhdstore, and then click OK.
  19. View the Cluster Shared Volume
    In the Failover Cluster Manager console, expand VHDStore.contoso.com / Storage, and then click Disks. The Cluster Shared Volume appears in the details pane. It should show a status of Online, as shown in the Screenshot.
  20. Leave the console open
    Leave the Failover Cluster Manager console open for the next exercise.
Congratulations! You have enabled Storage Spaces Direct. In the next exercise, you will create a Scale-Out File Server and configure a share that will be used for VHD storage.

Exercise 3 : Create a highly available file server on Storage Spaces Direct

Storage Spaces Direct supports two deployment models: converged and hyper-converged. In a converged deployment, the storage and the compute layer are separated—the Hyper-V component runs on a separate computer or cluster from the clustered storage. In a hyper-converged deployment, both the compute and storage components run on the same cluster—both the Hyper-V and Storage Spaces Direct components run on all of the nodes of the cluster. This reduces costs even further, but at the expense of being able to scale compute or storage independently.

In this exercise, you will create a new Scale-Out File Server that uses storage provided by Storage Spaces Direct. The Scale-Out File Server will provide the storage repository for the VHD files that will be used by the compute layer (Hyper-V servers).
  1. Ensure you are in Failover Cluster Manager
    Ensure that you are in the Failover Cluster Manager console.
  2. Launch the Role Wizard
    Under VHDStore.contoso.com, click Roles, and then in the Actions pane, click Configure Role.
  3. Click Next
    On the Before You Begin page, click Next.
  4. Select the File Server role
    On the Select Role page, click File Server, and then click Next.
  5. Select the file server type
    On the File Server Type page, click Scale-Out File Server for application data, and then click Next.
    The Scale-Out File Server provides the storage repository.
  6. Name the file server
    On the Client Access Point page, in Name, type SMBStore1, and then click Next.
  7. Complete the wizard
    On the Confirmation page, click Next, and then on the Summary page, click Finish.
  8. Flush the DNS cache
    Switch to the Windows PowerShell Command Prompt window. At the Windows PowerShell command prompt, type ipconfig /flushdns, and then press ENTER.
    You are performing this step to ensure that you can perform the next step without an error occurring.

    IMPORTANT: Please ensure you are connected to a local Windows PowerShell Command Prompt window, as shown in the Screenshot.
    ipconfig /flushdns
  9. Launch the File Share Wizard
    Switch to Failover Cluster Manager. Click SMBStore1, and then in the Actions pane, click Add File Share. 
    Please ensure that you perform the command in a local, not a remote, Windows PowerShell Command Prompt window.
    If an error is displayed, please perform the previous step again.
  10. Select the profile
    On the Select the profile for this share page, click SMB Share – Applications, and then click Next.
  11. Accept the location
    On the Select the server and path for this share page, accept the default settings, and then click Next.
  12. Name the share
    On the Specify share name page, in Share name, type VHD, and then click Next.
  13. Accept the default settings
    On the Configure share settings page, click Next to accept the default settings.
  14. Configure permissions
    Click Customize Permissions, click Add, and then click Select a principal.
  15. Select the ComputeHosts group
    In the Select User, Computer, Service Account, or Group dialog box, type ComputeHosts, and then click OK.
  16. Assign full control
    Under Basic permissions, select Full control, click OK, and then click OK.
  17. Advance the wizard
    On the Specify permissions to control access page, click Next.
  18. Complete wizard
    On the Confirmation selections page, click Create, and then on the Results page, click Close.
  19. Configure credential delegation
    Switch to the Windows PowerShell ISE window, type Enable-SMBDelegation -SMBServer SMBStore1 -SMBClient Compute1, and then press ENTER.
    Enable-SMBDelegation -SMBServer SMBStore1 -SMBClient Compute1
Congratulations! You have created the storage layer by using a Scale-Out File Server role. In the next exercise, you will complete the configuration on the compute layer by adding a workload that uses the storage layer to the Hyper-V servers.

Exercise 4 : Deploy a workload to the Storage Spaces Direct file server

In this exercise, you will configure the compute layer by deploying a new workload to a separate Hyper-V server that uses the storage on the Storage Spaces Direct server SMBStore1. This workload is a Nano Server workload that will function as a file server, storing user profile data. The Nano server VHDX file has already been created. You will configure and manage the virtual machine, as well as create a user profile file share.
  1. Copy a VHD to a file share
    On the DC01 virtual machine, at the Windows PowerShell command prompt, type copy c:\LabFiles\NanoWorkload.vhd \\smbstore1\vhd, and then press ENTER.
    Copy c:\LabFiles\NanoWorkload.vhd \\smbStore1\VHD
  2. Create a workload virtual machine
    At the Windows PowerShell command prompt, type New-VM -ComputerName Compute1 -Name NanoWorkload -MemoryStartupBytes 256MB -SwitchName External -VHDPath \\smbstore1\vhd\nanoworkload.vhd -Generation 1 -Path C:\VMStore, and then press ENTER.
    New-VM -ComputerName Compute1 -Name NanoWorkload -MemoryStartupBytes 256MB -SwitchName External -VHDPath \\smbstore1\vhd\nanoworkload.vhd -Generation 1 -Path C:\VMStore
  3. Start the NanoWorkload virtual machine
    At the Windows PowerShell command prompt, type Start-VM -ComputerName Compute1 -Name NanoWorkload, and then press ENTER.
    Wait a minute for the virtual machine to finish booting.
    Start-VM -ComputerName Compute1 -Name NanoWorkload
  4. Flush the DNS cache
    At the Windows PowerShell command prompt, type ipconfig /flushdns, and then press ENTER.
    ipconfig /flushdns 
  5. Ping NanoWorkload
    At the Windows PowerShell command prompt, type ping nanoworkload, and then press ENTER. If the ping command fails, repeat the previous step and this step. Do not proceed to the next step until you can verify that the NanoWorkload virtual machine responds to pings.
    ping nanoworkload 
  6. Enable the File Services feature
    At the Windows PowerShell command prompt, type ICM NanoWorkload {DISM /Online /Enable-Feature /FeatureName:File-Services}, and then press ENTER.
    For detailed information on how to create, provision, and manage Nano Server images, please see https://technet.microsoft.com/en-us/windows-server-docs/compute/nano-server/getting-started-with-nano-server.
    icm nanoworkload {dism /online /enable-feature /featurename:File-services}
  7. Enable data deduplication
    At the Windows PowerShell command prompt, type ICM NanoWorkload {DISM /Online /Enable-Feature /FeatureName:Dedup-Core}, and then press ENTER.
    ICM NanoWorkload {dism /online /enable-feature /featurename:dedup-core}
  8. Open Server Manager
    On the taskbar, click Server Manager.
    You may see some warning messages in the Server Manager console. You can safely ignore these messages.
    servermanager.exe
  9. Open all servers
    Click All Servers.
  10. Add a server
    Click Manage, and then click Add Servers.
  11. Find and add NanoWorkload
    Click Find Now, double-click NanoWorkload, and then click OK.
  12. Open File and Storage Services
    In Server Manager, click File and Storage Services, and then click Shares.
  13. Start the New Share Wizard
    In the Shares tiles, on the Tasks menu, click New Share.
  14. Select the profile
    On the Select the profile for this share page, click SMB Share - Applications, and then click Next.
  15. Select the NanoWorkload server
    On the Select the server and path for this share page, click NanoWorkload, and then click Next
  16. Name the share
    In Share name, type Profiles, and then click Next.
  17. Complete the wizard
    Click Next until you reach the end of the wizard, click Create, and then click Close.
  18. Test the share
    In File Explorer, navigate to \\NanoWorkload\Profiles.
Congratulations! You have successfully deployed a converged Storage Spaces Direct cluster. In the next exercise, you will implement and test centralized QoS storage policies.

Exercise 5 : Implement Storage QoS

Storage Quality of Service in Windows Server 2016 provides a way to centrally monitor and manage storage performance for virtual machines that use the Hyper-V and the Scale-Out File Server roles. The feature automatically improves storage resource fairness between multiple virtual machines using the same file server cluster and allows specific minimum and maximum performance goals to be configured in units of normalized IOPs.
  1. Configure the interface
    Configure the user interface on DC1 so that you have two Windows PowerShell Command Prompt windows open. One will be the command window, the other the copy window.
  2. Copy files
    In the Windows PowerShell Command Prompt window you designate as your command window, type Robocopy C:\Windows\System32\Drivers \\NanoWorkload\Profiles\Drivers, and then press ENTER.

    Note the speed of the copy, and the time taken to copy all files.
    Robocopy C:\Windows\System32\Drivers \\NanoWorkload\Profiles\Drivers
  3. Delete files in the destination
    In your command window, type remove-item \\nanoworkload\profiles\drivers -recurse, and press ENTER.
    remove-item \\nanoworkload\profiles\drivers -recurse
  4. View Storage QoS statistics
    In your command window, type Get-StorageQOSFlow -cimsession File1 | FL, and then press ENTER.

    Note that no polices are in effect.
    Get-StorageQOSFlow -cimsession File1 | FL
  5. Create a Storage QoS policy
    In your command window, type $StoragePolicy = New-StorageQOSPolicy -Name Slow -PolicyType Dedicated -MaximumIops 10 -cimsession File1, and then press ENTER.
    Each policy specifies a reserve (minimum) and a limit (maximum) to be applied to a collection of data flows. These data flows can include a virtual hard disk, a single virtual machine or a group of virtual machines, a service, or a tenant.
    $StoragePolicy = New-StorageQOSPolicy -Name Slow -PolicyType Dedicated -MaximumIops 10 -cimsession File1
  6. List the policies
    In your command window, type Get-StorageQOSPolicy -cimsession File1, and then press ENTER.
    Get-StorageQOSPolicy -cimsession File1
  7. Assign the Storage QoS policy
    In your command window, type Get-VM -Computer Compute1 -Name NanoWorkload | Get-VMHardDiskDrive | Set-VMHardDiskDrive -QosPolicy $StoragePolicy, and then press ENTER.
    Get-VM -Computer Compute1 -Name NanoWorkload | Get-VMHardDiskDrive | Set-VMHardDiskDrive -QosPolicy $StoragePolicy
  8. View Storage QoS statistics
    In your command window, type Get-StorageQOSFlow -cimsession File1 | FL, and then press ENTER.

    Note that the NanoWorkload initiator has been limited to 10 IOPS.
    Get-StorageQOSFlow -cimsession File1 | FL
  9. Test Storage QoS
    In the Windows PowerShell Command Prompt window you designate as your copy window, type Robocopy C:\Windows\System32\Drivers \\NanoWorkload\Profiles\Drivers, and then press ENTER.

    Note the speed of the copy, and the time taken to copy all files.
    The file copy will take upwards of 30 minutes to complete. Leave the copy running and move to the next step.
    Robocopy C:\Windows\System32\Drivers \\NanoWorkload\Profiles\Drivers
  10. View Storage QoS statistics
    In your command window, type Get-StorageQOSFlow -cimsession File1 | FL, and then press ENTER.

    Note the value of StorageNodeIOPS. This value will be close to the assigned limit of 10.
    Get-StorageQOSFlow -cimsession File1 | FL
  11. Remove Storage QoS
    In your command window, type Get-VM -Computer Compute1 -Name NanoWorkload | Get-VMHardDiskDrive | Set-VMHardDiskDrive -QosPolicy $Null, and then press ENTER.

    Notice that the copy speeds up after a brief period.
    When the Storage QoS policy is removed, you may see a message indicating that the semaphore time out period has expired. After this message appears, the file copy will resume at the default rate after 30 seconds.
    Get-VM -Computer Compute1 -Name NanoWorkload | Get-VMHardDiskDrive | Set-VMHardDiskDrive -QosPolicy $Null
  12. Delete files in the destination
    At the Windows PowerShell command prompt, type remove-item \\nanoworkload\profiles\drivers -recurse, and then press ENTER.
    remove-item \\nanoworkload\profiles\drivers -recurse
Congratulations. You have successfully implemented and tested storage QoS policies. In the next exercise, you will test the resilience of the Storage Spaces Direct clustered storage.

Exercise 6 : Verify storage resiliency and cluster quarantine

In this exercise, you will validate the functionality of two key storage fabric features. Storage resiliency ensures that a virtual machine does not crash (also known as blue screen) and restart upon a temporary storage failure, requiring a lengthy and sometimes issue-prone restart of services and workloads. Upon storage failure, the virtual machine will pause and then will resume when storage is returned. Cluster quarantine will flag a cluster node and place it in a quarantine state when three concurrent failures are detected. The cluster node must be manually removed from quarantine by the administrator and then returned to service.
  1. Configure your screen
    Position your screen so that you have both Windows PowerShell and Failover Cluster Manager visible at all times.

    In Failover Cluster Manager, ensure that the Nodes node is selected, and that you can see all four File nodes.
    You can use the Show windows staked command. Right-click the taskbar, and then click Show windows staked.
  2. Fail a node
    At the Windows PowerShell command prompt, type ICM File3 {Stop-Process -name clussvc -Force}, and then press ENTER.
    ICM File3 {Stop-Process -name clussvc -Force}
  3. Observe automatic node recovery
    Observe that the cluster service recovers after about 30 seconds. The cluster service will automatically restart on failure.
  4. Repeat failure
    Press the Up Arrow key in Windows PowerShell to locate the command you issued to stop the clussvc process. Run that command a second time, and then observe the recovery. You can also use the Execute Action button in the previous step to send the command a second time.
  5. Trigger quarantine
    Run the stop-process command a third time.
    Observe that File3 is now placed in quarantine.
  6. Start the Cluster Service
    In Failover Cluster Manager, right-click File3, click More Actions, and then click Start Cluster Service.
  7. Open Hyper-V Manager
    On the Start menu, click Hyper-V Manager. In Hyper-V Manager, click COMPUTE1.
  8. Configure your screen
    Position your screen so that Hyper-V Manager and Windows PowerShell are visible. Ensure you can see the State column of the NanoWorkload virtual machine.
  9. Trigger a storage failure
    At the Windows PowerShell command prompt, type Get-ClusterGroup -Cluster vhdstore -Name SMBStore1 | Stop-ClusterGroup, and then press ENTER.
    Get-ClusterGroup -Cluster vhdstore -Name SMBStore1 | Stop-ClusterGroup
  10. Generate storage activity
    In Windows PowerShell, type copy c:\windows\System32\Drivers\ \\NanoWorkload\Profiles\ -Recurse -verbose, and then press ENTER.
    Some copy operations will complete due to caching in memory, and then the process will pause.
    copy c:\windows\System32\Drivers\ \\NanoWorkload\Profiles\ -Recurse -verbose
  11. Observe storage resiliency
    Note that after a brief period, the NanoWorkload virtual machine is placed in a Paused-Critical state.
    It may take a while before the virtual machine reflects the storage failure. You may have to refresh the display.
  12. Recover the storage
    Open a second Windows PowerShell Command Prompt window, type Get-ClusterGroup -Cluster vhdstore -Name SMBStore1 | Start-ClusterGroup, and then press ENTER.
    Note that the copy command may or may not complete depending on how long it took you to type the commands. Storage resiliency prevents rebooting of virtual machines with storage interruptions by pausing the virtual machine. This pause action may still cause individual connections to time out or reset.
    Get-ClusterGroup -Cluster vhdstore -Name SMBStore1 | Start-ClusterGroup
  13. Complete the lab
    Click Done to finalize and close the lab environment.
Congratulations! You have tested storage resiliency and cluster quarantine and have completed the lab.

No comments: