Ask Your Question

Revision history [back]

It looks like the libvirt's volume driver for Ceph (RBD) does not support volume swapping. Another driver that does not support swapping is Sheepdog, for example - maybe because they are not "mounted" on the hypervisor and thus not available as a filesystem path, but that's just my assumption.

The piece of code that decides this is located at nova/virt/libvirt/driver.py:

    if not conf.source_path:
        self._disconnect_volume(new_connection_info, disk_dev, instance)
        raise NotImplementedError(_("Swap only supports host devices"))

In other words, it tries to get a property of the particular volume driver called source_path, but RBD driver along with some others don't define one. I don't have a firsthand experience with RBD driver for Cinder, but I'm afraid the migrate feature doesn't work for now: https://blueprints.launchpad.net/cinder/+spec/ceph-volume-migrate

It looks like the libvirt's volume driver for Ceph (RBD) does not support volume swapping. swapping (meaning you can't migrate an attached volume). Another driver that does not support swapping is Sheepdog, for example - maybe because they are not "mounted" on the hypervisor and thus not available as a filesystem path, but that's just my assumption.

The piece of code that decides this is located at nova/virt/libvirt/driver.py:

    if not conf.source_path:
        self._disconnect_volume(new_connection_info, disk_dev, instance)
        raise NotImplementedError(_("Swap only supports host devices"))

In other words, it tries to get a property of the particular volume driver called source_path, but RBD driver along with some others don't define one. I don't have a firsthand experience with RBD driver for Cinder, but I'm afraid the migrate swap feature doesn't work for now: https://blueprints.launchpad.net/cinder/+spec/ceph-volume-migrate