VM-RAID-Minikube

Steps:

  1. Create virtual machine with debian/ubuntu/centos or download preinstalled image (https://www.osboxes.org/).

  2. Add simple raid1 to virtual machine: *nix os system on 1-st hdd, 2d and 3d hdds are in raid1. 1 (with star). Only two hdds. Os system on raid1, based on this two hdd.

  3. How to test raid1. Create file on raid1 file system. Turn off vm and remove one of the hhds from vm. Turn on vm. File should be accessible.

  4. Add new hdd and sync it to raid1.

  5. Add section with assignment1 description into docx and send by e-mail for checking.

PROCEDURE

Install an Ubuntu Server 20.04 virtual machine using Virtual Box and add two additional HDDs to the VM:

_images/VM-RAID-Minikube-1.png

Establish the connection from Windows to the VM with SSH in PowerShell as shown on the picture below:

_images/VM-RAID-Minikube-2.png

List all the disks of the VM using the lsblk command:image1

Create RAID1 based on sdb and sdc. In order to do that, create two primary partitions sdb1 and sdc1 respectively with the fdisk utility program:

_images/VM-RAID-Minikube-4.png _images/VM-RAID-Minikube-5.png

Check for creation success:

_images/VM-RAID-Minikube-6.png

The two partitions created successfully.

Create a RAID1 array in /dev/md0 based on the created partitions using the mdadm command:

_images/VM-RAID-Minikube-7.png

Create a file system based on RAID1:

_images/VM-RAID-Minikube-8.png

Mount the file system:

_images/VM-RAID-Minikube-9.png

Check for success:

_images/VM-RAID-Minikube-10.png

Save the created partitions to mount them automatically each time the system boots. In order to do that, get the UUID of the RAID1 array:

_images/VM-RAID-Minikube-11.png

Then edit the /etc/fstab file containing the boot information and paste the UUID in there with corresponding options:

_images/VM-RAID-Minikube-12.png

Display the edited file:

_images/VM-RAID-Minikube-13.png

Test RAID1. In order to do that, add a test file in the /mnt directory as shown on the picture below:

_images/VM-RAID-Minikube-14.png

Then remove sdc1 from RAID1 and check if the file is left:image2

The file left unaffected.

Turn off the VM and remove one of the disks:

_images/VM-RAID-Minikube-16.png

Turn the VM back on and display its disks to check if sdc completely removed but the file still left unaffected:

_images/VM-RAID-Minikube-17.png

Turn the VM off and add a new HDD to it:

_images/VM-RAID-Minikube-18.png

Turn the VM back on and display its disks:

_images/VM-RAID-Minikube-19.png

The new HDD detected but not added to RAID. Add it with the following command and check for success:

_images/VM-RAID-Minikube-20.png

The test file still left unaffected.

CONCLUSION

In the conclusion of the laboratory work, the basic utilities of the Ubuntu system studied for working with the file system, partitioning and creating RAID arrays; all steps completed successfully.