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
- WS2012Router
- DC01
- VMHost
- Compute1
- Compute2
- File1
- File2
- File3
- File4
- SRV01
- 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.
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.
- Ensure you are signed in to DC01Click 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.
- Explore knowledge and automation featuresThis 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.'"
- Use the Type Text iconOpen 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
- Close all open windowsClose 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.
- Open Windows PowerShell as AdministratorOn the taskbar, right-click Windows PowerShell, and then click Run as Administrator.
- Create a failover clusterAt 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
- Open a script in the Windows PowerShell ISEAt 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"
- Ensure the disks are cleanIn 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. - Close the Windows PowerShell ISEClose the Windows PowerShell ISE.
- Enable Storages Spaces DirectAt 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 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
- Create a pool: Create a single large pool that is given a name like Storage Spaces Direct on
- Create a variable for physical disksAt 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
- Display the contents of a variableAt 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
- Create Storage PoolAt 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
- Enter a remote Windows PowerShell sessionAt 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
- Set the media type to HDDAt 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
- Define a variable for the Storage PoolAt the remote Windows PowerShell command prompt, type $Pool = Get-StoragePool S2DPool and then press ENTER.
$Pool = Get-StoragePool S2DPool
- Create a performant storage tierAt 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
- Create a capacity storage tierAt 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
- Create a new volumeAt 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, 300GBThe 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
- Exit the remote sessionAt the remote Windows PowerShell command prompt, type Exit, and then press ENTER.Please ensure you perform this step; otherwise a subsequent step might fail.
- Open Cluster ManagerOn 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
- Connect to the clusterIn 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.
- View the Cluster Shared VolumeIn 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.
- Leave the console openLeave 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).
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).
- Ensure you are in Failover Cluster ManagerEnsure that you are in the Failover Cluster Manager console.
- Launch the Role WizardUnder VHDStore.contoso.com, click Roles, and then in the Actions pane, click Configure Role.
- Click NextOn the Before You Begin page, click Next.
- Select the File Server roleOn the Select Role page, click File Server, and then click Next.
- Select the file server typeOn 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.
- Name the file serverOn the Client Access Point page, in Name, type SMBStore1, and then click Next.
- Complete the wizardOn the Confirmation page, click Next, and then on the Summary page, click Finish.
- Flush the DNS cacheSwitch 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
- Launch the File Share WizardSwitch 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.
- Select the profileOn the Select the profile for this share page, click SMB Share – Applications, and then click Next.
- Accept the locationOn the Select the server and path for this share page, accept the default settings, and then click Next.
- Name the shareOn the Specify share name page, in Share name, type VHD, and then click Next.
- Accept the default settingsOn the Configure share settings page, click Next to accept the default settings.
- Configure permissionsClick Customize Permissions, click Add, and then click Select a principal.
- Select the ComputeHosts groupIn the Select User, Computer, Service Account, or Group dialog box, type ComputeHosts, and then click OK.
- Assign full controlUnder Basic permissions, select Full control, click OK, and then click OK.
- Advance the wizardOn the Specify permissions to control access page, click Next.
- Complete wizardOn the Confirmation selections page, click Create, and then on the Results page, click Close.
- Configure credential delegationSwitch 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.
- Copy a VHD to a file shareOn 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
- Create a workload virtual machineAt 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
- Start the NanoWorkload virtual machineAt 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
- Flush the DNS cacheAt the Windows PowerShell command prompt, type ipconfig /flushdns, and then press ENTER.
ipconfig /flushdns
- Ping NanoWorkloadAt 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
- Enable the File Services featureAt 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}
- Enable data deduplicationAt 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}
- Open Server ManagerOn the taskbar, click Server Manager.You may see some warning messages in the Server Manager console. You can safely ignore these messages.
servermanager.exe
- Open all serversClick All Servers.
- Add a serverClick Manage, and then click Add Servers.
- Find and add NanoWorkloadClick Find Now, double-click NanoWorkload, and then click OK.
- Open File and Storage ServicesIn Server Manager, click File and Storage Services, and then click Shares.
- Start the New Share WizardIn the Shares tiles, on the Tasks menu, click New Share.
- Select the profileOn the Select the profile for this share page, click SMB Share - Applications, and then click Next.
- Select the NanoWorkload serverOn the Select the server and path for this share page, click NanoWorkload, and then click Next
- Name the shareIn Share name, type Profiles, and then click Next.
- Complete the wizardClick Next until you reach the end of the wizard, click Create, and then click Close.
- Test the shareIn 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.
- Configure the interfaceConfigure 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.
- Copy filesIn 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
- Delete files in the destinationIn your command window, type remove-item \\nanoworkload\profiles\drivers -recurse, and press ENTER.
remove-item \\nanoworkload\profiles\drivers -recurse
- View Storage QoS statisticsIn 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
- Create a Storage QoS policyIn 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
- List the policiesIn your command window, type Get-StorageQOSPolicy -cimsession File1, and then press ENTER.
Get-StorageQOSPolicy -cimsession File1
- Assign the Storage QoS policyIn 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
- View Storage QoS statisticsIn 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
- Test Storage QoSIn 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
- View Storage QoS statisticsIn 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
- Remove Storage QoSIn 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
- Delete files in the destinationAt 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.
- Configure your screenPosition 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. - Fail a nodeAt the Windows PowerShell command prompt, type ICM File3 {Stop-Process -name clussvc -Force}, and then press ENTER.
ICM File3 {Stop-Process -name clussvc -Force}
- Observe automatic node recoveryObserve that the cluster service recovers after about 30 seconds. The cluster service will automatically restart on failure.
- Repeat failurePress 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.
- Trigger quarantineRun the stop-process command a third time.
Observe that File3 is now placed in quarantine. - Start the Cluster ServiceIn Failover Cluster Manager, right-click File3, click More Actions, and then click Start Cluster Service.
- Open Hyper-V ManagerOn the Start menu, click Hyper-V Manager. In Hyper-V Manager, click COMPUTE1.
- Configure your screenPosition your screen so that Hyper-V Manager and Windows PowerShell are visible. Ensure you can see the State column of the NanoWorkload virtual machine.
- Trigger a storage failureAt 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
- Generate storage activityIn 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
- Observe storage resiliencyNote 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.
- Recover the storageOpen 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
- Complete the labClick Done to finalize and close the lab environment.
Congratulations! You have tested storage resiliency and cluster quarantine and have completed the lab.
No comments:
Post a Comment