Standard Operating and Maintenance Procedures

advertisement
Guide to Operating Systems,
4th ed.
Chapter 11: Standard Operating and
Maintenance Procedures
Objectives
• Explain file system maintenance techniques for different
operating systems
• Perform regular file system maintenance by finding and
deleting unused files and directories
• Perform disk maintenance that includes defragmenting,
relocating files and folders, running disk and file repair
utilities, and selecting RAID options
• Explain the types of backups and develop a backup
plan
• Explain how to install software for best performance
• Tune operating systems for optimal performance
Guide to Operating Systems, 4th ed.
2
File System Maintenance
• Successful file system maintenance is closely linked
to the file structure on a computer.
• A well-planned file structure makes it easy to locate
files, update files, share folders and files, back up
and archive files, and delete unwanted files.
• On server OSs, well-designed file structures
favorably impact network performances and security.
Guide to Operating Systems, 4th ed.
3
File System Maintenance
• Basic rules for creating a file structure:
–
–
–
–
–
Keep a manageable number of directories in the root directory.
Keep OS files in the default directories.
Keep different versions of software in their own directories.
Keep data files in directories on the basis of their functions.
Design home directories to match the functions of users in an
organization.
– Group files with similar security needs within the same
directories.
Guide to Operating Systems, 4th ed.
4
File System Maintenance
• It does not take long for the number of directories
in the root directory to proliferate.
• Most Windows software vendors install their
applications in the default directory – Program
Files.
• If you have 30 or so software applications, it can
make sense to create one or two directories within
the root that are intended for software applications,
and then create subdirectories within each main
applications directory to contain particular
applications.
Guide to Operating Systems, 4th ed.
5
File System Maintenance
Example directories in the root directory for Windows 7
Guide to Operating Systems, 4th ed.
6
File System Maintenance
• Example root directory structure in UNIX/Linux
includes the following directories:
–
–
–
–
–
–
–
–
–
–
–
bin for files to start the OS and perform essential OS tasks (binary)
lib for libraries including settings used by the OS.
usr for users’ files and user programs.
var for files in which the content varies or are used temporarily.
tmp for files used only temporarily.
dev for devices such as keyboard and mouse.
mnt for DVD/CD-ROM drives, and other removable media.
etc for system and config files, including files needed at startup.
sbin for user programs and utilities (system binary files).
home for users’ home directories.
proc for system resource tracking.
Guide to Operating Systems, 4th ed.
7
File System Maintenance
• Some examples of folders in the root of a Mac OS
X Leopard/Snow Leopard (many same as UNIX):
–
–
–
–
–
–
–
–
–
–
–
–
Applications – software applications
bin – same use as in UNIX
dev – same use as in UNIX
etc – same use as in UNIX
home for users’ home directories
Library for shared library files
network for network devices, files for servers, and network-related
libraries of functions
System for system files
Tmp – same as in UNIX
Users - for user accounts (containing a subfolder for each
account)
Var – Same use as in UNIX
8
Volumes for mounted volumes including hard disks
File System Maintenance
• OS directories are typically placed in the root
directory and have appropriate subdirectories
under a main directory
Guide to Operating Systems, 4th ed.
9
File System Maintenance
• Each user account in Mac OS X Leopard/Snow
Leopard (many same as UNIX):
–
–
–
–
–
–
–
–
–
–
–
–
Applications – software applications
bin – same use as in UNIX
dev – same use as in UNIX
etc – same use as in UNIX
home for users’ home directories
Library for shared library files
network for network devices, files for servers, and network-related
libraries of functions
System for system files
Tmp – same as in UNIX
Users - for user accounts (containing a subfolder for each
account)
Var – Same use as in UNIX
10
Volumes for mounted volumes including hard disks
File System Maintenance
• In addition to folders off the root, each user account
in Mac OS X Snow Leopard typically contains
folders such as:
–
–
–
–
–
–
–
–
Desktop – for files that are on the user’s desktop.
Downloads – for downloaded files, such as from the Internet.
Library – for support files, such as fonts used by the account.
Movies – for movies that can be played on the computer.
Music - for music files.
Pictures – for picture files.
Public – for files to share with others over a network.
Sites – for personal website and Web-formatted (HTML) files to be
shared over a network or the Internet.
11
File System Maintenance
• Operating system directories are typically placed in
the root directory and have appropriate
subdirectories under a main directory.
– Windows 7 OS system files are contained in the Windows
directory, which has subdirectories such as System, System32,
and SysWOW64.
– Macintosh system files are kept in the bin, dev, etc, Library,
network,sbin, System, and Volumes directories.
– UNIX/Linux system files are in the bin, dev, etc, lib, mnt, proc,
sbin, and other directories depending on the distribution.
12
File System Maintenance
• Advantages to installing and leaving OS files in
default directories:
– Easier for others to help with computer problems
– Many software installations expect OS files to be in the default
locations
– Files are more easily found by uninstall programs if it becomes
necessary to uninstall software
• If different versions of software are still used:
– Put different versions in different subdirectories under a main
applications directory
• Example: If Microsoft Word 2007 and 2010 are being used, create
Word2007 and Word2010 subdirectories under the Program Files
directory
Guide to Operating Systems, 4th ed.
13
File System Maintenance
• Some directory structures offer special locations for
data files
– Example: Word processing, spreadsheet and database files
should be stored as subdirectories under a root directory called
Data
• On a file server, files might be stored on the basis
of directories set up for departments
• Home directories on a server often reflect the
organizational structure.
• Helps organize data based on users.
Guide to Operating Systems, 4th ed.
14
Finding and Deleting Files
• A solid file structure makes it easier to find and
delete unneeded files.
– Temporary files are often created when you install new
software and running some applications and are sometimes not
deleted automatically.
• Some software applications do not completely delete temporary
files when the application installation is finished.
• Some software applications create temporary files that are not
deleted when the application is improperly terminated.
• Most installations create a temporary directory and
a set of temporary files that are stored in a main
temporary directory under the root directory or
under an account’s home directory.
Guide to Operating Systems, 4th ed.
15
Finding and Deleting Files
• Web browsers write an impressive number of
temporary Internet files that are not deleted, unless
you set an expiration date, or delete them using an
OS utility or utility that comes with the Web
browser.
• In most cases, the files can be deleted regularly.
– Some cookies may be kept because they contain specialized
information for accessing particular websites.
– Many cookies are deleted because they do not contain
information that is needed by the computer user and only take
up space.
– Some users regularly delete all cookies, because new ones are
created anyway when they re-access websites.
• It is good practice to implement a regular schedule
16
for finding and deleting temporary files.
Deleting Temporary Files in Windows
• Windows XP/Vista/7, Server 2003/R2, and Server
2008/R2:
– Use the Disk Cleanup Tool to select which files to delete (some
examples are listed below):
•
•
•
•
•
•
Downloaded program files
Temporary Internet files
Recycle Bin
Setup log files
System error memory dump files
Temporary files
– Use search tool to search for and delete all files with .tmp file
extension
– Right-click Recycle Bin on desktop and select Empty Recycle Bin
Guide to Operating Systems, 4th ed.
17
Deleting Temporary Files in Windows
• In Windows XP/Vista/7, Server 2003/R2, and
Server 2008 R2, temporary files are typically
located in the \Temp and |Windows\Temp folders,
as well as other locations, such as in users’ home
directories.
• In Windows XP and Windows Server 2003/Server
2003 R2, temporary Internet files from Internet
Explorer are in the \Documents and
Settings\accountname\Local Settings\Temporary
Internet Files directory.
Guide to Operating Systems, 4th ed.
18
Deleting Temporary Files in Windows
• A convenient way to delete unneeded files in
Windows OSs is to use the Disk Cleanup tool.
• In Windows 7 and Windows Server 2008 R2, you
can start Disk Cleanup by:
– Clicking Start;
– Typing Disk Cleanup in the Search programs and files text box
on the Start menu;
– Click Disk Cleanup.
• For Windows XP:
–
–
–
–
–
Click Start;
Point to All Programs;
Point to or click Accessories;
Point to or click System Tools;
Click Disk Cleanup.
Guide to Operating Systems, 4th ed.
19
Deleting Temporary Files in Windows
Starting Disk Cleanup in Windows 7
Guide to Operating Systems, 4th ed.
20
Deleting Temporary Files in Windows
• When you start Disk Cleanup, it scans your disk to
determine the amount of space that can be
restored after cleaning (removing) specific types of
files.
–
–
–
–
–
–
–
–
–
–
Downloaded program files
Temporary Internet files
Offline Web pages;
Hibernation file cleaner (In Windows Vista only)
Debug dump files;
Recycle Bin
Setup log files
System error memory dump files
Temporary files
Thumbnails
Guide to Operating Systems, 4th ed.
21
Deleting Temporary Files in Windows
• When you start Disk Cleanup, it scans your disk to
determine the amount of space that can be
restored after cleaning (removing) specific types of
files.
–
–
–
–
–
–
Per user archived Windows Error Reporting (WEP) files;
Per user queued Windows error reporting;
Systen archived Windows Error Reporting;
Catalog files for the Content Indexer (Windows XP);
Web Client/publisher temporary files (Windows XP);
Other temporary files depending on installed applications.
Guide to Operating Systems, 4th ed.
22
UNIX/Linux
• View UNIX/Linux files by using the ls command
– Some of the options that can be used with this command:
•
•
•
•
•
•
•
•
•
-a lists all files including hidden files
-C formats the listing in columns for easier reading
-d lists directories
-f displays files in an unsorted list
-l presents detailed information including permissions and file size
-r sorts files in reverse alphabetical order
-s displays the size of files (in blocks)
-S sorts files and directories on the basis of size
-t sorts files and directories on the basis of time they were last
modified
– Example: ls –a lists all files including hidden files
Guide to Operating Systems, 4th ed.
23
UNIX/Linux
• Linux with GNOME desktop allows you to view files
through a graphical interface
Guide to Operating Systems, 4th ed.
24
UNIX/Linux
• Files and folders are deleted by using the remove
(rm) command
– Options for this command:
• -i for interactive option (asks if you are sure you want to delete)
• -r for recursive (used to delete the entire directory contents)
– Example: rm /home/mjackson/docs *.txt
• This command will delete all files with a .txt extension in the
mjackson directory
• In the Linux GNOME Nautilus tool, you delete a file
by finding the file, click on it and press the delete
key on your keyboard
Guide to Operating Systems, 4th ed.
25
UNIX/Linux
• A file can be found by using the find command
– Options that can be used with this command:
•
•
•
•
•
•
•
-atime for last access time
-ctime for last changed time
-mtime for last modification time
-name for the filename, including the use of wildcard searches
-print to print the results of the find
-size for file size (in blocks or bytes; with bytes specified by a “c”)
-user to find files by ownership
• Example: to find a all files in directory/usr that are
owned by the user lpadron:
– find / -user lpadron
Guide to Operating Systems, 4th ed.
26
UNIX/Linux
• UNIX/Linux provides commands to help you
assess the allocation of disk space:
– df – enables you to view information on the basis of the file
system.
• It provides statistics on the total number of blocks, the number
used, the number available, and the % of capacity used.
– du – used to display statistics for a given directory and its
subdirectories, or for a subdirectory alone.
Guide to Operating Systems, 4th ed.
27
UNIX/Linux
• On a UNIX/Linux computer that acts as a server,
the administrator can set up disk quotas.
– A disk quota can be established in blocks for each user as a
way to ensure that users do not occupy all of the disk space.
• A disk quota is set by using the edquota command that opens the
quota file for editing.
• The quota file must first be created by the administrator, or in
some versions of UNIX/Linux, it is created automatically when you
first use edquota.
Guide to Operating Systems, 4th ed.
28
UNIX/Linux
UNIX/Linux disk quotas for server users
Guide to Operating Systems, 4th ed.
29
Mac OS X
• Mac OS X Leopard and Snow Leopard are
generally effective in automatically cleaning out
temporary files on a regular basis.
– However, it is still important to periodically find and delete
unneeded files.
Guide to Operating Systems, 4th ed.
30
Mac OS X
Displaying file sizes in Mac OS X Snow
Leopard
Guide to Operating Systems, 4th ed.
31
Maintaining Disks
• It is important to perform disk maintenance in order
to maintain the integrity of files and to ensure disk
performance.
• Important disk maintenance tasks include:
–
–
–
–
Defragmenting disks
Moving files to spread the load between multiple disks
Using disk utilities to find and repair damaged files
Deploying RAID techniques that extend the life of disks and
provide disk redundancy
Guide to Operating Systems, 4th ed.
32
Defragmenting Disks
• Fragmentation – means that unused space
develops between files and other information written
on a disk
• When an OS is first installed, files are placed
contiguously on a disk (little or no unused space
between files)
Guide to Operating Systems, 4th ed.
33
Defragmenting Disks
Files located contiguously on a disk
Guide to Operating Systems, 4th ed.
34
Defragmenting Disks
• As the OS deletes files, creates new files, and
modifies files, the unused space between them grows
and becomes scattered.
• The greater the fragmentation, the more space is
wasted.
• The disk read/write head must move over more disk
area to find individual files and data in files.
Guide to Operating Systems, 4th ed.
35
Defragmenting Disks
• When the disk read/write head must move over more
disk area to find information, two problems result:
– The read/write head works harder when there is more disk
fragmentation, resulting in a possible hardware failure.
• The problem is apparent through excessive noise and hard disk
activity.
Guide to Operating Systems, 4th ed.
36
Defragmenting Disks
A fragmented disk
Guide to Operating Systems, 4th ed.
37
Defragmenting Disks
• Defragmentation – the process of removing the
empty pockets between files and other information
on a hard drive.
• Two ways to defragment:
– Older method is to take a complete backup of a disk’s contents
and perform a full restore.
• Some administrators run a surface analysis of a disk before the
restore to find damaged disk sectors and tracks.
– Some surface analysis tools are destructive to data and attempt to
reformat the damaged area to determine if it can be recovered.
– Others are not destructive to data because they relocate information
from a damaged disk area to an undamaged location, and then mark
the damaged area as off limits so that no files can be written there.
Guide to Operating Systems, 4th ed.
38
Defragmenting Disks
• Two ways to defragment:
– Another option is to run a disk defragmentation tool.
• Many OSs come with a built-in defrag tool.
• Some can run in the background as you use your computer.
• Some perform a quick analysis to see if defrag is even needed.
– If disk fragmentation is 20% or less, defrag is not needed.
Guide to Operating Systems, 4th ed.
39
Defragmenting Disks
• You can start Disk Defragmenter and analyze a
disk for fragmentation in any of these Windows
OSs by:
–
–
–
–
–
Click Start;
Point to All Programs;
Point to or click Accessories;
Point to or click System Tools;
Click Disk Defragmenter.
Guide to Operating Systems, 4th ed.
40
Defragmenting Disks
• To determine if a disk or volume needs to be
defragmented, click the disk and click Analyze (in
Windows 7 or Server 2008 R2) in the Disk
Defragmenter window.
– In Windows Vista and Server 2008 you will not see a listing of
disks or the Analyze or Analyze disk button because an
analysis is done automatically when Disk Defragmenter is
started.
Guide to Operating Systems, 4th ed.
41
Defragmenting Disks
• In UNIX/Linux and Mac OS X, file systems are
designed to reduce the need for defragmenting a
disk
– These OSs first write to a hidden journal, which is loaded into
memory and then the contents are written to disk in a linear
fashion, not a sequential fashion.
• Linear – data is temporarily stored and written all at one time in
more contiguous spaces.
– These file systems can use methods, such as writing to consecutive
space and writing to existing fragmented areas, to minimize
fragmentation.
• Sequential – data is not stored but written as soon as it is created
and therefore written to whatever disk areas are immediately
open.
– Defragmentation tools are usually not included with these Oss.
42
Defragmenting Disks
• Earlier version of Mac OS and Mac OS X had
problems with memory fragmentation.
– Pockets of unused space developed in memory.
• Receiving a message that there is not enough
memory can be an indication of memory
fragmentation.
• Mac OS X Leopard and Snow Leopard use much
improved malloc (memory allocation tools)
subroutines in the OS to better address memory
fragmentation so that the user typically does not
experience this problem.
43
Defragmenting Disks
• Should the user experience messages indicating
there is not enough memory, there are four ways to
handle possible memory fragmentation:
–
–
–
–
Implement virtual memory.
Close all open applications.
Shut down and restart the computer.
Open your least-used applications first and the most used
applications last.
• Close the applications in the reverse order in which they were
opened.
44
Moving Disk Files to Spread the Load
• A technique that can help extend the life of disk
drives is to spread files evenly across disks when
there is more than one disk.
– Usually used in servers.
– Before files are moved, the server administrator examines disk
and file activity to determine how to spread files across the disk
drives to achieve even loading in terms of activity.
• Files must be moved on the basis of their functions so that files
containing related information are on the same drive.
– Disk activity is monitored in Windows OSs using Performance
Monitor.
– Resources in use can be viewed with the Computer
Management tool in Windows.
Guide to Operating Systems, 4th ed.
45
Moving Disk Files to Spread the Load
Studying resource use in Windows 7 using
the Computer Management Tool
Guide to Operating Systems, 4th ed.
46
Using Disk Utilities to Repair Damaged
Files
• The following utilities enable you to repair damaged
files and file links:
– Disk First Aid in the Mac OS X Disk Utility
– fsck and p_fsck in UNIX/Linux
– chkdsk in Windows
• Disk First Aid – verifies files, folders, and mounted
disks.
– Will also repair a disk and disk permissions
– Disk First Aid is combine with the Disk Utility
Guide to Operating Systems, 4th ed.
47
Using Disk Utilities to Repair Damaged
Files
• Disk First Aid
– To access Disk First Aid from Finder:
•
•
•
•
•
Click Go;
Click Utilities;
Double-click Disk Utility;
Select a disk;
Access the First Aid tab.
Guide to Operating Systems, 4th ed.
48
Using Disk Utilities to Repair Damaged
Files
• fsck utility – used to check one or more file systems
–
–
–
–
–
–
–
–
Looks for orphaned files without names;
Bad directory pointers;
Inode problems;
Directories that do not exist;
Bad links;
Bad blocks;
Duplicated blocks;
Pathname problems.
• If it finds problems – it gives you the opportunity to fix or disregard
the problem.
Guide to Operating Systems, 4th ed.
49
Using Disk Utilities to Repair Damaged
Files
• fsck utility
– To use fsck:
• Enter the command along with a file list.
• p_fsck utility – checks two or more file systems
simultaneously (instead of one at a time)
– Should not be applied to the root file system
Guide to Operating Systems, 4th ed.
50
Using Disk Utilities to Repair Damaged
Files
• chkdsk utility runs in the Command Prompt window
in Windows OSs.
– chkdsk can find and fix the following:
• Damage to the root directory or other directory;
• Problems with the directory structure that cause chkdsk to be
unable to process the full tree;
• Indexes created to find files and folders faster;
• Security descriptors;
• Unallocated disk space;
• Files that share the same allocation units;
• A file pointer to an allocation unit that does not exist;
• Files assigned more allocation units than they need;
• Directories without entries;
Guide to Operating Systems, 4th ed.
51
Using Disk Utilities to Repair Damaged
Files
• chkdsk utility runs in the Command Prompt window
in Windows OSs.
– chkdsk can find and fix the following:
•
•
•
•
Damaged directories that cannot be repaired;
A full root directory (512 files);
Unreadable disk sectors;
Damaged subdirectory entries;
– Damaged pointers to parent directories;
• Allocation units that contain partial information, but have no links
to files;
• Bad file attributes.
Guide to Operating Systems, 4th ed.
52
Using Disk Utilities to Repair Damaged
Files
• chkdsk utility also verifies the NTFS file system
journal.
• /f switch instructs chkdsk to repair errors without a
yes or no interactive query.
• You can have chkdsk check a specific drive,
directory, or file by using the drive letter or path
after the chkdsk command.
– For example: chkdsk D: /f checks drive D and automatically
fixes errors.
Guide to Operating Systems, 4th ed.
53
Using Disk Utilities to Repair Damaged
Files
• Chkdsk
– Two additional switches:
– /r – instructs chkdsk to look for bad sectors and attempt to
relocate information that it is able to read.
– /l:size – used to change the size of the log file in NTFS.
• In modern Windows Oss:
– Chkdsk runs automatically when the OS boots;
– Determines is there might be disk or file corruption;
– Attempts to fix a problem.
Guide to Operating Systems, 4th ed.
54
Deploying RAID Techniques
• RAID - used by server operating systems for three
purposes:
– Increased reliability (providing data recovery when a disk drive
fails and extending the useful life of disks);
– Increased storage capacity;
– Increased speed.
Guide to Operating Systems, 4th ed.
55
Deploying RAID Techniques
• To extend the life of a set of disks, RAID uses disk
striping
– A technique for spreading data over multiple disk volumes.
• When a file is written to a striped disk set, portions of that file are
spread across the set.
• Striping ensures that the load resulting from reading and writing to
disks is spread evenly across the set of disks.
• The disks experience equal wear, rather than placing extra load on
one or two disks that a re likely to wear out sooner.
Guide to Operating Systems, 4th ed.
56
Deploying RAID Techniques
• Basic RAID levels:
– RAID level 0 – provides disk striping only and requires the use
of two or more disks.
– RAID level 1 – uses two disks that are mirror images of one
another so that if one fails, the other one takes over. It does not
use disk striping to extend the life of disks.
• A variation of RAID level 1 uses duplexing, which duplicates the
controller card as well as the disk.
– RAID level 2 – provides disk striping, and all disks contain
information to help recover data in case one fails.
– RAID level 3 – same as RAID level 2, but error recovery
information is on one disk only.
– RAID level 4 – Provides disk striping, as in RAID level 2, and
adds checksum verification information that is stored on one
disk in the array.
Guide to Operating Systems, 4th ed.
57
Deploying RAID Techniques
• Basic RAID levels (continued):
– RAID level 5 – same as RAID level 4, except that checksum
verification information is stored on all disks in the array.
• Level 5 includes the ability to replace a failed drive and rebuild it
without shutting down the drive array or server.
– RAID level 10 (or RAID 1+0) – considered the most effective
form of RAID – combines RAID levels 0 and 1 so that drives
are striped and then mirrored.
• Can be expensive because each drive has a mirrored drive,
generally resulting in the use of more drives than other types of
RAID.
• Multiple drives can fail and data is still recovered, unless both the
main and mirrored drive in a set fail.
• Requires a minimum of four disks and offers fine performance.
Guide to Operating Systems, 4th ed.
58
Deploying RAID Techniques
• Basic RAID levels (continued):
– RAID levels 2,3, and 4 are rarely used because RAID levels 1,
5 and 10 provide better fault tolerance
• Two ways to deploy RAID:
– Hardware RAID:
• Controlled through a specialized RAID adapter that has its own
RAID software on a chip, which usually provides extra
redundancy, such as battery backup for the RAID logic in the
adapter.
– Software RAID:
• Set up and managed by the server OS, and it does not have as
many redundancy features as hardware RAID.
– Slower than hardware RAID.
Guide to Operating Systems, 4th ed.
59
Making Backups
• It is vital to back up your OS and data files before
an OS upgrade.
• It is also essential to back up these files as a
regular maintenance practice.
• Most computer OSs have built-in backup utilities or
backup software can be purchased separately.
Guide to Operating Systems, 4th ed.
60
Making Backups
• Several types of backups:
– Binary backup – backs up the disk contents in binary format to
create an exact image of the disk contents.
• Simple to perform and includes everything on the disk.
• Disadvantage
– Cannot restore individual files or directories.
– When you perform a restore, the target disk drive must be the same
size or larger than the disk drive from which the backup was made.
Guide to Operating Systems, 4th ed.
61
Making Backups
• Several types of backups:
– Full file-by-file backup – all of the disk contents are backed
up, but as individual directories and files.
• Enables you to restore a single directory or a given set of files
without restoring the entire disk contents.
• Some backup schemes call for a full file-by-file backup to be
performed at the end of each workday, as long as the total amount
of information on the disk is not too prohibitive.
• If the disks hold lots of information, then it is common to perform a
full file-by-file backup once a week and partial backups on the
other days of the week.
Guide to Operating Systems, 4th ed.
62
Making Backups
• Several types of backups:
– There are two kinds of partial backups:
• Differential backup – backs up all files that have an archive
attribute (indicates that the file needs to be backed up), but does
not remove the archive attribute.
• Incremental backup – backs up all files that have the archive
attribute, and removes the attribute from each file after backup.
Guide to Operating Systems, 4th ed.
63
Making Backups
• Basic backup scheme might include:
– Full file-by-file backup to tape each Saturday evening and
differential backups to tape Monday through Friday
– The business might also have four sets of tapes that are
rotated each week
• First tape set would be used in week 1
• Second tape set would be used in week 2, and so on
• If one tape set goes bad, there is an option to use one of the tape
sets from a previous week to restore, if needed
– If there was a catastrophic disk failure on Thursday:
• The business would restore the full backup from the previous
Saturday and restore the differential backup from Wednesday
night
Guide to Operating Systems, 4th ed.
64
Making Backups
• When creating a backup strategy:
– Determine what information needs to be backed up and how
often.
• Some files (the OS files, for example) only need to be backed up
infrequently.
• Other information needs to be backed up much more frequently.
• Develop a backup plan that enables you to back up the OS on an
as needed basis and specific files as often as they are modified or
created.
– Use scheduling software – so you don’t inadvertently miss a
backup.
• Windows native backup software, Mac OS X Time Machine, and
third-party software offer the ability to schedule when backups are
performed.
Guide to Operating Systems, 4th ed.
65
Making Backups
• When creating a backup strategy:
– Choose the right backup media – if you need to back up large
amounts of data and store it for years or decades, consider
high-quality tapes.
– Rotate backup media – have one or more full sets of media.
• To protect against media failure, rotate the media every week, two
weeks, or once a month, depending on the value of your data.
– Store a set of backups in an off-site location.
– Regularly use file repair tools and a virus checker.
– Investigate third-party backup software.
Guide to Operating Systems, 4th ed.
66
Optimizing Software Installation
• One aspect of software installation is to plan and
set up a well-organized directory structure.
– Influences the ease of the installation;
– Provides the ability to keep different versions in separate
places ;
– Enables you to smoothly uninstall software.
Guide to Operating Systems, 4th ed.
67
Optimizing Software Installation
• Other Guidelines checklist for software installation:
– Make sure that the software is compatible with your OS.
– Check the CPU, RAM, disk storage, audio, video, and other
requirements to make sure you meet minimum requirements of
the software to be installed.
– Find out if there are different installation options.
• One with or without tutoring applications to help you learn the
software.
– Use the utilities provided by the OS for installing or uninstalling
applications.
• In Windows, there is likely to be a Windows-compatible setup
program that comes with the software for installing the program.
• In Windows use Control Panel to uninstall a program.
Guide to Operating Systems, 4th ed.
68
Optimizing Software Installation
• Guidelines checklist for software installation (cont):
– Look in the documentation, or ask your vendor, for software
that is written to take advantage of your OS’s development
environment.
• In Windows, look for software containing Windows development
features.
– New versions of Microsoft.NET Framework components
– Windows Communication Foundation (for Web-based transactions)
– ASP.NET for Web-based applications
• In UNIX/Linux and Mac OS X, look for well-tested software,
including open-source software that is written to take advantage of
the most recent UNIX or Linux kernel version.
Guide to Operating Systems, 4th ed.
69
Optimizing Software Installation
• Guidelines checklist for software installation (cont):
– Check the vendor’s “bug” list to make sure there are no bugs
that will impact the way you will use the software.
– Make sure the software is well documented and supported by
the vendor, and that the vendor can provide the required
drivers, if applicable.
– Determine, in advance, how to back up important files
associated with the software and find out the locations and
purposes of all program and data files, including hidden files.
– Determine if running the program requires adjustments to page
or swap files used by the OS.
– Find out what temporary files are created by the program and
where they are created.
Guide to Operating Systems, 4th ed.
70
Optimizing Software Installation
• Guidelines checklist for software installation (cont):
– Always install the latest versions of components.
• .dll, .ocx, .ini, .inf, .drv files
• Generally available directly from the software vendor or on the
vendor’s website.
– Do not mix .inf and driver files between different versions of
Windows.
• Some other software on the computer may no longer work.
– Always keep service packs and program patches up to date for
all software.
• Service packs are issued for Microsoft applications to fix software
problems, address compatibility issues, and add enhancements.
Guide to Operating Systems, 4th ed.
71
Optimizing Software Installation
• Consider the following when installing software on a
network server:
– Make sure there are enough licenses to match the number of users.
– Determine the network load created by software.
• Client/server, cloud, database, multimedia applications.
– Consider purchasing management software that can automatically
update system-wide software when there is a new release.
• This ensures that all users are on the same version of word-processing or
database software, for example.
• Microsoft System Center Configuration Manager.
– Determine if the software will be used in a cloud, client/server, terminal
server/remote desktop services environment or if it will be loaded
directly onto server clients.
– Consider publishing or assigning software offered from Windows
Server 2003/R2 or Server 2008/R2.
Guide to Operating Systems, 4th ed.
72
Optimizing Software Installation
• Consider the following when installing network server
software:
– Determine if the server or client workstations must be tuned for the
software in a particular way.
• Modifying page files or registry entries.
– For OSs that support two or more file systems, make sure that the
software is compatible with the file system used by the OS.
Guide to Operating Systems, 4th ed.
73
Tuning the Operating System
• After an OS is installed, periodic tuning is a must.
– Performance is not what you expected.
– Performance seems to decrease with time.
– Slow workstations and servers have a cumulative impact on a
network
• Sometimes poor network performance is not a
result of network problems or too little bandwidth.
– A preponderance of workstations and servers that cannot keep
up with the network.
– This is an often overlooked area that can result in huge dollar
savings for and organization.
It is much less expensive to tune servers and workstations than
to invest in faster and very expensive network devices, such as
routers and switches.
Guide to Operating Systems, 4th ed.
74
Tuning the Operating System
• There are many ways to tune OSs to achieve
better performance, including:
– Tuning virtual memory;
– Installing OS updates and patches;
– Tuning for optimal network communications.
Guide to Operating Systems, 4th ed.
75
Tuning Virtual Memory
• Virtual memory – disk storage that is used when
there is not enough RAM for a particular operation,
or for all processes currently in use.
– CPU, in conjunction with the OS, can swap to disk (VM) the
processes and data in RAM that temporarily have a low priority,
or that are not in immediate use.
– When the CPU and OS need to access information on disk,
they swap something else to disk, and read the information
they need back into RAM.
• This process is called paging.
– The information that is swapped back and forth from RAM to
Disk and from disk to RAM is stored in a specially allocated
disk area called the Page file or swap file (UNIX/Linux).
Guide to Operating Systems, 4th ed.
76
Tuning Virtual Memory
• Some OSs that use VM and paging enable you to
tune the page file by adjusting its size.
– Tuning the page file can result in better OS performance.
• Virtual memory (in Windows) is adjusted to set an
initial starting size and a maximum size to which it
can grow.
– The general rule for sizing the page file is to set the initial size
to equal 1.5 times the amount of RAM.
– The maximum page file size should allow for adequate growth
in order to handle the most active times.
– You can monitor RAM and page file activity through the Task
Manager’s Performance tab.
– Hands-On Project 11-10 shows you how to configure virtual
memory.
Guide to Operating Systems, 4th ed.
77
Tuning Virtual Memory
• In UNIX/Linux – use the vmstat command-line
utility to monitor paging.
– Paging in UNIX/Linux is accomplished by creating a swap file
system, which is automatically created when you install most
UNIX/Linux distributions.
– If a swap file system is not already created, you can use the
mkfs command in Linux to create the swap file system.
– If the swap file system is often more than 80% full, increase its
size.
• In Mac OS X there is not option for turning on or
configuring virtual memory because it is always
enabled and monitored by the OS.
Guide to Operating Systems, 4th ed.
78
Installing Operating System Updates
and Patches
• Installing updates and patches is one of the most
important ways to keep your OS tuned.
• You can obtain updates by using the Windows
Update utility in all Windows OSs.
– You can configure Windows Update to automatically download
the updates as they are released.
• The steps for configuring Windows Update:
– Click Start and Click Control Panel.
– In Windows Vista or Server 2008, Click Classic View, if
necessary.
– In Windows 7 or Server 2008 R2, set View to Large icons or
Small icons.
– In the left pane of the Windows Update window, click Change
settings.
Guide to Operating Systems, 4th ed.
79
Installing Operating System Updates
and Patches
Windows Update Change settings window
Guide to Operating Systems, 4th ed.
80
Installing Operating System Updates
and Patches
• Many Linux distributions with GNOME have a
software update tool that allows you to
automatically obtain updates.
• The general steps are:
– Click System in the Panel.
– Point to Preferences.
– Click software Updates.
• In the Software Updates Preferences dialog box, you can
configure when to check for updates and what types of updates to
install automatically.
• You can also configure whether to check for major upgrades and
whether to enable using mobile broadband to check for updates.
Guide to Operating Systems, 4th ed.
81
Installing Operating System Updates
and Patches
• Mac OS X Leopard and Snow Leopard offer a
Software Update tool, which scans the computer
for updates and then enables youj to install them
through the Internet.
• The general steps are:
– Click the Apple icon (the leftmost icon on the menu bar).
– Click the Software Update.
• The Software Update Tool scans the computer for updates.
• If it finds there are updates to obtain, you’ll see a Software Update
dialog box.
– Click Continue to proceed with the updates.
Guide to Operating Systems, 4th ed.
82
Tuning for Network Communications
• Any computer connected to a network should be
checked periodically to make sure that the
connectivity is optimized.
– When a network interface card (NIC) is purchased, it should be
high quality, and designed for use in the fastest expansion slot or
USB port in the computer.
– Just as OSs need periodic patches, so do NIC drivers.
– You should occasionally check the NIC vendor’s website for
updated NIC drivers for your network interface card that you can
download and use immediately.
• NICs can sometimes experience problems that cause
them to saturate the network with repeated packet
broadcasts – a broadcast storm.
• Network traffic should be regularly monitored to
make sure no node is creating excessive traffic.
Guide to Operating Systems, 4th ed.
83
Testing Network Connectivity
• ping utility – used to poll another network device.
– Offers a simple and quick way to determine if a workstation or
server’s network connection is working.
– Also offers a fast means to determine if one network is
communicating with another network.
• Ping can be transported through network devices (routers).
• Ping displays statistics that include:
– The number of packets sent, received, and lost.
– Provides an approximate round trip time in milliseconds.
– Use the utility from the command line:
– Ping 198.85.216.5 (use the IP address of the device you would
like to poll).
– Some OSs allow you to poll by using the computer name or
computer and domain name
– If you receive a reply back from the device then you know that
your computer’s connection is working.
Guide to Operating Systems, 4th ed.
84
Chapter Summary
• Maintaining an OS is as important as setting it up. There are
procedures you can follow on a regular schedule to ensure
that your OS is at its best.
• The file structure established on a computer is related to
how easy it is to maintain that computer over the long term.
Keeping files in a logical structure means that it is easier to
identify files that don’t belong, that are out of date, or that
may be causing problems.
• One important technique for maintaining an OS is to
regularly find and delete unused files. Tools that can be used
to assist in finding and deleting unused files are Disk
Cleanup in Windows, the find, ls, and rm commands in
Linux, and the Find tool in Mac OS X.
Guide to Operating Systems, 4th ed.
85
Chapter Summary
• Other ways to maintain disks include defragmenting disks,
moving files to relatively unused disks, finding and repairing
disk problems, and setting up RAID. Some OSs have built-in
utilities that can determine if disks are fragmented, and then
defragment them.
• An important part of maintaining a system is to make regular
backups. Backups are vital at times when a hard disk fails, or
after you delete and purge files that you later wish you had
retained. Backups can be used to restore drivers or other OS
files that were damaged or overwritten.
• There are many considerations when installing and
uninstalling software. Before installing new software, make
sure that the software is compatible with hardware and the
OS. When uninstalling, use the built-in uninstall options.
Guide to Operating Systems, 4th ed.
86
Chapter Summary
• Finally, all operating systems should be tuned
periodically. Adjusting paging is one way to tune for
better performance. Another way is to make sure
you keep current with OS patches and updates.
Networked systems should be tuned so that NIC
drivers are kept current and check to ensure no
NIC is causing excessive network traffic. Also, use
the ping utility for testing a network connection.
Guide to Operating Systems, 4th ed.
87
Download