16
Filesystem Management and Backups

Filesystem Management and Backups. 2 Section Overview Devices and Files Filesystem Management Network Filesystems Backups

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

Page 1: Filesystem Management and Backups. 2 Section Overview Devices and Files Filesystem Management Network Filesystems Backups

Filesystem Managementand Backups

Page 2: Filesystem Management and Backups. 2 Section Overview Devices and Files Filesystem Management Network Filesystems Backups

2

Section Overview

Devices and FilesFilesystem ManagementNetwork FilesystemsBackups

Page 3: Filesystem Management and Backups. 2 Section Overview Devices and Files Filesystem Management Network Filesystems Backups

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

Page 4: Filesystem Management and Backups. 2 Section Overview Devices and Files Filesystem Management Network Filesystems Backups

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

Page 5: Filesystem Management and Backups. 2 Section Overview Devices and Files Filesystem Management Network Filesystems Backups

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

Page 6: Filesystem Management and Backups. 2 Section Overview Devices and Files Filesystem Management Network Filesystems Backups

6

Disk GeometryTracksTracksSectorsSectorsRead/write HeadsRead/write Heads

CylindersCylindersPartitionsPartitions

PlattersPlatters

Page 7: Filesystem Management and Backups. 2 Section Overview Devices and Files Filesystem Management Network Filesystems Backups

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

Page 8: Filesystem Management and Backups. 2 Section Overview Devices and Files Filesystem Management Network Filesystems Backups

8

File systems and Partitions/ (root)

bin varusretchome

scott bobalice bin sbin local lib

man lib srcsharebin

Page 9: Filesystem Management and Backups. 2 Section Overview Devices and Files Filesystem Management Network Filesystems Backups

9

Why Partition?Not enough space on one diskSeparation of data Read-only areas Spool areas and free space OS upgradesBackupsPerformance

Page 10: Filesystem Management and Backups. 2 Section Overview Devices and Files Filesystem Management Network Filesystems Backups

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?

Page 11: Filesystem Management and Backups. 2 Section Overview Devices and Files Filesystem Management Network Filesystems Backups

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

Page 12: Filesystem Management and Backups. 2 Section Overview Devices and Files Filesystem Management Network Filesystems Backups

12

Why Backups?Hardware failuresAccidental deletions or modificationSecurity incidentsUpgrades and Migrations

Page 13: Filesystem Management and Backups. 2 Section Overview Devices and Files Filesystem Management Network Filesystems Backups

13

Backup Plan Characteristics

Ease of use Automation of backups Selective file/directory restoresTime schedulingBackup verificationOffsite copiesPortability

Page 14: Filesystem Management and Backups. 2 Section Overview Devices and Files Filesystem Management Network Filesystems Backups

14

Backup MediaFloppy DisksCD-R and CD-RW DrivesRemoval Hard drives and ZipdrivesTape 4mm DAT 8mm DLT

Page 15: Filesystem Management and Backups. 2 Section Overview Devices and Files Filesystem Management Network Filesystems Backups

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

Page 16: Filesystem Management and Backups. 2 Section Overview Devices and Files Filesystem Management Network Filesystems Backups

16

Backup StrategiesFull Backups – Backup entire systemPartial Backups – Selective backupIncremental – Backup modified filesBasic plan Full backup on Sundays Incremental daily