If one doesn't already exist, you can write a custom storage allocator to handle this scenario.
> On Sep 8, 2016, at 4:25 PM, Yiping Zhang <yzh...@marketo.com> wrote: > > Hi, Devs: > > We all know how (anti)-host affinity group works in CloudStack, I am > wondering if there is a similar concept for (anti)-storage affinity group? > > The use case is as this: in a setup with just one (somewhat) unreliable > primary storage, if the primary storage is off line, then all VM instances > would be impacted. Now if we have two primary storage volumes for the > cluster, then when one of them goes offline, only half of VM instances would > be impacted (assuming the VM instances are evenly distributed between the two > primary storage volumes). Thus, the (anti)-storage affinity groups would > make sure that instance’s disk volumes are distributed among available > primary storage volumes just like (anti)-host affinity groups would > distribute instances among hosts. > > Does anyone else see the benefits of anti-storage affinity groups? > > Yiping