# Shared mode for the ceph based system datastires

**URL:** <https://forum.opennebula.io/t/shared-mode-for-the-ceph-based-system-datastires/7164>\
**Category:** Integration Support\
**Created:** [April 23, 2019, 12:17pm UTC](https://forum.opennebula.io/t/shared-mode-for-the-ceph-based-system-datastires/7164 "2019-04-23T12:17:50Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![kvaps](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/kvaps/32/4496_2.png) [@kvaps](https://forum.opennebula.io/u/kvaps)\
**Post date:** [April 23, 2019, 1:46pm UTC](https://forum.opennebula.io/t/shared-mode-for-the-ceph-based-system-datastires/7164/3 "2019-04-23T13:46:24Z")

</div>

Hi Anton,

> [@atodorov\_storpool](#):
>
> I am [patching](https://github.com/OpenNebula/addon-storpool/tree/master/patches/vmm/5.8.0) `vmm/save` and `vmm/restore` to have `tm/save.<TM_MAD>-pre` and `tm/restore.<TM_MAD>-post`

Heh, I was need to execute these actions locally on the frontend side, so I’ve just [owerrided](https://github.com/kvaps/opennebula-addon-linstor_un/tree/master/vmm/kvm) them as local actions for the kvm vm\_mad driver:

```diff
 VM_MAD = [
     NAME = "kvm",
- ARGUMENTS = "-t 15 -r 0 kvm",
+ ARGUMENTS = "-t 15 -r 0 kvm -l save=save_linstor_un,restore=restore_linstor_un",
 ]

```

Otherwise I don’t like this idea much, looks like that `vmm/save.<TM_MAD>` and `vmm/restore.<TM_MAD>` actions are more concern to TM drivers than to VMM ones. TM driver actions are always executes locally on the frontend therefore `vmm/save.<TM_MAD>` and `vmm/restore.<TM_MAD>` actions also should be executed locally in my opinnion.  
It maybe done by modifying **[one\_vmm\_exec.rb](https://github.com/OpenNebula/one/blob/99ded0f8846ed3eb683411bfa37ca603c41197d8/src/vmm_mad/exec/one_vmm_exec.rb)** driver executor. Like we’ve decided [here](https://forum.opennebula.io/t/why-images-ds-parameters-affects-system-ds/7072/7)

This step will allow to handle these actions by TM\_MAD manufacturer without adding extra patches into standard VMM driver.  
This is a little breaking changes, so it’s up to dicussion.

> [@atodorov\_storpool](#):
>
> Regarding the checkoint file there is a third option that I prefer and use if possible(needs decent version of `qemu-kvm` , `qemu-kvm-ev` for CentOS7 is fine) - store the checkpoint file directly on block device and also use it for restore.

To be true I don’t like an idea to store whole VM directroy on the storage system, filesystems are usually not so reliable unlike just using block devices. They can hung on mount/unmount operations. Better to avoid using them. In my opinion all the information stored there (symlinks and context CDs) can be calculated automatically during VM deploy.

The only thing which should be saved is checkpoint file, however it can be simple uploaded as block file. Any way, copying checkpoint file to one location, then upload it into storage, and same way for restore it back is so annoying. I want to solve it somehow.

I’m just checked: virsh can directly save checkpoint onto block device, restore is more problematic, but still possible:

```bash
virsh -c qemu:///system restore one-58 < <(cat /dev/<device>)

```

I would like to develop this idea, instead just saving it into filesystem which is stored on the shared block device. 🙂

---

_[View the full topic](https://forum.opennebula.io/t/shared-mode-for-the-ceph-based-system-datastires/7164)._
