# Multiple storage types per host

**URL:** <https://forum.opennebula.io/t/multiple-storage-types-per-host/7717>\
**Category:** Installation & Configuration\
**Created:** [October 9, 2019, 4:48am UTC](https://forum.opennebula.io/t/multiple-storage-types-per-host/7717 "2019-10-09T04:48:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TomK](https://avatars.discourse-cdn.com/v4/letter/t/ee59a6/32.png) [@TomK](https://forum.opennebula.io/u/TomK)\
**Post date:** [October 9, 2019, 4:48am UTC](https://forum.opennebula.io/t/multiple-storage-types-per-host/7717/1 "2019-10-09T04:48:55Z")

</div>

Hey All,

Can I have a situation where two storage types coexist on two hosts?

For example, let’s say I have this:

host01

- 4TB Local LUN
- 4TB Gluster FS (brick w/ host02)

host02

- 4TB Local LUN
- 4TB Gluster FS (brick w/ host01)

Can I define each local LUN as a separate datastore in ON while at the same time add Gluster FS as a shared LUN? I understand ON will tread GFS as any other path, so appears this ‘might’ be possible?

So for example, for redundancy, I would like to keep some VM’s (ie critical ones) on the GlusterFS despite the slower speed. While providing the 4TB LUN on each host for local, non critical VM’s where they can benefit from higher IO rates.

Cheers,  
TK

---

<div class="post-metadata">

**Author:** ![cgonzalez](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/cgonzalez/32/7096_2.png) [@cgonzalez](https://forum.opennebula.io/u/cgonzalez)\
**Post date:** [October 9, 2019, 11:38am UTC](https://forum.opennebula.io/t/multiple-storage-types-per-host/7717/2 "2019-10-09T11:38:04Z")

</div>

Yes, the described scenario can be achieved by creating an SSH datastore for the LUNs and a shared datastore for the Gluster.

Once the datastores are set up you can choose where the VMs are deployed by using the `TM_MAD_SYSTEM` attribute inside the VM template. You can find more info here: [http://docs.opennebula.org/5.8/deployment/open\_cloud\_storage\_setup/fs\_ds.html#combining-the-shared-ssh-transfer-modes](http://docs.opennebula.org/5.8/deployment/open_cloud_storage_setup/fs_ds.html#combining-the-shared-ssh-transfer-modes)

---

<div class="post-metadata">

**Author:** ![TomK](https://avatars.discourse-cdn.com/v4/letter/t/ee59a6/32.png) [@TomK](https://forum.opennebula.io/u/TomK)\
**Post date:** [October 12, 2019, 1:13am UTC](https://forum.opennebula.io/t/multiple-storage-types-per-host/7717/3 "2019-10-12T01:13:59Z")

</div>

Thanks again Christian!

Question about the SSH datastore. Can you elaborate a bit how this SSH datastore for the LUN’s is created?

Cheers,  
TK

---

<div class="post-metadata">

**Author:** ![cgonzalez](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/cgonzalez/32/7096_2.png) [@cgonzalez](https://forum.opennebula.io/u/cgonzalez)\
**Post date:** [October 14, 2019, 11:22am UTC](https://forum.opennebula.io/t/multiple-storage-types-per-host/7717/4 "2019-10-14T11:22:00Z")

</div>

Hello @TomK,

Sure, first you need to create an SSH datastore in ONE (or use the default one), after that you will need to make the datastore path (`/var/lib/one/datastores/<ds_id>` by default) to point the LUN. For that, you can directly mount the LUN on that path or make a symbolic link to the path where the LUN is mounted.

---

<div class="post-metadata">

**Author:** ![TomK](https://avatars.discourse-cdn.com/v4/letter/t/ee59a6/32.png) [@TomK](https://forum.opennebula.io/u/TomK)\
**Post date:** [November 10, 2019, 4:49am UTC](https://forum.opennebula.io/t/multiple-storage-types-per-host/7717/5 "2019-11-10T04:49:35Z")

</div>

To clarify a couple of points and overall question of how OpenNebula works:

- Remote host local LUN’s and shared filesystems are defined on the hosts where they live.

- These LUN’s or shared filesystems are then mounted on the Sunstone server / VM as either 1) SSHFS mounts or, in our case, GlusterFS mounts. (Ie Sunstone VM mount point /var/lib/one/datastores/100 would mount to the GlusterFS of physical01 and /var/lib/one/datastores/101 would mount to the Local LUN 0 of physical01 via sshfs for example. )

- Sunstone accesses these local folders to deploy the VM’s too. Since these are remote mounts, Sunstone actually starts them up on the remote physical machines.

Is the above correct?

Or is this correct:

- Physical host (physical01) mounts all of it’s datastores, Local LUN 0 or GlusterFS in it’s own /var/lib/one/datastores/ folders.

- Sunstone connects to said physical01 and deploys VM’s to that hosts /var/lib/one/datastores/ folder and starts the VM on that host.

Need a 10,000 foot view of how OpenNebula works otherwise I’m just creating components like templates, hosts and DS’s without really understanding the overall concept.

Thx,  
TK
