# Instance Failed To Start When Multipath Volume is Attached

## Problem

VM is failing to start when multipath volumes are attached to the VM and `ostackhost` shows below error logs:

{% tabs %}
{% tab title="ostackhost logs" %}

```yaml
ERROR oslo_messaging.rpc.server [req-ID] Exception during message handling: oslo_concurrency.processutils.ProcessExecutionError: Unexpected error while running command.
Command: multipath -f <multipath_ID>
Exit code: 1
Stdout: 'Apr 09 04:25:29 | <multipath_ID>-part7: map in use<br>Apr 09 04:25:29 | failed to remove multipath map <multipath_ID><br>'
Stderr: ''
TRACE oslo_messaging.rpc.server Traceback (most recent call last):
TRACE oslo_messaging.rpc.server   File "/opt/pf9/venv/lib/python3.6/site-packages/oslo_messaging/rpc/server.py", line 166, in _process_incoming
TRACE oslo_messaging.rpc.server     res = self.dispatcher.dispatch(message)
TRACE oslo_messaging.rpc.server   File "/opt/pf9/venv/lib/python3.6/site-packages/oslo_messaging/rpc/dispatcher.py", line 265, in dispatch
TRACE oslo_messaging.rpc.server     return self._do_dispatch(endpoint, method, ctxt, args)
```

{% endtab %}
{% endtabs %}

## Environment

* Platform9 Managed OpenStack - v5.1 and Higher
* Multi-path Volumes

## Cause

The hosts is failing to flush the multipath map and creating stale entries.

## Resolution

* Login to the host where the VM is running and list the paths to the LUN and volumes

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

```yaml
# multipath -ll   <multipath_ID>
# lsblk /dev/dm-<DM_ID>
```

{% endtab %}
{% endtabs %}

* Remove the volume entries

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

```yaml
# dmsetup remove <volume-entries>
```

{% endtab %}
{% endtabs %}

* Remove the named multipath device.

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

```yaml
# multipath -f /dev/disk/by-id/dm-uuid-mpath-<ID>
```

{% endtab %}
{% endtabs %}

* Now start the stop the server and start it again

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

```yaml
# openstack server stop <UUID>
# openstack server start <UUID>
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://platform9.com/kb/pmo/solution/instance-failed-to-start-when-multipath-volume-is-attached.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
