> For the complete documentation index, see [llms.txt](https://docs.sesterce.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sesterce.com/compute-instances/configure-your-compute-instance/persistent-storage-volumes.md).

# Persistent storage (volumes)

## How to link a persistent storage (volume) to my Compute instance?

If you need to store your dataset after the end of your instance, you need to add a volume to your Pod. There are two ways to create a volume on Sesterce Cloud:

* From "Storage" tab
* Directly from the instance creation path

If you don't have volume created yet, we suggest the second option. All you need to do is to make sure that the offers displayed are [supporting volumes by ticking the appropriate box](/compute-instances.md#i-need-a-persistent-storage).

To create a volume, select your volume name and the size you need (in GB).&#x20;

### How to create a persistent volume from Storage page?

First, click on "Create volume" or "New volume" button (see below)

<figure><img src="https://3376774032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoExYATuECEyEKGJ4cD8X%2Fuploads%2FbM1qyi6L1oNh1q0I1UaA%2Fcurrent-ui-persistent-storage-volumes-1.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Volume name and region

Then, choose Volume name via the corresponding text field and Region where the volume will be hosted.

<figure><img src="https://3376774032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoExYATuECEyEKGJ4cD8X%2Fuploads%2Fh0YFsn858HlT11LuTA86%2FScreenshot%202025-03-03%20at%2017.23.46.png?alt=media&amp;token=575a00ad-8580-44d2-a820-4fb199ad9f6f" alt=""><figcaption></figcaption></figure>

#### Availability Zone

According to the Region selected, several AZ will be available or note. Please note that you'll be able to **link your Volume only to Compute instances that are launched in the same Regions and Availability Zone.**

### How to link the Volume to my Compute instance?

To simplify the process to its maximum, we implemented the following path: once your Volume is created, you can launch an instance via a dedicated CTA from volume page directly.&#x20;

#### Click on Volume Card

<figure><img src="https://3376774032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoExYATuECEyEKGJ4cD8X%2Fuploads%2FfqN9vnvvjfMVBoRhsYWd%2Fcurrent-ui-persistent-storage-volumes-3.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Click "Attach GPU Instance"

<figure><img src="https://3376774032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoExYATuECEyEKGJ4cD8X%2Fuploads%2FIy9NBWN6kRtVmdeqh6t3%2FScreenshot%202025-03-03%20at%2017.29.25.png?alt=media&amp;token=430dd335-4235-4093-8154-531e40b59417" alt=""><figcaption></figcaption></figure>

You will be redirected to the Compute page, displaying all instances offers that match with your Persistent Volume location.

#### **Select the Volume**

In the instance creation page, you'll find your Volume displayed in the dedicated section. Select it to link your instance to this persistent storage.

<figure><img src="https://3376774032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoExYATuECEyEKGJ4cD8X%2Fuploads%2FE6fmD2ufegj4HlC0Ghma%2FScreenshot%202025-05-14%20at%2009.27.02.png?alt=media&amp;token=555ef957-7331-4e00-be44-65647fa68b3c" alt=""><figcaption></figcaption></figure>

### How to verify the Volume on the instance?

Once the instance is active, connect into it [through SSH command](/compute-instances/terminal-connection.md). Then, run the following command:

{% code collapsedlinecount="10" %}

```
# List all block devices attached to the instance
lsblk
```

{% endcode %}

You should have an output similar to this:

{% code collapsedlinecount="10" %}

```
NAME    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0     7:0    0  63.9M  1 loop /snap/core20/2318
loop1     7:1    0    87M  1 loop /snap/lxd/28373
loop2     7:2    0  38.8M  1 loop /snap/snapd/21759
loop3     7:3    0  44.3M  1 loop /snap/snapd/23258
loop4     7:4    0  63.7M  1 loop /snap/core20/2434
vda     252:0    0   128G  0 disk 
├─vda1  252:1    0 127.9G  0 part /
├─vda14 252:14   0     4M  0 part 
└─vda15 252:15   0   106M  0 part /boot/efi
vdb     252:16   0    50G  0 disk # attached persistent volume, not yet mounted
nvme0n1 259:0    0 894.3G  0 disk
```

{% endcode %}

This command will display all block devices attached to the instance. You should see your volume listed as a new device, such as `vdb`, `sdb`, or similar.

### How to mount the Volume to a filesystem?

First identify the correct volume and check whether it already contains a filesystem. Device names can change between instances. Match the device to the expected volume size and verify that it is not the system disk.

{% code collapsedlinecount="10" %}

```bash
lsblk -o NAME,SIZE,FSTYPE,MOUNTPOINTS
# Example only: replace /dev/vdb with the verified volume device.
sudo blkid /dev/vdb
```

{% endcode %}

If the filesystem is on a partition, such as /dev/vdb1, use that partition in the mount command. If the volume is already mounted, use its existing mount point. An empty FSTYPE or no blkid output does not prove that a device has no data; stop and check before formatting an unfamiliar device.

#### Mount an existing filesystem

{% hint style="warning" %}
Do not run mkfs or format a volume that already contains data. Formatting creates a new filesystem and can destroy the existing data. Reconnecting an existing volume requires mounting its filesystem, not creating a new one.
{% endhint %}

After verifying the device and ensuring it is not already mounted, create a mount point and mount the existing filesystem. Replace /dev/vdb with the correct device or partition.

{% code collapsedlinecount="10" %}

```bash
sudo mkdir -p /mnt/volume
sudo mount /dev/vdb /mnt/volume
findmnt --mountpoint /mnt/volume
```

{% endcode %}

Confirm that findmnt shows the expected source device before using /mnt/volume. Preserve the ownership and permissions of existing files. If mounting fails, investigate the error; do not format the volume to resolve it.

#### Initialize a new, empty volume only

{% hint style="warning" %}
Only continue if this is a newly created, empty volume, you have verified the exact device, and it has no filesystem, partitions or data to preserve. The following command formats the selected device and can erase its contents. Never use it on an existing data volume or the system disk.
{% endhint %}

{% code collapsedlinecount="10" %}

```bash
# New, verified empty volume only. Replace /dev/vdb with its actual device.
sudo mkfs.ext4 /dev/vdb
```

{% endcode %}

After formatting succeeds, use the mount commands above and confirm the source device with findmnt. For this new filesystem only, if the current SSH user should own its root directory, run:

{% code collapsedlinecount="10" %}

```bash
mountpoint -q /mnt/volume && sudo chown "$(id -u):$(id -g)" /mnt/volume
```

{% endcode %}

This changes only the root directory of the newly mounted volume. Do not recursively change ownership on an existing dataset. Your persistent files are available under /mnt/volume while the volume is mounted.
