How to use Cinder volume

Source: Internet
Author: User

In Dashboard click +create Volume, in the popup window, we see the new Volume source has four kinds. is no source, Snapshot, Image, Volume, as shown in:

1, No Source, empty volume

The new one is a blank hard disk, and we can attach it to instance. We created a new 4G size empty volume, for example, at this point the state is available

Click Edit volume-> Select Edit Attachments, drop-down box to select our new Volumetest instance. Then the state of the volume changes. Status becomes In-use, attached to volumetest ON/DEV/VDD we enter the system through the console to see if it is successful. The hard drive has been successfully attach to the instance we created, and we created a partition in this/DEV/VDD/dev/vdd1 mount it on the/mnt/test and created a/mnt/test file in the Test.txt directory. After the partition is Umount, volumetest the volume from instance detach in dashboard. Also create a new instance named Volumetest2. After entering the system, FDISK-L can see the partition we just made in another instance, mount it to the/mnt directory, enter the directory, Can see the file we created before Test.txt, and open the file, view the contents inside, as shown above is volume as an empty disk to use, can be mounted on different instance, to achieve data migration and other functions.
2.SnapshotUsing snapshot to create the volume, before that we need to use the already existing volume to do a snapshot, we use the nosource-test created in the previous section, Create Snapshot Click (nosource-test) Edit volume-> create Snapshot, named Snapshot-test, then under Volume Snapshot tab, You can see the snapshot we just created, as shown in: At this point, we can simply click on the Create volume on the right to make a new volume or, in the previous step, select the snapshot way to create it. After we have named the newly created volume Snapshot-volume created, we will snapshot-volume attach to Volume-test, which we created earlier, Through the console we enter into the instance system, we can see that/DEV/VDC1 is the volume we just created through snapshot, mount it to/mnt/, go to/mnt/we can see the test file we created in the previous section , open the file to observe that the content is saved in the same context as before. So, the volume created by snapshot is equivalent to a previous volume Copy3.imageIn this section, we describe using source as image to create Volumecreate volume-> Source (image), select the image (for convenience, we choose a smaller cirros mirror to do the test), We'll name this volume image-test, and we'll get a volume that can start instance.At this point we have two ways to start instance 1) Use the traditional way to start the instance in the instance tag, but choose the image in a different way, as shown in 2) under Volume, operate on Image-test, click Edit Volume Button-side drop-down arrow, select Launch as instance, at which time the system can start normally. After testing, we create the file Test.txt under the root of the system, delete the instance, re-create a new instance, still get the file under the root directory, that is, the contents of instance are preserved. 4.volumeIn this way, we get a full copy of the volume, and choose to create a volumde that is larger than the size of the volume you choose to copy, otherwise the creation will fail, and it is important to note that when we choose this method, the target volume cannot be used and its status should be " Available "can only be selected.

How to use Cinder volume

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.