Skip to content

05. Block Storage: Cinder

AJ NOURI edited this page Feb 13, 2017 · 1 revision

Each section is supposed to be independent. That's why, for each section, you have to create an instance with a key, a security group and private subnet.

Instance snapshots

Remember, a snapshot of instance/volume is not usable directly, you need to create instance/volume from it.

  1. Create an instance "instance1" from cirros-0.3.4-x86_64-uec image and ssh to it.
  • image: cirros-0.3.4-x86_64-uec
  • flavor: m1.tiny
  • keypair: key1
  • security group: new-secgroup
  1. inside the home directory of "instance2" create a file testfile.txt

  2. take a snapshot of instance "instance2", name it "snapshot-of-instance2"

  3. terminate the instance "instance2"

  4. Create an instance from "snapshot-of-instance2" and name it "instance-from-snapshot"

  5. inside the home directory of "instance-from-snapshot" verify the presence of the file


Volume snapshots

  1. Create a new empty volume "vol1" of a 1GB size
  2. Create an instance "instance1" from cirros-0.3.4-x86_64-uec image
  • image: cirros-0.3.4-x86_64-uec
  • flavor: m1.tiny
  • keypair: key1
  • security group: new-secgroup
  1. Attach the created image "vol1" to the instance, "instance1", ssh to it and mount it to /mnt/vdb
  2. inside the attached volume (/mnt/vdb) create a file testfile.txt
  3. detach the colume "vol1" from the instance "instance1"
  4. Take a snapshot of "vol1", name it "snapshot-of-vol1"
  5. create a volume from the snapshot
  6. reattach the first volume "vol1" to the instance "instance1"
  7. delete the previously created file "testfile.txt"
  8. detach the colume "vol1" from the instance "instance1"
  9. attach the created volume "new-vol" to the instance "instance1"
  10. inside the attached volume verify the presence of the file "testfile.txt"

Volume Backups

  1. Create a new empty volume "vol2" of a 1GB size
  2. Create an instance "instance3"
  • image: cirros-0.3.4-x86_64-uec
  • flavor: m1.tiny
  • keypair: key1
  • security group: default
  1. Attach the volume "vol2" it to the instance "instance3"
  2. Inside the home directory of the mounted partition inside "instance3" create a file testfile.txt
  3. Detach the volume from the running instance
  4. Backup the volume "vol2" into a volume "vol2-backup"
  5. Remove the original volume "vol2"
  6. Restore the backed up volume "vol2-backup"
  7. Delete the backup volume "vol2-backup"
  8. Attach it to the running instance "instance3"
  9. Inside the mounted partition, make sure the file "testfile.txt" exists

Volume encryption

  1. Create the encrypted volume "encrypted-vol" (LUKS volume) of 1GB size

  2. Create an instance "instance4"

  3. Attach the encrypted volume to the machine

  4. Create a file "testfile.txt" and syncronize the operations

  5. Check if you can see the encrypted volume on the block storage node directory