Upload
jack-lyons
View
217
Download
0
Tags:
Embed Size (px)
Citation preview
Device and Filesystem Management
CSCI N321 – System and Network Administration
Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University
Section Overview
Devices and Files
Drives and Partitions
Filesystem Management
Network Filesystems
References
CQU 85321 System Administration Course
TextbookChapter 11
Lectures2002 #10
Kinds of DevicesPhysical Devices Actual hardware Examples
Hard Drives, CDROMs, Floppy Network cards and modems
Logical Devices Pseudo devices Examples
Virtual Terminals Network Ports
Interrupt Handling
UserUser
SupervisorSupervisor
SystemSystemCallCall
Interrupt Vector 0Interrupt Vector 0
Interrupt Vector Interrupt Vector n-n-11Interrupt Vector Interrupt Vector nn
InterruptInterruptHandler Handler nn
Interrupt vector tableInterrupt vector table
MemoryMemory
Trap Trap nn
Device Drivers and Files
Device drivers Software to control hardware Compiled into the kernel Dynamically loaded module
Device files 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 fileType “c” – Character Device “b” – Block Device
Major Number: Type of device driverMinor Number: Instance (which one)/dev/MAKEDEV: Creation program
Disk Geometry
TracksTracksSectorsSectors
Read/write HeadsRead/write Heads
CylindersCylinders
PartitionsPartitions
PlattersPlatters
Common Disk Types
SCSI Many cable types
SATA (IDE Family)SASFibre Channel High Bandwidth
Solid State Devices (SSD)Universal Serial Bus (USB) Removable Media
UNIX FilesystemsDefines how data is stored on drivesMultiple types of filesystems supportedBoot Block (1st block) Stores the bootstrap loader program
Superblock (2nd block) Copies scattered throughout the partition Stores information about the partition
Partition Size Type of File system Block Size Size & Location of inode tables Free Block list
Filesystems and Partitions
/ (root)
bin varusretchome
scott bobalice bin sbin local lib
man lib srcsharebin
SuperSuperBlockBlock
GroupGroupDescriptorsDescriptors
Ext2/3/4 File Systems
BootBootBlockBlock Block GroupBlock Group Block GroupBlock Group Block GroupBlock Group
DataDataBitmapBitmap
InodeInodeBitmapBitmap
InodeInodeTablesTables
DataDataBlocksBlocks
NTFS File System
BootBootBlockBlock
Master FileMaster FileTable (MFT)Table (MFT)
SystemSystemFilesFiles File AreaFile Area
StandardStandardInformationInformation
File/DirFile/DirNameName
SecuritySecurityDescriptorDescriptor
Data orData orIndexIndex
Source: http://technet.microsoft.com/en-us/library/cc750198.aspxSource: http://technet.microsoft.com/en-us/library/cc750198.aspx
Why Partition?
Not enough space on one diskSeparation of data Read-only areas Spool areas and free space OS upgrades
BackupsPerformance
Virtual File SystemUser ProcessUser Process
Device DriverDevice Driver
NTFSNTFSISO9660ISO9660Ext3Ext3
System call InterfaceSystem call Interface
VFSVFS
Buffer CacheBuffer Cache
KernelKernel
Managing FilesystemsCreating a new filesystem Similar to DOS format mkfs – creates a filesystem (many aliases)
mount – mount a partition Mount point must exist (directory) /etc/fstab
umount – Unmount a partitionfsck Check/fix filesystem errors Journaling filesystems
Quotas?
RAID StorageRedundant Array of Independent (Inexpensive) DrivesLevel 0 – Data Blocks spread across 2 or more drives (striping). No fault toleranceLevel 1 – Each disk copied (mirrored) to another diskLevel 0+1 – Each drive with striped data is mirroredLevel 5 – Data and fault tolerance (parity) striped across disksLevel 6 – Same as level 5 but with 2 parity disks
RAID 0
Usable Storage? All
Performance? Read and Write
Improvement
No Fault Tolerance
Source: http://www.prepressure.com/library/technology/raidSource: http://www.prepressure.com/library/technology/raid
RAID 1
Usable Storage? ½ available
Performance Improvement Read
Fault Tolerant
Source: http://www.prepressure.com/library/technology/raidSource: http://www.prepressure.com/library/technology/raid
Raid 10
Storage Usage? ½ Available
Performance Read and Write
Fault TolerantRAID 0+1
Source: http://www.prepressure.com/library/technology/raidSource: http://www.prepressure.com/library/technology/raid
RAID 5
Need at least 3 DisksUsable Storage N – 1 (Disks)
Performance Improvement Read
Hot Spare(s)
Source: http://www.prepressure.com/library/technology/raidSource: http://www.prepressure.com/library/technology/raid
RAID 6
Need 4+ DisksUsable Storage: N -2 (Disks)Performance Improvement: ReadFault TolerantHot spare(s)
Source: http://en.wikipedia.org/wiki/Standard_RAID_levelsSource: http://en.wikipedia.org/wiki/Standard_RAID_levels
Logical Volume Management
Physical VolumePhysical Volume20GB20GB
Physical VolumePhysical Volume36GB36GB
Physical VolumePhysical Volume34GB34GB
/boot/boot2GB2GBext3ext3
Logical Volume GroupLogical Volume Group90GB90GB
Logical VolumeLogical Volume/home/home50GB50GB
Logical VolumeLogical Volume//
25GB25GB
Free SpaceFree Space15GB15GB
Network Filesystems
Filesystems shared via NFSClient-side: similar to local mountServer – exports shared filesystems mountd and nfsd /etc/exports and exportfs Access permissions should be selective
showmount –eCIFS – Microsoft filesystem sharing Samba – CIFS support for Linux/MAC
Printer Connections
Local Parallel USB
Remote/SharedNetwork
Printing Languages
PCL (Hewlett Packard)Postscript (Adobe)PDF (Adobe)XHTML
CUPS
Client/Server Applicationcupsd – CUPS Server cupsd.conf printers.conf classes.conf
Web Administration – Port 631
Printer Configuration
Printer NameConnection info Local (LPT, Serial, etc.) Network (lpd, JetDirect/Socket, HTTP) Shared (SMB)
Device Driver or PPDs
Print Commands
Printing lpr –P<printer> mpage –P<printer>
Queue Status: lpq –P<printer>Status: lpstat –tConfiguratation: lpadmin cupsenable/cupsdisable accept/reject
Windows Printer Management
“Devices and Printers”Add Printer Wizard Name Connection (Local or Address/Port) Device Make and Model
Printer Sharing