This page shows how to attach and detach additional volumes to an existing server.
- You have an account and are logged into cloud.scaleway.com
- You have configured your SSH Key
- You have a server
Each server can have at most 15 volumes, including the root volume.
The type of disk to host your volumes use the LSSD technology: Local solid state drive, to deliver fast disk I/O.
LSSD volumes are teleported close to your server.
When you start a server for the first time, your volume files are downloaded from the volumes store to the local storage devices (LSSD).
Each time you start or stop a server, the volumes are downloaded or uploaded to the volumes store. The larger the amount of data to transfer, the longer the upload or download duration.
We work constantly on optimizing the transfer time of local storage devices to the volumes store.
There are five steps to attach a volume to an existing server
Important: Server must be powered off to attach or detach a volume.
In the Control Panel, click “Volumes” in the compute section.
Click the “Create Volume” button.
You will land on the volume-creation page where you must input basic information for your volume:
In the servers page, click on the server you want to attach a volume to.
On the server detail page click “Attach an existing volume” and select the volume to attach in the list.
Important: To detach the volume, click the Detach button.
If the new volume has never been formatted, you need to format the volume using
mkfs before you can mount it.
For instance, the following command creates an
ext4 file system on the volume:
To mount the device manually as /mnt/data, run the following commands:
To mount the additional volume automatically, you have to reference your devices in the
/etc/fstab references all devices to mount when they are connected.
For instance to mount
/dev/nbd1 device automatically to the
/mnt/data directory, the
/etc/fstab has the following content:
The configuration above mounts the /dev/nbd1 device to the
/mnt/data directory with fstab default option and
nofail is set to allow the system to continue the boot sequence if the filesystem cannot be found, which if the volume is detached in the future.
Create the /mnt/data directory if it doesn’t exist.
root@c1-X-Y-Z-T:~# mkdir -p /mnt/data
To check devices are mounted properly, run the
mount -a command to mount all devices.
Important: On the next server boot, your volumes will be mounted automatically.
Now run the
df -h command, this command will list all your devices and where they are mounted: