Host Management - Pravin Shetty > Resume

Download Report

Transcript Host Management - Pravin Shetty > Resume

Host Management
Burgess, Ch.4
www.infotech.monash.edu
The Big Picture
•
•
•
•
•
•
Think of the Total Network Solution
Think of ways to make management easier
Go with the vendor standard install?
Or Customise to suit our situation?
Make all machines the same?
Make all machines unique?
Host Management
www.infotech.monash.edu
2
The Server Room
Critical hardware needs protection including:
•
•
•
•
•
Power filter and UPS
Air-conditioner, heater and fireproofing
Secure access eg locked door, CCTV monitor
Anti-static fittings eg rack mount, carpet
Secure cable conduits and patch panels
Host Management
www.infotech.monash.edu
3
Startup and Shutdown
• Know how to turn something off….
Before you turn it on!!
• Complex systems need safe shutdown sequence to avoid
damage
• Quiescent state difficult to predict in multi-tasking
systems
Host Management
www.infotech.monash.edu
4
Shutdown
•
•
•
•
•
•
•
Complete all operations in progress
Prevent new operations from starting
Close files
Terminate processes and services
Synchronise and Flush buffers/caches
Dismount/park/eject disks
Power off !
Host Management
www.infotech.monash.edu
5
Shutdown Unix
•
•
•
•
•
Only performed by superuser
halt – stops quickly and without waiting
reboot – same as halt, restarts afterward
shutdown – warns user first
init n – where n is a run level number
– Note: Run Level numbers are not equivalent for different
systems!! For example, run level 5 is MultiUser mode in Redhat
and PowerOff in SvR4/Solaris.
Host Management
www.infotech.monash.edu
6
PC Bootstrap Sequence -- An Avalanche boot
• BIOS IPL loads MBR boot
• MBR selects active partition
loads partition boot
• Partition boot can access files
loads OS loader
• OS loader loads kernel
• Kernel initialisation loads init process
Host Management
www.infotech.monash.edu
7
Booting Unix
• Machine and OS dependent
• Usually boots automatically
• Some machine start in ROM monitor and require a
monitor command like b or boot
• init
– run levels allow several alternate configs
– Runs different scripts in /etc/rc.local
Host Management
www.infotech.monash.edu
8
Booting Windows NT/2000/XP
• BIOS MBR > PartitionBoot >
C:\ntldr > C:\ntdetect > multiuser
• C:\boot.ini allows multi-partition boot
• Any user can shutdown entire system
• Services started according to registry
• No single-user or run-levels
Host Management
www.infotech.monash.edu
9
Workstation Personalisation
• Personal workstations or NetStations?
• Some local storage essential
–
–
–
–
Operating system
Swap or Pagefile
Local working temporary files
Local system and user configuration
• Some central shared storage needed
Host Management
www.infotech.monash.edu
10
Disk Space Used for…
•
•
•
•
Operating system software and Data
Application software and Data
Shares visible to others on the Net
Local space for temporary use
– Cache, print spool, transitory downloads
• Backup copies
Host Management
www.infotech.monash.edu
11
Disk partitioning
• A convenient way to subdivide disk space
• Reserve space for a particular function
eg swap space, user directories, software
• Disjoint storage - protection of data
• Each partition given logical device name
eg C:, /dev/hda1, /dev/dsk/c0t0d0s0
• Meta-devices and logical volumes seamlessly span
multiple partitions
Host Management
www.infotech.monash.edu
12
Formatting -- Building File Systems
• “like painting car spaces in a carpark”
• Structures disk area for addressable access
• Unique to OS – usually incompatible!
eg UFS not visible to Windows, NTFS not visible to Unix
• Sectors often grouped into Allocation units
called blocks in Unix and clusters in windows
• Building File System - mkfs or format
• Labels, Directories, Free list, Data area
Host Management
www.infotech.monash.edu
13
Unix File System
•
•
•
•
•
UFS disc format
iNode
Disc space allocation for each file
A Directory implementation
Access permission implementation
Host Management
www.infotech.monash.edu
14
DOS File Allocation Table
• Disc format
• FAT disk space management
Host Management
www.infotech.monash.edu
15
Swap Space
• Swapping – frees RAM used by an idle process by
storing image on disc
• Paging – virtual memory stored on disc
• Few modern OSs actually do swapping
• The swap file is now used for paging
• In Unix the swapfile is usually a partition
• SwapFileSize = 2.5 * RAMsize
• Any more will probably never be used!
Host Management
www.infotech.monash.edu
16
File System -- A working system has:
•
•
•
•
•
Operating system files (as distributed)
Other application software (packages)
User files
User Application data
Temporary working space
Host Management
www.infotech.monash.edu
17
File System -- Logically separate because:
•
•
•
•
They have different functions
They are owned/maintained differently
They change at different rates
Backup policy is different for each
Host Management
www.infotech.monash.edu
18
File System -- A Typical Unix Layout
• Operating System
–
–
–
–
–
–
–
–
/boot or /kernel – boot image files
/bin or /sbin – general or system executable files
/dev – device files
/lib – system development library files
/etc – configs, params, scripts, etc…
/share – common read-only files
/var – non-transient workspace, logfiles
/tmp or /spool – transient work and temporary files
Host Management
www.infotech.monash.edu
19
File System -- A Typical Unix Layout
• Application Software
–
–
–
–
–
–
/usr
/usr/local/bin
/usr/local/lib
/usr/local/include
/usr/local/etc
/usr/local/share
Host Management
www.infotech.monash.edu
20
Unix Disk Device Names
•
•
•
•
Devices usually appear as files in /dev
Disks have names for each partition
Partitions may overlap
BSD and SysV use different names
– sd0a,sd0b,sd0c…
– dsk/c0t1d0s0
Contoller Target(disk) Device Segment(partition)
Target or Device may be missing
Host Management
www.infotech.monash.edu
21
System Installation
System Installation
•
•
•
•
•
•
Name, IP, subnet mask, domain, DNS IP
Disc partition layout and format
Swap space
Timezone
Directory Service eg NIS, Windows PDC
Drivers for unrecognised devices
eg Video, NIC, sound
Host Management
www.infotech.monash.edu
22
Installing…
• Solaris, Linux, Windows…
• Workstation, Developer and Server versions
• All have easy installation programs
– Jumpstart, Kickstart, Setup
• Modern version auto-sense device (PnP) and network
configuration (DHCP)
• Installation may require license details
Host Management
www.infotech.monash.edu
23
Configuring for use of Network Services
• Host installation readies the machine for connection to
the Net
• Also need to have information about services provided
by the Net, including:
– DNS
– NFS
– Authentication (NIS, Kerberos, LDAP)
Host Management
www.infotech.monash.edu
24
DNS configuration
• Can be provided automatically by DHCP
• Complex setup needs more detail stored in local files:
/etc/resolv.conf
/etc/nsswitch.conf
• Usual sequence of name search is
hosts, bind, NIS
Host Management
www.infotech.monash.edu
25
NFS configuration
• Usually requires editing of /etc/fstab
• And starting of automounter service
www.infotech.monash.edu
26
Host Management
Source: Dr. Ramesh Yerraballi,
http://data.uta.edu/~ramesh/cse5306/NFS.html
Source: http://www.dicas-l.com.br/cursos/nfs/nfs-012.html
Multiple Installations -- Boot Managers
• With multi-use machines and big disks it is possible to
have several different OSs
• Each OS has its own boot manager
• Some are generalised, some not
– For example, Windows relies on files accessed from drive C:
– so install Windows first, then install Linux
• Unix loaders: LILO (LInux LOader), GRUB (GRand Unified
Bootloader)
Host Management
www.infotech.monash.edu
27
Re-Installation, Multiple Installation
• OS installation programs make it easy to install on a
single system, but what about repeat installations or
installing to large numbers of machines eg in a
department of a company?
• Here we need an automated process that can be given a
“configuration file” and left to install in unattended mode
Host Management
www.infotech.monash.edu
28
Multiple Installations – Image, Package or Share
• Image mode: writing a prepared partition image to the hard
disk, e.g., using Ghost
– Only possible for identical systems
– Difficult to change: must recreate entire image
• Package: a set of dependent modules
eg compiler + libraries + templates
• Package mode: installing a sequence of packages in several
passes over the partition
– dpkg, rpm, Windows MSI, Wise, etc…
• Share mode: where software is shared from server
Host Management
www.infotech.monash.edu
29
Software Installation
• Usually installed as packages
• May be distributed in limited source form and require
compilation
• Often installed by running a script command
config
make install
• Beware of mixing versions!
Host Management
www.infotech.monash.edu
30
Directory structure
• All reliable systems separate system and application
software
• May also separate data from procedure
• Use a directory structure to achieve this
Host Management
www.infotech.monash.edu
31
Shared Libraries (.so)/Dynamic Link Libraries (.dll)
• Often managed as “overlays” and loaded into RAM on
demand
• Managed by some kernel routines which use an “index”
to locate a required module
• When new versions are installed, the index must be
updated (and any obsolete versions purged from RAM)
• Special commands used to do this eg ldconfig
Host Management
www.infotech.monash.edu
32
Host Management
(end)
www.infotech.monash.edu