Join Grant McWilliams for an in-depth discussion in this video Lab setup, part of Linux System Engineer: Advanced Disk Systems and System Backup.
- [Instructor] In order to set up our lab environment, we'll need to configure the networking, change our host name, and add some virtual drives. Let's start by making a clone of our VM. Select your CENTOS7 Full DVD VM and if the discard button is not grayed out, click it. This will get rid of the running state, which we need to do, otherwise it will remember the old VM settings. Now right click and select Clone. For the Clone name we're going to choose RHHost1. Now we have to choose the type of clone we want.
A full clone makes a completely independent VM that can be moved without the original, but also takes up an equal amount of disk space. However, for our purposes, making a linked clone is perfectly fine and uses less disk space. I'm going to choose Linked Clone. Also check the box titled Reinitialize the Mac Address on All Network Cards. This ensures that the network card Mac address is unique. Now click Clone. Now we should have a virtual machine named RHHost1.
Let's configure the network. Click on RHHost1 and click on Start. After your VM boots up, log in when prompted. To make things easier, I'm going to go into full-screen mode by pressing my Host key and F. In my case, the Host key is the right Control key. So I would press right Control F. On the desktop, click on the top right-hand menu. Click on Wired, and then click on Wired Settings.
Click the on off slider button to turn on the network. And then click the Settings gear in the bottom right-hand corner . Click on Identity and click Connect Automatically. Click on Apply and close the window. Let's also set the host name in our new VM. Click on Applications, Favorites, Terminal. I'm going to make my terminal fullscreen and zoom in the font. Now type in sudo hostnamectl set-hostname rhhost1.localnet.com and hit Enter.
Type in your password if prompted. For better shut-down support, let's also run the ACPID service. We need to install it first. Type in clear and then type in sudu yum install -y acpid and hit Enter. Say yes to any prompts. Now let's enable the service by typing in clear and then typing in sudu systemctl enable acpid and hit Enter.
And then let's start it by typing in sudu systemctl start acpid and hit Enter again. Now you can close your terminal. Let's go back out of full-screen mode by pressing the Host key and F. Again, in my case, it's right- Control key, F. Click on the VM Close gadget. Select Send the Shutdown Signal. And click on Okay. You may have to do this more than once. Now let's add extra drives.
Click on RHHost1, click on Settings, Storage, and click on Controller SATA. We'll add a couple of new drives. These don't have to be very large, so let's make them one gigabyte to save space. You can make yours larger if you have extra physical disk space if you wish. Click the Add New Storage Attachment button at the bottom of the pane. Select Add Hard disk and click on Create New Hard Disk. Let's take the default for hard disk type which should be VDI and click on Next.
Select Dynamically Allocated to save disk space. Now we'll accept the default name and change the size to one gigabyte. Then click on Create. Now go ahead and create three more. Click the Add New Attachment icon. Select Add Hard Disk. Click Create New Disk. Accept the type. Accept Dynamically allocated. Increment the name so it reads NewVirtualDisk2. And change the size to one gig.
Click on Create. Do this two more times, incrementing the name each time. When you're done, you should have four additional drives named NewVirtualDisk1 through NewVirtualDisk4.vdi. Now click on Okay. Our VM drives are ready and we can power the VM back up. Click on Start on the toolbar.
Now let's log in and open a terminal. In the terminal, type in sudu lsblk and hit Enter. Type in your password if prompted. If you see your additional drives, then snapshot the VM. Close the terminal window. And press your Host key, T. In my case, the host key is right Control, so I'm going to press right Control T and I'm going to name the snapshot Drives Added and then click on Okay.
Now you can click the Close gadget and select Power Off The Machine and make sure Restore Current Snapshot Drives Added is selected Click on Okay. Our lab VM is now set up.
- Create partitions
- Backing up the partition table
- Resize partitions
- Managing LVM volumes
- Creating LVM rollback and roll-forward snapshots
- Extending and shrinking LVM volume groups
- Replacing physical volumes in LVM volume groups
- Creating Linux file systems
- Managing swap
- Creating RAID arrays using LVM
- Backing up and restoring files and file systems