OCI Block Volume Backup and Further Linux Learning

OCI’s block volume option gives you a wide range of options when it comes to creating backup’s and restoring from them. It also gave me an excellent opportunity to learn about building, backing up and reattaching a restored block volume to a different instance – with a test included as proof.

The challenge:
1. Provision a VM and attach a block volume – running iSCSI commands to attach it.
2. Format the disk with two equal partitions
3. Make file system on one of these partitions
4. Mount the disk into a created directory
5. Edit the /etc/fstab folder
6. Spin up a seperate VM
7. Backup the block volume
8. Create a new block volume from the backup
9. Mount to the second VM
10. Confirm the backup is successfully attached through the test

How i’ll prove it:
Simply – i’ll create multiple simple text files after part 5.
Then once the backup is created in part 7 I’ll delete some selected files and will expect to see the full collection once the backed up block volume is attached to the second VM.

Creating the block volume requires only a few button clicks

For further, detailed information on carrying out these tasks please reference:
https://docs.cloud.oracle.com/en-us/iaas/Content/Block/Concepts/overview.htm
https://www.oracle.com/cloud/iaas/training/foundation.html

Details of provisioning a VM can be found here:
https://oracle-base.com/articles/vm/oracle-cloud-infrastructure-oci-create-a-compute-vm

Once the VM was in place the interesting tasks began to take place. Checking in the area is in place (the default area will be /dev). Along with this, the next step was to format the disk:

sudo fdisk starts a process on to format the disk. The default settings will format your disk into two paritions. Make sure to enter w for the last command in order to write.

Creating a file structure:

https://www.computerhope.com/unix/mkfs.htm

Please reference the above link for further info on file structures. Running the following command:

sudo mkfs -t <file structure type> <path to disk to create file structure>

Mounting the Disk:

sudo mount <directory to mount disk>

Finally, edit the fstab file to complete the process:

http://man7.org/linux/man-pages/man5/fstab.5.html

So, with all that done – could I prove the process had completed correctly? Try the process that I followed including a block volume backup to ensure you’ve carried out process correctly.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s