Changes

Jump to: navigation, search

OPS235 Lab 4 - Fedora17

1,634 bytes removed, 12:31, 24 September 2018
no edit summary
[[Category:OPS235]][[Category:OPS235 Labs]]
{{Admon/caution|THIS IS AN OLD VERSION OF THE LAB|'''This is an archived version. Do not use this in your OPS235 course.'''}}
= Storage Setup (prior to starting Lab 4) =
* [[Logical Volume Management]]
== Investigation 1: How are LVMs are managed using system-config-lvm? ==
'''Perform this investigation on the VM named ''<u>fedora2</u>''.'''
[[Image:Ops235_lab4_1.png|thumb|right|Screenshot of system-config-lvm in Fedora. Click to enlarge.]]
# Let's learn to manage or administer our LVM graphically for our Virtual Machine ('''Fedora2''').<br />Fedora provides a tool called <code>system-config-lvm</code> to graphically administer LVM. It will appear on the menu as System>Administration>Logical Volume Management. Verify that this package is present, and install it if required (<code>yum install system-config-lvm</code>).
# 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:
#* What are the names and sizes of the PVs?
#* What is the name and size of the VG?
#* What are the names and sizes of the LVs?
#* Is there any space in the VG which is not allocated to a LV?
# Increase the size of the home filesystem to 2 GB:
## Click on the LV containing the home filesystem.
## Click on ''Edit Properties''.
## Change the size to 2 GB and click ''Ok''.
# Create a new 2G LV (LV Properties: linear) containing an ext4 filesystem named lv_archive and mount it at /archive
## Click on ''Logical View''.
## Click the ''Create New Logical Volume''.
## Set the name, size, filesystem, and mount point.
## Click ''Ok''.
# Backup <code>/etc</code> into <code>/archive</code>
#* Copy the files in /etc into the filesystem mounted at <code>/archive</code> (use the graphical tools or the command line. If using cp, remember to use the -R option).
# Shrink the size of <code>lv_archive</code> to 1 GB.
# Try shrinking <code>/</code> -- what happens? Why?
== Investigation 21: How are LVMs are managed using Command-Line Tools ==# You are going to repeat the same LVM management operations (as your did with the ''fedora2'' VMin '''lab3'''), but you will using command-line tools in the '''fedora 3''' VM. Since the fedora3 VM only operates in command-line mode, you will need to refer to the '''"Logical Volume Management"''' link above.
# Write down the exact commands used at each step, and record appropriate command output:
## Determine the current LVM configuration using the <code>pvs</code>, <code>vgs</code>, and <code>lvs</code> command.
## Shrink <code>lv_archive</code> to 1G (use <code>umount</code>, <code>resize2fs</code>, <code>lvreduce</code>, and <code>mount</code>)
== Investigation 32: How can a PV be added to an existing VG? ==
'''Add an additional 2 GB virtual disk to your ''<u>fedora1</u>'' system, and use it as an additional physical volume:'''
# Start <code>virt-manager</code>.
{{Admon/tip|SELinux relabelling may be required|Your system may report that the files are not present in the new /home filesystem when they are clearly there. This is due to the Security-Enhanced Linux system (SELinux) preventing access to the files, because the files were tampered with (moved) and are no longer recognized as home directory content. You can fix this problem by restoring the file context labels so that SELinux accepts the files as valid home directory content: <code>restorecon -r /home</code>}}
== Investigation 43: How can I use LVM to manage storage on my disk pack? ==
'''On your <u>f17host</u> (i.e. "disk pack"), using your choice of the GUI and/or command-line tools:'''
# Create a new logical partition ('''NOT a logical volume!''') - minimum 5G, leaving at least 10G free space in the extended partition.
= User/Group Management =
== Investigation 54: The /etc/passwd file ==
# Look at the /etc/passwd file.
# The user IDs of real users (people) are different from the user IDs of system accounts. What is the pattern?
== Investigation 65: Adding users ==
{{Admon/note|Use f17host|Perform these steps in the '''f17host''' system. Due to a configuration issue, these steps may not work normally in the fedora1 virtual host (previous versions of this lab used fedora1 for this investigation).}}
# Add your matrix account user to '''fedora3'''.
== Investigation 76: Managing Groups ==
{{Admon/note|Use fedora1|Perform these steps in the '''fedora1''' virtual machine.}}
Be sure to record your observations in your lab notes.
== Investigation 87: Deleting users ==
{{Admon/note|Use fedora1|Perform these steps in the '''fedora1''' virtual machine.}}
# Delete the user ops235_2 using the same command with the option which removes the home directory of the user.
# Check the contents of the /home directory. What do you notice?
# Check the contents of the /etc/group directoryfile. What do you notice?
Be sure to record your observations in your lab notes.
 == Investigation 98: Modifying users ==
{{Admon/note|Use fedora1|Perform these steps in the '''fedora1''' virtual machine.}}

Navigation menu