> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/ovh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Block Storage

> Attach persistent block storage volumes to your Public Cloud instances for databases, file systems, and high-performance workloads.

Block Storage lets you attach persistent volumes directly to your Public Cloud instances. Unlike object storage — where data is accessed via HTTP APIs as discrete objects — block storage behaves like a physical disk: you partition it, format it with a filesystem, and mount it at a path in your OS.

<CardGroup cols={2}>
  <Card title="Create and attach a volume" icon="plus" href="/storage/block-storage#create-and-attach-a-volume">
    Create a volume in the Control Panel and attach it to a running instance.
  </Card>

  <Card title="Format and mount on Linux" icon="terminal" href="/storage/block-storage#format-and-mount-on-linux">
    Partition, format, and persistently mount a new volume on Linux.
  </Card>

  <Card title="Volume snapshots" icon="camera" href="/storage/block-storage#volume-snapshots">
    Take point-in-time snapshots to protect your data.
  </Card>

  <Card title="Performance tiers" icon="gauge" href="/storage/block-storage#performance-tiers">
    Choose between Classic, High Speed, and Regional Classic volumes.
  </Card>
</CardGroup>

## Overview

### Block storage vs object storage

|                        | Block Storage                            | Object Storage                     |
| ---------------------- | ---------------------------------------- | ---------------------------------- |
| **Access method**      | Mounted as a local disk (via OS)         | HTTP/S3 API                        |
| **Use cases**          | Databases, VMs, filesystems              | Backups, static assets, data lakes |
| **Filesystem support** | ext4, XFS, NTFS, etc.                    | Not applicable                     |
| **Scalability**        | Up to 12 TB per volume                   | Unlimited                          |
| **Latency**            | Very low (NVMe)                          | Higher (network)                   |
| **Shareable**          | Limited (Multi-Attach on specific tiers) | Yes (via ACLs/policies)            |

***

## Performance tiers

OVHcloud Block Storage is available in three classes, each suited to different workloads.

### Classic Volume

Backed by NVMe over Fabric with 500 IOPS guaranteed and 64 MB/s throughput. Data is replicated within a single availability zone (1-AZ) or Local Zone.

Best for: web application databases, VM storage, and backups where multi-zone redundancy is not required.

### Regional Classic Volume

Also delivers 500 IOPS guaranteed and 64 MB/s, but data is automatically replicated across three availability zones (3-AZ) within the same region. Supports **Multi-Attach**, meaning you can attach the same volume simultaneously to multiple instances in different AZs.

SLA: **99.99% availability**.

Best for: critical databases and distributed applications that require high availability and resilience.

### High Speed Volume

Available in two generations:

| Generation | IOPS                         | Throughput                     |
| ---------- | ---------------------------- | ------------------------------ |
| Gen 1      | Up to 3,000 IOPS             | Up to 128 MB/s                 |
| Gen 2      | 30 IOPS/GB (max 20,000 IOPS) | 0.5 MB/s per GB (max 512 MB/s) |

Best for: transactional databases, analytics, AI/ML workloads, and any application requiring maximum I/O.

### Comparison

| Storage class    | IOPS           | Throughput     | Availability | Replication       |
| ---------------- | -------------- | -------------- | ------------ | ----------------- |
| Classic Volume   | 500 guaranteed | 64 MB/s        | 99.9%        | Single AZ         |
| Regional Classic | 500 guaranteed | 64 MB/s        | 99.99%       | 3-AZ (multi-zone) |
| High Speed Gen 1 | Up to 3,000    | 128 MB/s       | 99.9%        | Single AZ         |
| High Speed Gen 2 | Up to 20,000   | Up to 512 MB/s | 99.9%        | Single AZ         |

<Note>
  All volume types are also available as encrypted variants using LUKS. Specify the type with the `-luks` suffix (e.g. `classic-luks`, `highspeed-luks`). Encryption has no performance impact. Regional Classic and Local Zone volumes do not support LUKS encryption.
</Note>

***

## Create and attach a volume

