• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Yellow Bricks

by Duncan Epping

  • Home
  • ESXTOP
  • Stickers/Shirts
  • Privacy Policy
  • About
  • Show Search
Hide Search

Setting the default affinity rule for Storage DRS

Duncan Epping · Feb 7, 2012 ·

On my blog article for yesterday “Rob M” commented that the default affinity rule for Storage DRS (SDRS), keep VM files together, did not make sense to him. One of the reasons this affinity rule is set is because customers indicated that from an operational perspective it would be easier if all files of a given VM (vmx / vmdk’s) would reside in the same folder. Especially troubleshooting was one of the main reasons, as this lowers complexity. I have to say that I fully agree with this, I’ve been in the situation where I needed to recover virtual machines and having them spread across multiple datastore really complicates things.

But, just like Rob, you might not agree with this and rather have SDRS handling balancing on a file per file basis. That is possible and we documented this procedure in our book. I was under the impression that I blogged this, but just noticed that somehow I never did. Here is how you change the affinity rule for the current provisioned VMs in a datastore cluster:

  1. Go to Datastores and Datastore Clusters
  2. Right click a datastore cluster and select “edit settings”
  3. Click “Virtual machine settings”
  4. Deselect “Keep VMDKs together”
    1. For virtual machines that need to stick together you can override the default by ticking the tick box next to the VM


Also check out this article by Frank about DRS/SDRS affinity rules, useful to know!

Related

Server 5.0, sdrs, storage drs, VMware, vSphere

Reader Interactions

Comments

  1. Robert says

    7 February, 2012 at 17:58

    We’ve had trouble with snapshots when the vmx and vmdk (just the primary, it seems) aren’t on the same datastore. I had wanted to let SDRS be as efficient as it could be, not realizing it wasn’t as smart as it could be. Generally we’ve got separate file share and SQL datastores for extra drives, so any issue with keeping the drives together in our OS datastores was quite minimized, especially given the small number of additional OS drives and the issues we had snapping separate vmx/vmdks. Keeping them together is an easy fix. Having separate datastores for your other types of storage (which would probably want different types of storage qualities anyway, right?) makes it even easier to do that.

  2. Adeline says

    8 February, 2012 at 13:02

    On our VMware infrastrucutre, we have different storage class. One VM can have disk on the gold class and another disk to the silver class for example.
    So I think to create one cluster by class.
    Did you know how Storage DRS manage that ? Can I keep this configuration on my virtual machines ? If I choose to keep VMDKS together, do I have all my vmdk on the same “storage cluster” ? Or I will still have vmdk in gold class together and vmdk in silver class together ?

  3. Duncan Epping says

    8 February, 2012 at 13:17

    @Adeline: you can create Datastore Clusters per storage tier and select the right datastore cluster for your Disk. Then Storage DRS will not keep them together.

  4. Robby says

    6 September, 2012 at 23:11

    Is there a way to change this setting on a per-VM basis with the PowerCLI?

  5. kennyd says

    25 January, 2013 at 04:16

    we have vfast on the SAN side and we run SDRS as well. We have it in manual mode, so it does recommendations every once in a while. That is what we have read to keep SDRS in because we have vfast on the SAN side. Would there be any other recommendations perhaps in the SDRS arena?

    Storage on the SAN is as follows: sata > fibre > efd – initial placement is fibre.

    • Duncan Epping says

      25 January, 2013 at 15:40

      No there are no other recommendations with regards to using EMC Fast. Running it in manual mode is the way to go.

  6. Alastair says

    4 April, 2013 at 07:15

    this setting, when applied as per your image, does not apply as the DEFAULT in vSphere 5.0 datastore clusters.

    I untick the box, it unticks all the current VM’s, but when i build a new VM it again has the default “keep vmdk’s together” affinity rule applied.

    do you know how to apply the DEFAULT setting? Other blogs have shown using the web client to adjust the default but i don’t see this option in 5.0 web client. Maybe this only works in 5.1?

    • Travis Quinnelly says

      4 September, 2013 at 15:08

      I have the same problem in my environment and I’ve googled to no avail.

      Does anyone know how to change this default behavior?

  7. Jay says

    10 September, 2013 at 15:33

    FYI, There was a KB just published regarding the default behavior of the sDRS rules:

    Storage DRS keeps VMDKs together and does not allocate to most optimal datastore
    http://kb.vmware.com/selfservice/documentLinkInt.do;jsessionid=670271A54AADDE32ED430492794DEA44?micrositeID=null&externalID=2053792

Primary Sidebar

About the author

Duncan Epping is a Chief Technologist in the Office of CTO of the Cloud Platform BU at VMware. He is a VCDX (# 007), the author of the "vSAN Deep Dive", the “vSphere Clustering Technical Deep Dive” series, and the host of the "Unexplored Territory" podcast.

Upcoming Events

May 24th – VMUG Poland
June 1st – VMUG Belgium
Aug 21st – VMware Explore
Sep 20th – VMUG DK
Nov 6th – VMware Explore
Dec 7th – Swiss German VMUG

Recommended Reads

Sponsors

Want to support Yellow-Bricks? Buy an advert!

Advertisements

Copyright Yellow-Bricks.com © 2023 · Log in