Knowledge Base


« Compute

Volumes

Overview

Volumes are persistent extra harddisks that can be detached, stored and attached to virtual servers at will. You can attach multiple Volumes to a single cloud server. Because volumes are faster and more flexible, we recommend using volumes for the storage of databases and other application data.

Customers can select from a number of different volume sizes. Volumes can be extremely fast: each volume size has it own maximum write IOPS throughput, with larger volumes allocated a higher maximum throughput. For details on the pricing and features of different volume sizes see our pricing page.

It is possible to take snapshots from volumes, these are stored on the same storage machine and can be used if you need to make a quick backup from the virtual server. Customers can also make images from a volume, these are stored in the CloudVPS Object Store and can be used to recreate a volume to a different availability zone.

 

 

 

 

 

 

 

Both attached and detached volumes can be viewed in the Volumes tab in the Skyline Interface.

No volume resize
If you want to increase the size of a volume you will have to create a larger copy. Decreasing the size of a volume is not possible. The only possibility is creating a new, smaller volume, and copying the data to this new volume. 

Volume Management

If you create a new cloud server from an Image a new Volume will automatically be created. You can also create new Volumes in order to serve as secondary harddisk for an existing virtual server.

Create new Volume

Log in to https://stack.cloudvps.com
At the navigation pane under Compute, click Volumes.
Click New Volume.
Specify a name for the Volume.
Select the Type of the Volume and enter the Size of the Volume.
Select the Source of  the Volume (default: New volume from scratch)
Click Create Volume

Deleting an Volume
Log in to https://stack.cloudvps.com
At the navigation pane under Compute, click Volumes.
Select the Volume.
Click on the Delete button indicated by the cross icon to delete the specific Volume.
Click Ok to confirm the termination of the Volume.

Attach a Volume to a Server

Log in to https://stack.cloudvps.com
At the navigation pane under Compute, click Servers.
Double click on the Server.
Click + Attach Volume.
Select the required Volume or Create a new Volume
Click Attach Volume.

Create a Snapshot of a Volume

Log in to https://stack.cloudvps.com
At the navigation pane under Compute, click Volumes.
Double click on the Volume.
Click + Create Snapshot.

Create a Image of a Volume

Log in to https://stack.cloudvps.com
At the navigation pane under Compute, click Volumes.
Double click on the Volume.
Click on the To Image button indicated by the square with arrow.
Enter the image name.
Click Create Image

Create new Volume of an existing Volume 'Copy Volume'

Log in to https://stack.cloudvps.com
At the navigation pane under Compute, click Volumes.
Click New Volume.
Specify a name for the Volume.
Select the Type of the Volume and enter the Size of the Volume.
Select Copy Volume as the Source of the Volume and select an existing Volume.
Click Create Volume.

Create new Volume of an existing Image

Log in to https://stack.cloudvps.com
At the navigation pane under Compute, click Volumes.
Click New Volume.
Specify a name for the Volume.
Select the Type of the Volume and enter the Size of the Volume.
Select Image as the Source of the Volume and select an existing Image.
Click Create Volume.

Create new Volume of an existing Snapshot

Log in to https://stack.cloudvps.com
At the navigation pane under Compute, click Volumes.
Click New Volume.
Specify a name for the Volume.
Select the Type of the Volume and enter the Size of the Volume.
Select Snapshot as the Source of the Volume and select an existing Snapshot.
Click Create Volume.

Mounting a Volume in Linux

After you attach a Volume to a cloud server you can mount it in order for your Operating System to access it.

Mount a Attached Volume in Linux
 

1. Connect to your server using SSH

2. Use the lsblk command to view your available disk devices and their mount points (if applicable) to help you determine the correct device name to use.

[root@cloudvps ~]# lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
vda    252:0    0   20G  0 disk
└─vda2 252:2    0 19.5G  0 part /
vdb    252:16   0   10G  0 disk

Note: The output of lsblk removes the /dev/ prefix from full device paths. In this example, /dev/vda2 is mounted as the root device (note the MOUNTPOINT is listed as /, the root of the Linux file system hierarchy), and /dev/vdb is attached, but it has not been mounted yet.

