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.
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.
For further, detailed information on carrying out these tasks please reference:
Details of provisioning a VM can be found here:
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:
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:
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.