Pre-requisites, a VM like the one create in Creating and Configuring VMs
As the name says, Persistent Volumes stay even when instances are removed. They can be attached to or detached from virtual machines while they are running. They are like a virtual external hard disks, you can save data in them and reattach to any other instances of your choice.
In this exercise, we will learn, using the web interface, how to add a persistent volume to one of the instances you created in past exercises.
lastname_firstname_vol
and size as 10GiB
sudo fdisk -l
xfs
as filesystem, you should execute the following: sudo mkfs.xfs /dev/vdb
Create the mount directory
sudo mkdir -p /media/volume
sudo chmod o+w /media/volume/
Mount the volume
sudo mount /dev/vdb /media/volume
Store some files on the volume
sudo umount /dev/vdb
You may now repeat steps 2 and 6 to check that indeed the files you created in step 7 are still there.
Pre-requisites, a VM like the one create in Creating and Configuring VMs
In order to create copy of your cloud instance’s OS, middleware, runtime configurations or application stacks you build inside it, you can create a snapshot of your VM. Snapshots also provide means to capture and store the filesystem state of your instance.
You can share snapshots with other Pouta users or use it for yourself to launch new VM’s with the same configurations, applications and file system state. Snapshots also provide you mechanisms for saving billing units inside Pouta clouds, For example, you can take a snapshot of your ideal machine, and delete the machine. After being deleted the machine will no longer spend billing. Afterwards, when you need the VM again, you may relaunch it using that snapshot.
The snapshots are stored in Pouta as Images
_lastname_firstname_vm_date_
lastname_firstname_vm
.standard.tiny
.Boot from Snapshot
.This will launch new cloud machine which is in same state as of instance you deleted. Please verify if you still have your data and installed packages in VM. Notice that your VM’s private IP is now different, but you can assign again the same Floating IP it had.
In this exercise we will store data in an Object storage system. The difference with Persistent Volumes is that, instead of using a file system with data as a file hierarchy, it stores data as blocks within buckets. A bucket (also called container) is a storage compartment for your data, the equivalent of Volume. Also normally, the files will be available using HTTP (and the S3/Swift protocol).
Note: A Public bucket will allow anyone with the Public URL to gain access to your objects in the container.
Check it works
curl https://a3s.fi/YYYYMMDD-yourlastname/yourlastname.txt