Facultat d'Informtica de Barcelona Univ. Politcnica de Catalunya - - PowerPoint PPT Presentation

facultat d inform tica de barcelona univ polit cnica de
SMART_READER_LITE
LIVE PREVIEW

Facultat d'Informtica de Barcelona Univ. Politcnica de Catalunya - - PowerPoint PPT Presentation

Facultat d'Informtica de Barcelona Univ. Politcnica de Catalunya Administraci de Sistemes Operatius Maintenance of the file system


slide-1
SLIDE 1

Facultat d'Informàtica de Barcelona

  • Univ. Politècnica de Catalunya

Administració de Sistemes Operatius

Maintenance of the file system

slide-2
SLIDE 2

Topics

  • 1. Introduction to OS administration
  • 2. Installation of the OS
  • 3. Users management
  • 4. Applications management
  • 5. System monitoring
  • 6. Maintenance of the file system
  • 7. Local services
  • 8. Network services
  • 9. Protection and security
slide-3
SLIDE 3

Objectives

Knowledge

File systems Backup tools Backup support

Abilities

Increase the size of a file system Verify a file system Make and restore backups

slide-4
SLIDE 4

Filesystems (I)

FAT (FAT16) --> DOS

Small disks (< 4GB) Filenames 8+3

FAT32 (VFAT) --> Win95

Bigger disks Long filenames Direct links added No owner nor permission control

NTFS --> WinNT, XP, Vista

Adds links and protections (creation, access, modifying...) Windows NT security model

slide-5
SLIDE 5

Filesystems (II)

ext2

Linux filesystem Soft/hard links Access protection Long filenames

ext3

Adds journaling (eases error recovery)

reiserfs

Organizes files and directories as a database Supports journaling Particularly effective with small files

Does not suffer from internal fragmentation

ext4

64-bit addressing, improved journaling

slide-6
SLIDE 6

Filesystems (III)

xfs

journaling dynamic i-node management ACLs Huge maximum file size FS activity log

jfs

journaling dynamic i-node management ACLs and MAC (Mandatory Acess Control) Huge maximum file size

slide-7
SLIDE 7

Filesystems incorporating journals

Journal: log all disk operations in disk

Easies FS recovery in case of a crash or error Disk primitives can be slightly slower

The journal does not go through the buffer cache

The journal can be allocated in a different

disk/partition

Ext3/4, reiserfs, JFS, XFS keep journal

slide-8
SLIDE 8

Disk verification (I)

Sources of disk problems

Hardware errors Power outages Operating system errors Administration errors

e.g., incorrect shutdown of the machine

Never verify a filesystem while mounted/without

syncing

High risk of filesystem corruption

The verification process accesses the device directly through

the driver instead of going through the buffer cache

slide-9
SLIDE 9

Disk verification (II)

Logical verification

Filesystem metadades Directory structure Lost data recovery

lost+found directory

Physical verification

Disk blocks with I/O errors badblocks command

slide-10
SLIDE 10

Disk fragmentation

Faster access to consecutive blocks on the disk Faster access to neighbour files on the disk Faster access depends on disk area

middle vs. end

slide-11
SLIDE 11

Extending the filesystem

Install and configure a new disk

Partition it

  • r recycle partitions in an old disk

Decide mount points Create the filesystems Transfer data to the new partitions Mount partitions

Modify /etc/fstab

We may need to reorganize the directories

/home -> /homeA + /homeB /home -> /home/students + /home/professors

slide-12
SLIDE 12

Activity

Plan and define possible extensions to the

following directories

/home /usr/local /var

slide-13
SLIDE 13

Other maintenance tasks

Monitor

Free space (df)

Most filesystems reserve some space for root use (5%)

Used space (du)

Sync

Write all modified buffers to disk

sync Update daemon

slide-14
SLIDE 14

LVM

Logical Volume Manager

High level abstraction of the storage space Groups multiple physical partitions

new devices can be added to the volumes

Allows to define logical partitions

they can have logical names they can be redistributed over the physical partitions

resize move

slide-15
SLIDE 15

LVM

Volume Group Physical Volumes (PV) Logical Volumes (LV)

/dev/hda2 /dev/hda3 /dev/hdb1 home (ext3) swap usr (reiserfs) root (ext3)

slide-16
SLIDE 16

LVM

/etc/fstab:

slide-17
SLIDE 17

Backup copies

Which data should be copied?

User data (home, e-mail, ...) Program data (DBs, CVS, SVN, git, web, ...) System configuration Binaries?

Frequency of copies

Level of volatility of the data Data significance, how important they are

Backup types

Full backup (all data) Incremental backup (only changes since last backup) Reverse incremental backup (changes only)

slide-18
SLIDE 18

Full backup

All data is always copied

Fast restore Big size

backup backup System t i m e backup

slide-19
SLIDE 19

Incremental backup

Copy only files that have changed

From a certain date (last backup)

Slower to restore Small size First one is like a full backup A long incremental chain complicates the restore process

restore backup backup Sistema t i m e backup

slide-20
SLIDE 20

Reverse incremental backup

All is compared, links are used to point to old

data, and new copies are done for the changes

Fast restore Small size Only for random access devices (disks)

restore backup backup t i m e backup = =

slide-21
SLIDE 21

Backup copies (II)

Physical support

Floppy, disk, CD, tape, network... We need to consider:

Cost/capacity Fiabilitat

Where do we keep the backup copies?

Protected against accidents Fireproof boxes Keep some backups out of the organitzation Protection against theft

Copy verification Data compression

Space vs. security

Availability Usability Speed

slide-22
SLIDE 22

Activity

Define a backup policy (directories to save, type,

frequency, media, compression...) for:

A multiuser server for a company with:

500 Gb. disk and 80 users E-mail

50Mb per user

Web pages

20 Mb per user 100 Mb corporative web

Code repository

10 Gb distributed across 20 projects Only 5 active projects

slide-23
SLIDE 23

Other considerations

Multiple servers

User backup servers

more economic easier to administrate

Tools: tar+rsync/ssh, amanda, bacula

slide-24
SLIDE 24

Personal work

Task scheduling

Scripting languages: sh, perl Commands for searching information: find, grep...