3.    Determine if you need to create a file system on the volume. New volumes are raw block devices, and you need to create a file system on them before you can mount and use them. Volumes that have been restored from snapshots likely have a file system on them already; if you create a new file system on top of an existing file system, the operation overwrites your data. Use the sudo file -s <device> command to list special information, such as file system type.

[root@test ~]# file -s /dev/vdb
/dev/vdb: data

If the output of the previous command shows simply data for the device, then there is no file system on the device and you need to create one. You can go on to Step 4. If you run this command on a device that contains a file system, then your output will be different.

[root@test ~]# file -s /dev/vda2
/dev/vda2: Linux rev 1.0 ext4 filesystem data (needs journal recovery) (extents) (large files) (huge files)

In the above example, the device contains Linux rev 1.0 ext4 filesystem data, so this volume does not need a file system created (you can skip Step 4 if your output shows file system data).

4.    (Optional) Use the following command to create an ext4 file system on the volume. Substitute the device name (such as /dev/vdb) for <device_name>.

[root@test ~]# mkfs -t ext4 <device_name>

5.    Use the following command to create a mount point directory for the volume. The mount point is where the volume is located in the file system tree and where you read and write files to after you mount the volume. Substitute a location (such as /data) for <mount_point>.

[root@test ~]# mkdir  <mount_point>

6.    Use the following command to mount the volume at the location you just created.

[root@test ~]# mount <device_name> <mount_point>

7.     (Optional) To mount this Volume on every system reboot, add an entry for the device to the /etc/fstab file.

 a. Create a backup of your /etc/fstab file that you can use if you accidentally destroy or   delete this file while you are editing it.

[root@test ~]# cp /etc/fstab /etc/fstab.orig

b. Open the /etc/fstab file using your favorite text editor, such as nano or vim.
c. Add a new line to the end of the file for your volume using the following format.

<device_name> <mount_point> <file_system_type> <fs_mntops> <fs_freq> <fs_passno>

The last three fields on this line are the file system mount options, the dump frequency of  the file system, and the order of file system checks done at boot time. If you don't know   what these values should be, then use the values in the example below for them (defaults 0  2). For more information on /etc/fstab entries, see the fstab manual page (by entering man  fstab on the command line). For example, to mount the ext4 file system on the device /dev/ xvdf at the mount point /data, add the following entry to /etc/fstab.

/dev/vdb /data   ext4    defaults        0       2

d. After you've added the new entry to /etc/fstab, you need to check that your entry works.  Run the mount -a command to mount all file systems in /etc/fstab.

[root@test ~]# mount -a

If the above command does not produce an error, then your /etc/fstab file is OK and your  file system will mount automatically at the next boot. If the command does produce any   errors, examine the errors and try to correct your /etc/fstab.

Warning
Errors in the /etc/fstab file can render a system unbootable. Do not shut down a    system that has errors in the /etc/fstab file.

e. (Optional) If you are unsure how to correct /etc/fstab errors, you can always restore your  backup /etc/fstab file with the following command.

[root@test ~]# mv /etc/fstab.orig /etc/fstab

 
Mount a Attached Volume in Windows

1. Log in to your instance using Remote Desktop.

2.
Windows Server 2012: Go to the Start screen.
Windows Server 2008: On the taskbar, click Start, and then click Run.

3. Type diskmgmt.msc and press Enter. The Disk Management utility opens.

Caution
If you're mounting a volume that already has data on it (for example, a public data set), make sure you don't reformat the volume and delete the existing data.

4. Select the disk that represents the new Volume.

 

 

 

 

 

 

 

 

 

 

5. On the Disk Management menu, select Action - All Tasks - Online.

6. A new disk needs to be initialized before it can be used. To initialize the disk:

  1. In the Disk Management utility, select the new CloudVPS Volume disk.
  2. On the Disk Management menu, select Action - All Tasks - Initialize Disk.
  3. In the Initialize Disk dialog, select the disk to initialize, select the desired partition style, and press OK.

Your new Volume is now available for use. Any data written to this file system is written to the Volume and is transparent to applications using the device.

VPS Bestellen
VPS Bestellen