> For the complete documentation index, see [llms.txt](https://platform9.com/kb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://platform9.com/kb/pmo/how-to/migrating-cinder-volumes-in-lvm-storage-backend.md).

# Migrating Cinder Volumes in LVM Storage Backend

## Problem

By default, the Cinder Scheduler will use its algorithm to create volumes on any one of the block storage hosts it finds best suited according to volume metadata. However, if a new block storage host is added at a later date which is more optimized for storage or simply has more space than an older host there is a need to migrate volumes from one host to the other.

As an administrator, you can migrate a volume with its data from one location to another in a manner that is transparent to users and workloads.

Possible use cases for data migration include:

* Bringing down a physical storage device for maintenance without disrupting workloads.
* Modifying the properties of a volume.
* Freeing up space in a thinly-provisioned back end.

**Note**: You can migrate only detached volumes with no snapshots.

## Environment

* Platform9 Managed OpenStack - v3.6.0 and Higher
* LVM Backend
* OpenStack CLI
* Cinder

## Procedure

**Warning:** Ensure that the volume you are trying to migrate has been detached from any instance and ensure the volume has no snapshots.

1. Get the current details of the volume.

{% tabs %}
{% tab title="None" %}

```none
openstack volume show [volume_uuid]
```

{% endtab %}
{% endtabs %}

2. The current host of the volume is reflected in the ***os-vol-host-attr:host*** parameter.
3. Obtain the available backends.

{% tabs %}
{% tab title="None" %}

```none
cinder get-pools
```

{% endtab %}
{% endtabs %}

**Note**: The output will always be in the format: **host\_uuid\@backend-name#pool**. 4. Copy the full name ( **host\_uuid\@backend-name#pool**) of the host you want to migrate the volume to, to the clipboard. 5. Initiate volume migration.

{% tabs %}
{% tab title="None" %}

```none
openstack volume migrate --host [host_uuid@backend-name#pool] [volume_uuid]
```

{% endtab %}
{% endtabs %}

6. Check the ***migration\_status*** attribute in the output.

{% tabs %}
{% tab title="None" %}

```none
openstack volume show [volume_uuid]
```

{% endtab %}
{% endtabs %}

7. The ***migration\_status*** displays "success"once the migration completes. The ***os-vol-host-attr:host*** will now display the new host information.

## Additional Information

* For guidance with installing the OpenStack CLI client on your machine, refer to [Installing OpenStack CLI Clients](https://docs.platform9.com/support/getting-started-with-the-openstack-command-line/).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://platform9.com/kb/pmo/how-to/migrating-cinder-volumes-in-lvm-storage-backend.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
