Скачать презентацию Device and Filesystem Management CSCI N 321 Скачать презентацию Device and Filesystem Management CSCI N 321

bf1cc1a13ce1ebe9a8f18890ce3649a5.ppt

  • Количество слайдов: 23

Device and Filesystem Management CSCI N 321 – System and Network Administration Copyright © Device and Filesystem Management CSCI N 321 – System and Network Administration Copyright © 2000, 2010 by Scott Orr and the Trustees of Indiana University

Section Overview Devices and Files Drives and Partitions Filesystem Management Network Filesystems Section Overview Devices and Files Drives and Partitions Filesystem Management Network Filesystems

References CQU 85321 System Administration Course Textbook Lectures w. Chapter w 2002 11 #10 References CQU 85321 System Administration Course Textbook Lectures w. Chapter w 2002 11 #10

Kinds of Devices Physical Devices n n Actual hardware Examples w Hard Drives, CDROMs, Kinds of Devices Physical Devices n n Actual hardware Examples w Hard Drives, CDROMs, Floppy w Network cards and modems Logical Devices n n Pseudo devices Examples w Virtual Terminals w Network Ports

Interrupt Handling Memory User Interrupt Handler n System Call Interrupt Vector 0 Supervisor Trap Interrupt Handling Memory User Interrupt Handler n System Call Interrupt Vector 0 Supervisor Trap n Interrupt Vector n-1 Interrupt Vector n Interrupt vector table

Device Drivers and Files Device drivers n n n Software to control hardware Compiled Device Drivers and Files Device drivers n n n Software to control hardware Compiled into the kernel Dynamically loaded module Device files n n n Located in /dev Provide application access to device Driver must also be present to use

Making Device Files mknod filename type major minor filename: Name of the device file Making Device Files mknod filename type major minor filename: Name of the device file Type n n “c” – Character Device “b” – Block Device Major Number: Type of device driver Minor Number: Instance (which one) /dev/MAKEDEV: Creation program

Disk Geometry Tracks Sectors Read/write Heads Platters Cylinders Partitions Disk Geometry Tracks Sectors Read/write Heads Platters Cylinders Partitions

UNIX Filesystems Defines how data is stored on drives Multiple types of filesystems supported UNIX Filesystems Defines how data is stored on drives Multiple types of filesystems supported Boot Block (1 st block) n Stores the bootstrap loader program Superblock (2 nd block) n n Copies scattered throughout the partition Stores information about the partition w w w Partition Size Type of File system Block Size & Location of inode tables Free Block list

Filesystems and Partitions / (root) bin home scott alice etc bob usr var bin Filesystems and Partitions / (root) bin home scott alice etc bob usr var bin sbin local bin man lib share src

Ext 2/Ext 3 File Systems Label Partition Zone Zone Super Block Inode Bitmap Data Ext 2/Ext 3 File Systems Label Partition Zone Zone Super Block Inode Bitmap Data Bitmap Inode Blocks Data Blocks Source: Forensic Discovery By Dan Farmer and Wietse Venema

Why Partition? Not enough space on one disk Separation of data n n n Why Partition? Not enough space on one disk Separation of data n n n Read-only areas Spool areas and free space OS upgrades Backups Performance

Virtual File System User Process System call Interface VFS Ext 3 ISO 9660 NTFS Virtual File System User Process System call Interface VFS Ext 3 ISO 9660 NTFS Buffer Cache Device Driver Kernel

Managing Filesystems Creating a new filesystem n n Similar to DOS format mkfs – Managing Filesystems Creating a new filesystem n n Similar to DOS format mkfs – creates a filesystem (many aliases) mount – mount a partition n n Mount point must exist (directory) /etc/fstab umount – Unmount a partition fsck n n Check/fix filesystem errors Journaling filesystems Quotas?

RAID Storage Redundant Array of Independent (Inexpensive) Drives Level 0 – Data Blocks spread RAID Storage Redundant Array of Independent (Inexpensive) Drives Level 0 – Data Blocks spread across 2 or more drives (striping). No fault tolerance Level 1 – Each disk copied (mirrored) to another disk Level 0+1 – Each drive with striped data is mirrored Level 5 – Data and fault tolerance (parity) striped across disks

Logical Volume Management Physical Volume 20 GB Physical Volume 36 GB Physical Volume 34 Logical Volume Management Physical Volume 20 GB Physical Volume 36 GB Physical Volume 34 GB Logical Volume Group 90 GB Logical Volume /home 50 GB Logical Volume / 25 GB Free Space 15 GB /boot 2 GB ext 3

Network Filesystems shared via NFS Client-side: similar to local mount Server – exports shared Network Filesystems shared via NFS Client-side: similar to local mount Server – exports shared filesystems n n n mountd and nfsd /etc/exports and exportfs Access permissions should be selective showmount -e Samba – Microsoft filesystem sharing

Printer Connections Local n n Parallel USB Remote/Shared Network Printer Connections Local n n Parallel USB Remote/Shared Network

Printing Languages PCL (Hewlett Packard) Postscript (Adobe) PDF (Adobe) XHTML Printing Languages PCL (Hewlett Packard) Postscript (Adobe) PDF (Adobe) XHTML

CUPS Client/Server Application cupsd – CUPS Server n n n cupsd. conf printers. conf CUPS Client/Server Application cupsd – CUPS Server n n n cupsd. conf printers. conf classes. conf Web Administration – Port 631

Printer Configuration Printer Name Connection info n n n Local (LPT, Serial, etc. ) Printer Configuration Printer Name Connection info n n n Local (LPT, Serial, etc. ) Network (lpd, Jet. Direct/Socket, HTTP) Shared (SMB) Device Driver or PPDs

Print Commands Printing n n lpr –P<printer> mpage –P<printer> Queue Status: lpq –P<printer> Status: Print Commands Printing n n lpr –P mpage –P Queue Status: lpq –P Status: lpstat –t Configuratation: n n n lpadmin cupsenable/cupsdisable accept/reject

Windows Printer Management “Devices and Printers” Add Printer Wizard n n n Name Connection Windows Printer Management “Devices and Printers” Add Printer Wizard n n n Name Connection (Local or Address/Port) Device Make and Model Printer Sharing