#VCP
## Use case
Balancing datastore use across multiple Datastores inside a Storage DRS Cluster using storage vMotion either throughout operation or when migrating a VM to the Cluster.
Storate DRS is taking account multiple Performance indicators.
- Capacity
- IO balance
- Rule enforcement
- affinity/anti-affinity like in [[vSphere - DRS.md]]
- disks staying together
- can be activated/deactivated in settings
## Requirements
- Shared datastores on all participating hosts
- Datastores of the same type (Flash, SAN)
- storage vMotion capabilites through network.
## Rulesets
- affinity/anti affinity
- for redundancy sake e.g. "if one datastore goes down not all DCs should reside on a single Datastore"
- keeping applications on the same datastore for latency
- keeping VMDKs together
- should be enabled usually, we do not want split up VMDKs but can be usefull especially for large VMDKs
## Threshold
Storage DRS can be configured on multiple thresholds. Storage DRS will act upon these thresholds once exceeded.
### I/O
I/O Metrics must be enabled for this. Storage A latency threshold can be configured for Storage DRS.
Threshold is defined in ms of latency from the VM to storage.
E.g. 20ms, meaning if a VM has a I/O latency of 20ms or more on a datastore, Storage DRS will try to migrate the VM to a datastore with less latency.
### Space threshold
Storage DRS will look at the utilized space of a Datastore and will storage vMotion the VM off the datastore when the threshold is exceeded.
Threshold can be configured either as Utilized space in % (e.g. migrate VMs off the datastore if the utilization exceeds 80%)
or with minimum free space (e.g. 100GB must be unutilzed on the datastore, otherwise migrate VMs off the datastore.)
## Automation
Automation policy is first set on a cluster level either to Fully automated or disabled and can then be overridden for each subcategory.
### Automation levels
- Fully automated
- Storage DRS will automatically balance the datastores based on the Indicators/Thresholds and defined rules. No user interaction required.
- No automation (Manual mode)
- Storage DRS will send recommendations based on Indicators/Thresholds and defined rules but not act without user input
- Use cluster settings (subcategory)
- use whatever is defined on the cluster level.
### Sub categories
- Space balance automation
- based on the space balance indicators and threshold
- I/O balance automation level
- based on I/O indicators and threshold
- Rule enforcement automation level
- based on defined affinity/anti-affinity rules.
## 🔗Resources