Facultat d'Informàtica de Barcelona
- Univ. Politècnica de Catalunya
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
Knowledge
File systems Backup tools Backup support
Abilities
Increase the size of a file system Verify a file system Make and restore backups
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
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
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
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
Ext3/4, reiserfs, JFS, XFS keep journal
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
High risk of filesystem corruption
The verification process accesses the device directly through
Logical verification
Filesystem metadades Directory structure Lost data recovery
lost+found directory
Physical verification
Disk blocks with I/O errors badblocks command
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
Install and configure a new disk
Partition it
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
Plan and define possible extensions to the
/home /usr/local /var
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
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
/dev/hda2 /dev/hda3 /dev/hdb1 home (ext3) swap usr (reiserfs) root (ext3)
/etc/fstab:
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)
All data is always copied
Fast restore Big size
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
All is compared, links are used to point to old
Fast restore Small size Only for random access devices (disks)
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
Define a backup policy (directories to save, type,
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
Multiple servers
User backup servers
more economic easier to administrate
Tools: tar+rsync/ssh, amanda, bacula
Task scheduling
Scripting languages: sh, perl Commands for searching information: find, grep...