Changes

Jump to: navigation, search

OPS235 Lab 3 - CentOS6

80 bytes removed, 12:30, 24 September 2018
no edit summary
[[Category:OPS235]]
{{Admon/caution|THIS IS AN OLD VERSION OF THE LAB|'''This is an archived version. Do not use this in your OPS235 course.'''}}
 
=Logical Volume Management and Software Package Management=
'''Perform the following steps:'''
 
(Perform investigations 1 - 3 in your host machine (c6host)
# Using information from the man page for <code>rpm</code>, fill in this information:
# Issue the following command: <code>rpm -e lynx</code>
# Issue an RPM query to verify that lynx is no longer installed. Record this command in your lab log-book.
# Move to the appropriate sub-directory for packages that begin with the letter '''b'''.# Issue the following command: <code>rpm -i elinks-0.12-0.21.pre5.el6_3.x86_64.rpm</code> and note the result. Did it work? Explain in your lab log-book why this command may not have worked.
'''Answer the Investigation 2 observations / questions in your lab log book.'''
::* Based on the result, do you think that cups is a useful package for your system? If not, try removing it.
<ol>
<li value="8">Unused and unneeded software can present a security risk and ties up disk space needlessly. Find at least 4 other packages (for example: games, sound & video, etc) that you're not using on your system, and remove them. Be careful to ensure that removing those packages does not also remove other software that you do need.</li>
</ol>
== Investigation 4: Extend the size of lv_root using command-line tools ==
Perform this investigation in fedora3centos3.
Let's say that you have run out of disk space on your computer (fedora3centos3), you need more space on the root filesystem, perhaps to host more webpages or a larger database or new software. What are your options? Getting a replacement harddrive would probably require reinstallation of the operating system and backup/restore of the data.
Because we're using LVM though - we can avoid that. We can add a new harddrive (which will serve as a physical volume) to the volume group, and extend the root logical volume to make use of the new available space.
'''Perform the following operations to increase the size of lv_root in fedora3centos3:'''
<u>'''<font>Steps:</font>'''</u>
lvs
df -h</code>
<li>Open the fedora3 centos3 virtual machine console</li>
<li>Go to the hardware details view</li>
<li>Click "Add Hardware" and add a new storage device of 2GBs, make sure it's a VirtIO disk.</li>
<li>Go back to the console view</li>
<li>Run the same ls command now(performed in step 1), what's changed?</li>
<li>Now we'll make the new device as a physical volume, add it to the volume group, and extend lv_root:</li>
<code>pvcreate /dev/vdb
vgextend vg_fedora3 vg_centos3 /dev/vdb
lvextend -l L +100%FREE 2G -r vg_fedora3vg_centos3/lv_root</code>
<li>Now rerun the ls/pvs/vgs/lvs/df commands. What has changed and what caused those changes?</li>
<li>Among the changes, note that your root filesystem is now 2GB bigger - and you have not even rebooted your machine!</li>
'''Answer the Investigation 4 observations / questions in your lab log book.'''
== Investigation 5: How are LVMs is LVM managed using system-config-lvm? ==
'''Perform this investigation on the VM named ''<u>fedora2centos2</u>''.'''[[Image:Ops235_lab4_1.png|thumb|right|Screenshot of system-config-lvm in FedoraCentOS. Click to enlarge.]]# Let's learn to administer (manage) our LVM graphically for our '''Fedora2centos2''' Virtual Machine.<br />Fedora CentOS provides a tool called <code>system-config-lvm</code> to graphically administer LVM. It will appear on the menu as '''Application'''>'''Other'''>'''Logical Volume Management'''. The package may is not be installed by default, so you will need to install it by issuing: (<code>yum install system-config-lvm</code>).
<ol>
<li value="2">Use this tool to determine the current LVM configuration by clicking on the appropriate element and reading the properties in the right-hand panel -- write down the answers:
</ol>
</li>
<li>Increase the size of the home file-system to '''2 4 GB''':
<ol type="a">
<li>Click on the LV containing the '''home''' filesystem.</li>
<li>Click on ''Edit Properties''.</li>
<li>Change the size to '''2 4 GB''' and click ''Ok''.</li> </ol> <li>Create a '''new 2G LV''' (LV Properties: linear) containing an ext4 filesystem named lv_archive and mount it at '''/archive''' <ol type="a"> <li>Click on ''Logical View''.</li> <li>Click the ''Create New Logical Volume''.</li> <li>Set the name, size, filesystem, and mount point.</li> <li>Click ''Ok''.</li>
</ol>
<li>Create a '''new 3G LV''' (LV Properties: linear) containing an ext4 filesystem named lv_archive and mount it at '''/archive'''
<li>Backup <code>'''/etc'''</code> into <code>'''/archive'''</code></li>
</ol>
If you completed this lab correctly - please make sure you are still making full backups of your virtual machines.
Remember adding a new harddrive to fedora3centos3? You will need to back up that drive as well. If you don't - you will only have half of your machine backed up, which is of no use for a recovery.
= Completing the lab =
'''Arrange evidence for each of these items on your screen, then ask your instructor to review them and sign off on the lab's completion:'''
# nled installed elinks application removed on the host (disk pack - main system f16hostc6host).
# Unnecessary/unused packages have been deleted (list at least 4, and show that they are no longer installed).
# Fresh backup of the virtual machines.

Navigation menu