device and filesystem management csci n321 – system and network administration copyright © 2000,...
TRANSCRIPT
![Page 1: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/1.jpg)
Device and Filesystem Management
CSCI N321 – System and Network Administration
Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University
![Page 2: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/2.jpg)
Section Overview
Devices and Files
Drives and Partitions
Filesystem Management
Network Filesystems
![Page 3: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/3.jpg)
References
CQU 85321 System Administration Course
TextbookChapter 11
Lectures2002 #10
![Page 4: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/4.jpg)
Kinds of DevicesPhysical Devices Actual hardware Examples
Hard Drives, CDROMs, Floppy Network cards and modems
Logical Devices Pseudo devices Examples
Virtual Terminals Network Ports
![Page 5: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/5.jpg)
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
![Page 6: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/6.jpg)
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
![Page 7: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/7.jpg)
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
![Page 8: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/8.jpg)
Disk Geometry
TracksTracksSectorsSectors
Read/write HeadsRead/write Heads
CylindersCylinders
PartitionsPartitions
PlattersPlatters
![Page 9: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/9.jpg)
Common Disk Types
SCSI Many cable types
SATA (IDE Family)SASFibre Channel High Bandwidth
Solid State Devices (SSD)Universal Serial Bus (USB) Removable Media
![Page 10: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/10.jpg)
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
![Page 11: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/11.jpg)
Filesystems and Partitions
/ (root)
bin varusretchome
scott bobalice bin sbin local lib
man lib srcsharebin
![Page 12: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/12.jpg)
SuperSuperBlockBlock
GroupGroupDescriptorsDescriptors
Ext2/3/4 File Systems
BootBootBlockBlock Block GroupBlock Group Block GroupBlock Group Block GroupBlock Group
DataDataBitmapBitmap
InodeInodeBitmapBitmap
InodeInodeTablesTables
DataDataBlocksBlocks
![Page 13: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/13.jpg)
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
![Page 14: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/14.jpg)
Why Partition?
Not enough space on one diskSeparation of data Read-only areas Spool areas and free space OS upgrades
BackupsPerformance
![Page 15: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/15.jpg)
Virtual File SystemUser ProcessUser Process
Device DriverDevice Driver
NTFSNTFSISO9660ISO9660Ext3Ext3
System call InterfaceSystem call Interface
VFSVFS
Buffer CacheBuffer Cache
KernelKernel
![Page 16: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/16.jpg)
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?
![Page 17: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/17.jpg)
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
![Page 18: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/18.jpg)
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
![Page 19: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/19.jpg)
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
![Page 20: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/20.jpg)
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
![Page 21: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/21.jpg)
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
![Page 22: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/22.jpg)
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
![Page 23: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/23.jpg)
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
![Page 24: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/24.jpg)
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
![Page 25: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/25.jpg)
Printer Connections
Local Parallel USB
Remote/SharedNetwork
![Page 26: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/26.jpg)
Printing Languages
PCL (Hewlett Packard)Postscript (Adobe)PDF (Adobe)XHTML
![Page 27: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/27.jpg)
CUPS
Client/Server Applicationcupsd – CUPS Server cupsd.conf printers.conf classes.conf
Web Administration – Port 631
![Page 28: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/28.jpg)
Printer Configuration
Printer NameConnection info Local (LPT, Serial, etc.) Network (lpd, JetDirect/Socket, HTTP) Shared (SMB)
Device Driver or PPDs
![Page 29: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/29.jpg)
Print Commands
Printing lpr –P<printer> mpage –P<printer>
Queue Status: lpq –P<printer>Status: lpstat –tConfiguratation: lpadmin cupsenable/cupsdisable accept/reject
![Page 30: Device and Filesystem Management CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University](https://reader036.vdocument.in/reader036/viewer/2022062407/56649e355503460f94b2432d/html5/thumbnails/30.jpg)
Windows Printer Management
“Devices and Printers”Add Printer Wizard Name Connection (Local or Address/Port) Device Make and Model
Printer Sharing