# Understanding Cinder Metadata

When you attach a volume to an instance, Cinder automatically adds the `attached_mode` and `readonly` key-value pairs to the volume. These tags describe the state of the volume and are not directly modifiable by the user.

The `attached_mode` key describes whether the volume is read-only or read-writable and appears only when the volume is attached.

The `readonly` key describes whether the volume can be attached as read-only or read-writeable .

Cinder automatically removes the `attached_mode` key when the volume is detached from an instance. However, the `readonly` key stays indefinitely.

To attach a volume as read-only, set the read-only mode to `true` using the Cinder client:

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

```bash
cinder readonly-mode-update true
```

{% endtab %}
{% endtabs %}

To attach as volume as read-writeable, set the read-only mode to `false`:

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

```bash
cinder readonly-mode-update false
```

{% endtab %}
{% endtabs %}
