Upload
brooke-mcdowell
View
219
Download
0
Embed Size (px)
DESCRIPTION
3 Kinds of Devices Physical Devices Actual hardware Examples Hard Drives, CDROMs, Floppy Network cards and modems Logical Devices Pseudo devices Examples Virtual Terminals Network Ports
Citation preview
Filesystem Managementand Backups
2
Section Overview
Devices and FilesFilesystem ManagementNetwork FilesystemsBackups
3
Kinds of DevicesPhysical Devices Actual hardware Examples
Hard Drives, CDROMs, Floppy Network cards and modems
Logical Devices Pseudo devices Examples
Virtual Terminals Network Ports
4
Device Drivers and FilesDevice drivers Software to control hardware Compiled into the kernel Dynamically loaded moduleDevice files Located in /dev Provide application access to device Driver must also be present to use
5
Making Device Filesmknod 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
6
Disk GeometryTracksTracksSectorsSectorsRead/write HeadsRead/write Heads
CylindersCylindersPartitionsPartitions
PlattersPlatters
7
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
8
File systems and Partitions/ (root)
bin varusretchome
scott bobalice bin sbin local lib
man lib srcsharebin
9
Why Partition?Not enough space on one diskSeparation of data Read-only areas Spool areas and free space OS upgradesBackupsPerformance
10
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/fstabumount – Unmount a partitionfsck Check/fix filesystem errors Journaling filesystems
Quotas?
11
Network FilesystemsFilesystems shared via NFSClient-side: similar to local mountServer – exports shared filesystems mountd and nfsd /etc/exports and exportfs Access permissions should be selectiveshowmount -eSamba – Microsoft filesystem sharing
12
Why Backups?Hardware failuresAccidental deletions or modificationSecurity incidentsUpgrades and Migrations
13
Backup Plan Characteristics
Ease of use Automation of backups Selective file/directory restoresTime schedulingBackup verificationOffsite copiesPortability
14
Backup MediaFloppy DisksCD-R and CD-RW DrivesRemoval Hard drives and ZipdrivesTape 4mm DAT 8mm DLT
15
Backup toolsdump and restore filesystem backups Support for incremental backupstar File by file backups (archives) Easy to recover selected filesdd – Duplicate “raw” devicesmt – Control tape devicesCompression tools compress gzip
16
Backup StrategiesFull Backups – Backup entire systemPartial Backups – Selective backupIncremental – Backup modified filesBasic plan Full backup on Sundays Incremental daily