# Attach different datastore to different VMs within cluster

**URL:** <https://forum.opennebula.io/t/attach-different-datastore-to-different-vms-within-cluster/1999>\
**Category:** Product Support\
**Created:** [March 27, 2016, 9:58pm UTC](https://forum.opennebula.io/t/attach-different-datastore-to-different-vms-within-cluster/1999 "2016-03-27T21:58:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![maziyar](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/maziyar/32/4657_2.png) [@maziyar](https://forum.opennebula.io/u/maziyar)\
**Post date:** [March 27, 2016, 9:58pm UTC](https://forum.opennebula.io/t/attach-different-datastore-to-different-vms-within-cluster/1999/1 "2016-03-27T21:58:30Z")

</div>

Hello,

I have a question about different datastore types. I have some SSD disks in one of my hosts. I created a datastore (image) with path to mounted SSD raid. Then I created a DATABLOCK in this datastore. Everything fine I can see it created in this path. Now when I attach this to running VM it works fine but I see it copies the entire file inside my system datastore. Also I check the read/write IOPS which also falls on system datastore not the SSDs.

Question1: is this behavior normal that always copies of the images will store and run from system datastore or I missed configure something in my disk/format type?

Question2: If this is a normal behavior, what are the best practices to take advantage of faster disks and different datastore types by simply creating persistence DATABLOCK images and attaching them to specific VMs. I need these on some of my VMs running database.

Best,  
Maziyar

---

<div class="post-metadata">

**Author:** ![maziyar](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/maziyar/32/4657_2.png) [@maziyar](https://forum.opennebula.io/u/maziyar)\
**Post date:** [March 28, 2016, 3:38pm UTC](https://forum.opennebula.io/t/attach-different-datastore-to-different-vms-within-cluster/1999/2 "2016-03-28T15:38:13Z")

</div>

Ok, I followed a [blog post](http://opennebula.org/opennebula-4-4-multiple-system-datastore-with-storage-load-balancing/) about multiple file systems with the exact situation (local SSD and shared ntfs).

I added this line to my VM template:

SCHED\_DS\_REQUIREMENTS NAME = “ssd\_system”

Which ssd\_system:

DATASTORE 158 INFORMATION  
ID : 158  
NAME : ssd\_system  
USER : maziyar  
GROUP : oneadmin  
CLUSTER : Multivac  
TYPE : SYSTEM  
DS\_MAD : -  
TM\_MAD : shared  
BASE PATH : /ssd-test/ssd/158  
DISK\_TYPE : FILE  
STATE : READY

DATASTORE CAPACITY  
TOTAL: : 37.8T  
FREE: : 35.9T  
USED: : 5.4G  
LIMIT: : -

PERMISSIONS  
OWNER : um-  
GROUP : u–  
OTHER : —

DATASTORE TEMPLATE  
BASE\_PATH="/ssd-test/ssd/"  
DATASTORE\_CAPACITY\_CHECK="YES"  
SHARED="YES"  
SPEED="10"  
TM\_MAD="shared"  
TYPE=“SYSTEM\_DS”

But still goes and create it in the default system path of the cluster. As you can see it says 37TB which is my ntfs default system datastore not the SSDs. Am I missing something in my datastore config?  
Many thanks.

Best,  
Maziyar
