Open main menu

CDOT Wiki β

Changes

OPS235 Lab 3 Braille

6,514 bytes added, 13:01, 28 February 2012
no edit summary
[[Category:OPS235]][[Category:OPS235 Labs]]
{{Draft}}
{{Admon/caution|Braille Only|If you are not using a braille reader, please use [[OPS235 Lab 2]] instead of this lab.}}
{{Admon/note|htp|Wherever this document says "htp", it should be changed to "http". This was done in order to avoid reported problems with some braille readers.}}
# Confirm that the LV has been resized.
# Record notes about this investigation in your lab book.
 
== Investigation 2: Creating, Growing, and Shrinking a Logical Volume ==
 
# On the VM 'fedora1', perform steps 1-11 from investigation 1 to add additional space to the volume group.
# Use <code>lvcreate</code> to create a new logical volume, 5 GB in size, called "data".
# Use <code>mkfs</code> to format that logical volume with an ext4 filesystem.
# Create a mountpoint named <code>/archive</code>
# Edit <code>/etc/fstab</code> so that the logical volume "data" is mounted on <code>/archive</code> each time the system is booted. The line will look like this: <code>/dev/vg_fedora3/data /archive ext4 defaults 1 2"
# Note the meaning of each field in the <code>/etc/fstab</code> file:
## Device node name
## Mountpoint
## Filesystem type (can be "auto")
## Mount options (can be "defaults")
## Whether the filesystem contains data that should be backed up (0 for no, 1 for yes) - this is used by the "dump" backup program (and some others).
## The order in which the filesystem should be checked at boot (1 for the root filesystem, 2 for all other filesystems which are to be checked, and 0 if the filesystem should not be checked).
# Test the <code>/etc/fstab</code> file: <code>mount -a</code> # If any errors are reported, fix them before proceeding, or your system may not be able to boot!
# Reboot the system to confirm that the <code>/archive</code> filesystem is mounted automatically.
# Verify the size of the <code>/archive</code> filesystem using: <code>df -h</code> # Record the size.
# Copy the contents of the <code>/etc</code> directory to <code>/archive</code> using <code>cp -R</code>
# Shrink the size of the LV and filesystem to 1G using these commands:
#* <code>umount ''devicename''</code>
#* <code>fsck -f ''devicename''</code>
#* <code>lvreduce ''vgname''/''lvname'' -r --size -1G</code> # The -r is critically important!
#* <code>mount ''devicename''</code>
# Note the function of each command, above.
# Verify the size of the <code>/archive</code> filesystem using: <code>df -h</code> # The size should have been reduced by 1 GB.
# Grow the <code>/archive</code> LV and filesystem by 3 GB while mounted using <code>lvextend</code> with the <code>-r</code> option.
# Verify that the filesystem grew.
# Unmount <code>/archive</code>, delete the lv, and remove the corresponding entry from <code>/etc/fstab</code>
 
Record notes about this investigation in your lab book.
= Software Package Management =
 
== Investigation 3: How do you query the RPM database? ==
 
RPM maintains a database of installed software. This information is very useful to system administrators. In Lab 3, you queried that database using RPM with the -q argument. When you query the RPM database, you can separately specify:
:* Which packages you want information about, using a select-option
:* What information you want about those packages, using a query-option
 
'''Perform the following steps:'''
 
# Using information from the man page for <code>rpm</code>, fill in this information:
 
{|width="100%" border="1" cellpadding="5"
|-
!Option
!Meaning
!Is this a select-option or a query-option?
|-
| -a
|Select all packages
|select-option
|-
| -l
|
|
|-
| -p ''filename'''
|Select this uninstalled package
|
|-
| -i
|Show the package license, packager, URL, description, and other general information.
|
|-
| -f '''filename'''
|
|
|-
|'''packagename'''
|Select just this package
|select-option
|}
 
'''Answer the Investigation 3 observations / table contents in your lab log book.'''
 
 
== Investigation 4: How do you install and remove software with RPM? ==
 
# Change to the directory on your Installation DVD containing the file: <code>lynx-2.8.7-7.fc16.x86_64.rpm</code>
# Execute this command: <code>rpm -i lynx-2.8.7-7.fc16.x86_64.rpm</code>
# Issue an RPM query to check that lynx is installed.
# Issue this command: <code>rpm -e lynx</code>
# Issue an RPM query to verify that lynx is no longer installed.
# Issue this command: <code>rpm -i BackupPC-3.2.1-6.fc16.x86_64.rpm</code> and note the result
 
'''Answer the Investigation 4 observations / questions in your lab log book.'''
 
== Investigation 4: How do you install and remove software with ''yum''? ==
 
{{Admon/note|Internet Connection|In order for yum to work you require a connection to the Internet. Establish this connection by using the browser to log into SeneNET}}
 
# Change to your home directory.
 
<ol>
<li value="2">Issue the command: <code>yum install BackupPC</code> and answer <code>y</code> to the question about installation.
<ol type="a">
<li>Where did ''yum'' get the BackupPC software?</li>
<li>Why could ''yum'' install BackupPC when rpm couldn't?</li>
</ol>
</li>
<li>Issue an RPM query to verify that BackupPC is installed.</li>
<li>Issue the command: <code>yum remove BackupPC</code></li>
<li>Issue an RPM query to verify that BackupPC is no longer installed.</li>
<li>Install <code>nled</code> using '''yum'''.</li>
<li>Issue this command: <code>yum info cups</code></li>
</ol>
::* 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 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>
 
'''Answer the Investigation 5 observations / questions in your lab log book.'''
 
 
= Completing the lab =
 
When you have successfully completed this lab, make a new backup of your virtual machines. Remember to backup the additional image files you created!
 
 
= Preparing for the Quizzes =
 
# Describe the steps to switch between text-based and graphical consoles on your f16host system.
# List the steps required to swap sizes between lv_root and lv_home logical volumes on your f16host system.
# What is a VG? PV? LV?
# What commands are used to determine VG / PV / LV information?
# What does yum do that rpm does not?
# List the steps to install a package via rpm command.
# List the steps to determine detailed information regarding an install package.
# List the steps to remove a package via rpm command.
# List the steps to install a package using the yum command.
# List the steps to remove a package using the yum command.
# What is the total size of the "main" VG on your system?
# How do you create a LV?
# How do you delete an LV?
# How would you increase the size of the root filesystem by 50 MB?