Hey there! In this post, we will discuss about the storage policies with respect to VSAN.
Storage policies define the capacity, performance and availability of a VM residing on the vsanDatastore. Once these Storage Policies are assigned to the VM, VM gets deployed based on the requirements mentioned in the storage policy. And how does vCenter know about the underlying storage information? well, that’s when Storage Providers are needed.
A default storage policy gets created when VSAN is enabled on the cluster and this policy is assigned to the single vsanDatastore created. The policies determine how the VM objects are deployed and allocated within the datastore.
Default Storage Policy
- Number of failures to tolerate is set to 1
- Single disk stripe per object
- Thin provisioned virtual disk
Storage Policies are found in the Monitoring Section of the vSphere Web Client Home. Click on that to view or edit the existing Storage Policies. Let’s now look at the different attributes that makes up a Storage Policy.
- Number of disk stripes per object – This determines the minimum number of replicas of a VM objects that must be kept across all the capacity devices. Maximum can be set to 12, higher the number, higher is the number of disks needed and more is the availability. Disk striping does not gaurantee that it stripes data in disks within same host. Internal algorithms are used by VSAN, it stripes in chunks of 1MB
- Number of failures to tolerate – This determines the number of host failures a VM object can sustain. If this is set to n, VM objects are copied in n+1 places. By default VSAN creates a single mirror copy of the vm objects and hence the default value is 1. It is very much possible to set this setting to zero but host experiences delays while entering maintenance mode since it has to evacuate VM objects.
- Object space reservation % – The percentage of logical space that must be reserved for the vmdk. This setting does not necessarily determine if the vmdk will be thin provisioned or thick provisioned. So, is 100% -Thick provision? Not necessarily be, it’s just the VSAN perspective that 100% of the disk is full or occupied.
- Flash read cache reservation – The percentage of logical space of vmdk object that must be reserved as read cache from the flash capacity. The reserved flash read cache capacity cannot be used by any other vm object and this has to be implemented with caution. By default Virtual SAN allocates read cache to vm objects based on the demand. Using this setting on more vm objects wastes the flash capacity and will be unusable for other workloads.
- Force provisioning – Configuring this setting to Yes forces a VM to be provisioned on the vsanDatastore even if the other attributes Number of disk Stripes, Number of failures to tolerate and Flash cache reservation are not satisfied.
- Disable object checksum (VSAN 6.2) – This attribute tells the policy if a checksum has to be calculated during the data copy or vm object replicas, if an error is detected, VSAN is intelligent enough to repair the data or just copy the data again. The default is No, meaning, checksum is calculated.
- IOPS limit for object (VSAN 6.2) – This defines the IOPS limit of a VM object, IOPS is calculated based on a weighted size.
- Failure Tolerance Method (VSAN 6.2) – This defines the data replication method favours capacity or performance. RAID-1 Mirroring for Performance and RAID -5/6 Erasure Coding for Capacity
Now that we have an understanding on what a policy comprises of, let’s begin creating one. From the Monitoring section, click on the Storage Policies. Click on the create new profile icon from there.
This opens up a new Wizard, enter the name of the Policy and click Next. I know my policy name looks stupid 😉
On the next screen you see a what a Rule Set and what it can do. It’s basically set of rules grouped together as sets based on the storage devices we have. A policy can have any number of Rule-Sets. Click Next.
On the Next screen, from the drop down for services, click on VSAN and from the Rules drop down, select the attributes we discussed that you would like to make part of the policy. Add as many as you can based on your infrastructure. Click on Add another rule set if you need a new rule set. If you have tagged your storage devices, you can use the tags to create rules.
As you add rules to the Rule Sets, the Storage consumption model on the right side gives you the estimated disk usage when these are applied. Click Next
On the Next screen, you can see datastores that are compatible with the policy that we just created. Click Next
Review the settings and Click Finish
Once the task completes, the new Storage Policy that we created shows up in the Storage Policies pane.
Before diving in to the details of Storage Providers, here are few things we need to know about the storage providers.
- Storage Providers are software components that keeps vCenter Server updated about the storage capabilities of different tiers.
- VSAN registers a Storage Provider on each host when enabling VSAN on the cluster.
- Only one Storage adapter is active and others are standby, when storage adapter on a host fails, the standby storage adapters on other hosts become active.
- Storage Provider communicates with VSAN layer to report the storage requirements of the virtual machines
VSAN registers Storage providers with a URL on port 8080. We can also see that Storage providers are managed by Profile Based management.
Let’s now try to deploy a VM on vsanDatastore, during the storage selection of the VM, we can now see the Storage Policy that we created earlier. Use the drop down to select the Storage Policy.
Once done. VSAN checks for the compatibility and provides the information amount of storage that will be used for the VM and Flash cache reservations if any.
Hit Next and Finish to complete the process.
Hope this was informative. Thanks!