Linux in the Cloud
Scenario 1: The database server called centos-host is running short on space! You have been asked to add an LVM volume for the Database team using some of the existing disks on this server.
Inspect the requirements in detail by clicking on the icons of the interactive architecture diagram on the right and complete the tasks. Once done click on the Check button to validate your work.
Solution:
1. The first step is to switch from bob@centos to a root user and then check any of the logical volumes
2. Next I need to install the correct packages so that I can use lvm on the centos machine using the command "yum install -y lvm2"
3. Next I need to create a physical volume for "/dev/vdb" and "/dev/vdc", then create a volume group titled "dba_storage by using the physical volumes of "/dev/vdb" and "/dev/vdc". Then, I'll create an "lvm" called volume_1 taken from the volume group of "dba_storage" It is important to use the entire space available within the volume group.
4. Next, I need to format the lvm volume as an XFS filesystem, then mount the filesystem at the path "/mnt/dba_storage"
5. I need to make sure that this mount point is persistent across reboots configured with the right default options
6. Next I need to create a group called "dba_users" and add the user "bob" to this group
7. Last, I need to make sure that the mountpoint of /mnt/dbastorage has the group ownership set to the dba_users group. Then make sure that the mount point /mnt/dba_storage has read/write and execute permissions for the owner and group and no permissions for anybody else.