<Steps>
  <Step title="Create the volume">
    In the [OVHcloud Control Panel](https://www.ovh.com/manager/), go to **Public Cloud** > your project > **Block Storage** in the left-hand menu under **Storage & backup**.

    Click **Create a volume** and choose:

    * **Location**: must match the region of the instance you want to attach the volume to
    * **Volume type**: Classic, High Speed Gen 1, or High Speed Gen 2
    * **Encryption**: optionally enable LUKS encryption
    * **Capacity**: 10 GB to 12 TB

    Click **Create volume**.

    <Warning>
      Your volume and instance must be in the same region. A volume cannot be attached across regions.
    </Warning>
  </Step>

  <Step title="Attach the volume to an instance">
    On the volume list, click the `...` button next to your volume and select **Attach to instance**.

    In the pop-up, choose the target instance and click **Confirm**. The attachment takes a few minutes.

    You can also attach via the OpenStack CLI:

    ```bash theme={null}
    openstack server add volume <server-id> <volume-id>
    ```
  </Step>

  <Step title="Format and mount on Linux">
    SSH into your instance. List attached disks to identify the new volume:

    ```bash theme={null}
    lsblk
    ```

    You should see a new device such as `/dev/vdb`. Proceed to format and mount it — see the [Format and mount on Linux](#format-and-mount-on-linux) section below.
  </Step>
</Steps>

***

## Format and mount on Linux

<Steps>
  <Step title="Identify the new device">
    ```bash theme={null}
    lsblk
    ```

    Example output:

    ```
    NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
    vda    254:0    0   10G  0 disk
    └─vda1 254:1    0   10G  0 part /
    vdb    254:16   0   50G  0 disk
    ```

    The new volume appears as `vdb` (the name may differ on your instance).
  </Step>

  <Step title="Create a partition">
    For volumes under 2 TB, use `fdisk`:

    ```bash theme={null}
    sudo fdisk /dev/vdb
    ```

    At the prompt, type `n` to create a new partition, accept the defaults, then type `w` to write and exit.

    For volumes over 2 TB, use `parted`:

    ```bash theme={null}
    sudo parted /dev/vdb
    (parted) mklabel gpt
    (parted) mkpart primary 0 100%
    (parted) quit
    ```
  </Step>

  <Step title="Format the partition">
    ```bash theme={null}
    sudo mkfs.ext4 /dev/vdb1
    ```
  </Step>

  <Step title="Mount the partition">
    ```bash theme={null}
    sudo mkdir /mnt/disk
    sudo mount /dev/vdb1 /mnt/disk/
    ```

    Verify the mount:

    ```bash theme={null}
    df -h
    ```
  </Step>

  <Step title="Make the mount persistent across reboots">
    Retrieve the UUID of the partition:

    ```bash theme={null}
    sudo blkid
    ```

    Example output:

    ```
    /dev/vdb1: UUID="2e4a9012-bf0e-41ef-bf9a-fbf350803ac5" TYPE="ext4"
    ```

    Open `/etc/fstab` and add the following line, replacing the UUID with your own:

    ```
    UUID=2e4a9012-bf0e-41ef-bf9a-fbf350803ac5 /mnt/disk ext4 nofail 0 0
    ```

    Save and close the file. The volume will now mount automatically on reboot.
  </Step>
</Steps>

***

## Detach and reattach volumes

### Unmount before detaching

Always unmount the volume from the OS before detaching it from the instance to avoid data corruption.

```bash theme={null}
sudo umount /dev/vdb1
```

Remove the entry from `/etc/fstab` if the mount is persistent, then detach the volume from the Control Panel or via CLI:

```bash theme={null}
openstack server remove volume <server-id> <volume-id>
```

### Reattach to another instance

Once detached, attach the volume to a different instance from the Control Panel or CLI:

```bash theme={null}
openstack server add volume <new-server-id> <volume-id>
```

Mount it again on the new instance using the same steps as initial mounting. The filesystem and data are preserved.

<Tip>
  You can use volume detach and reattach to migrate data between instances without copying files over the network.
</Tip>

***

## Volume snapshots

A snapshot captures the state of a volume at a given point in time. Snapshots are stored on Block Storage and may incur additional storage charges.

### Create a snapshot from the Control Panel

In **Block Storage**, click the `...` button on a volume and select **Create a snapshot**. Give it a name and confirm. Snapshots are available within a few minutes.

### Create a snapshot via CLI

```bash theme={null}
openstack volume snapshot create \
  --volume <volume-id> \
  --name my-snapshot
```

### Restore from a snapshot

Create a new volume from a snapshot:

```bash theme={null}
openstack volume create \
  --snapshot <snapshot-id> \
  --size <size-in-GB> \
  my-restored-volume
```

<Warning>
  For consistent snapshots of volumes that host databases or active workloads, consider quiescing writes or using your database's flush/lock commands before taking the snapshot.
</Warning>

***

## Shared responsibility model

| Responsibility                                           | You | OVHcloud |
| -------------------------------------------------------- | --- | -------- |
| Choosing the volume type and sizing                      | Yes |          |
| Formatting, mounting, and managing the filesystem        | Yes |          |
| Data encryption (LUKS) configuration                     | Yes |          |
| Managing backups and snapshots                           | Yes |          |
| Data security and access control on the volume           | Yes |          |
| Maintaining physical hardware and storage infrastructure |     | Yes      |
| Operating the block storage cluster and control plane    |     | Yes      |
| Network connectivity between volume and instance         |     | Yes      |
| Replication and durability at the storage layer          |     | Yes      |

***

## Related guides

<CardGroup cols={2}>
  <Card title="Object Storage" icon="cloud" href="/storage/object-storage">
    Store files and backups at scale using the S3-compatible API.
  </Card>

  <Card title="vRack — Private Network" icon="network" href="/network/vrack">
    Connect block storage workloads to other OVHcloud services privately.
  </Card>
</CardGroup>
