Why use volumes ?

volume is an attachable block storage device, similar to an external hard drive. You can attach a volume to one instance at a time. Use volumes to store important data you want to reuse, even when your instance is deleted. You can also use a volume for data you want to move from one instance to another.

Please note: 
Attached volumes are automatically stored under /mnt/vol_<letter> and formatted with the ext4 file system. You can always reformat these volumes or store them differently.

How to create a new volume ?

  1. Log in to the console dashboard. Click on 'Volumes' section from left-hand side menu.

  2. You will see 'Volumes'. Click 'Create New Volume' on the bottom right corner. 

  3. First, specify the 'Location' & 'Type', and then type 'Name' & 'Description'Then choose the 'Size' (in GiB) and click 'Create Volume'. The File system is automatically set to ext4.

How to attach the volume to an instance ? 

  • In the 'Volumes' section, click on the name of the Volume you want to attach. You will be directed to the details page of that volume. You will see 'Attach to Instance' button in 'Instances' section of that particular 'Volume'. Click on that button & you will see the dropdown list menu, which has list of instances in that region. Then, choose the instance, to which you want to attach that Volume and click on 'Save'

  • To get an overview of all volumes attached to an instance, click on the instance details page (Instances > click on the name of the Instance). You will find a list of attached volumes on the bottom, including the volumes' device names and the locations of storage.

How to detach a volume from an instance ?

  • Navigate to the details page of the volume (Volumes > click on volume name) which you want to detach from a particular Instance. You will see 'Instances' section of that particular 'Volume' and you will find that instance to which the volume is attached. To detach the volume from that instance simply click on 'X' (cross mark) button on the right-side of that instance and then click 'Detach Instance' button.

To avoid corruption of your data, it is highly recommended to run the unmount command before detaching the instance.