Host Management - Pravin Shetty > Resume

Download Report

Transcript Host Management - Pravin Shetty > Resume

Host Management
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?

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
Start up 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

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 !

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
Beware….
Run Level numbers are not all the same on different systems!!
Eg. init5 is MultiUser mode in Redhat and PowerOff in
SvR4/Solaris
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

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

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

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
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
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

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

Unix File System
UFS disc format
 iNode
 Disc space allocation for each file
 A Directory implementation
 Access permission implementation

DOS File Allocation Table
Disc format
 FAT disk space management

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!

File System
A working system has:
Operating system files (as distributed)
 Other application software (packages)
 User files
 User Application data
 Temporary working space

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

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
File System
A Typical Unix Layout

Application Software
/usr
 /usr/local/bin
 /usr/local/lib
 /usr/local/include
 /usr/local/etc
 /usr/local/share

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
System Installation
Installer must specify…
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

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

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)

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
NFS configuration
Usually requires editing of /etc/fstab
 And starting of automounter service

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
Eg Windows relies on files accessed from C:
so install Windows first, then install Linux

Unix loaders: LILO, GRUB
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

Multiple Installations
Image vs Package vs Share

Image mode: writing a prepared partition image to
the hard disk eg 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
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!

Directory structure
All reliable systems separate system and
application software
 May also separate data from procedure
 Use a directory structure to achieve this

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
