Data Storage, File Servers, Backup and Restore

21  Download (0)

Full text

(1)

Erik Hjelm˚as Fileserver Administration RAID LVM Filesystems Mounting a Filesystem Backup/Restore Next Week

Data Storage, File Servers, Backup and

Restore

IMT3292 - System Administration

Erik Hjelm˚as

(2)

Erik Hjelm˚as Fileserver Administration RAID LVM Filesystems Mounting a Filesystem Backup/Restore Next Week

Administrating a File Server

• Making local and remote files available to users

• Monitoring and managing the systems disk resources

• Protecting against file corruption, hardware failures, and users errors via a well-planned backup schedule

• Ensuring data confidentiality by limiting file and system access

• Checking for and correcting filesystem corruption

• Connecting and configuring new storage devices when needed

(3)

Erik Hjelm˚as Fileserver Administration RAID LVM Filesystems Mounting a Filesystem Backup/Restore Next Week

A Simple Overview

1 HW: IDE/SCSI (SAN!) 2 HW/SW: RAID 3 SW: LVM/Partitioning 4 SW: Journalling filesystems

(4)

Erik Hjelm˚as Fileserver Administration RAID LVM Filesystems Mounting a Filesystem Backup/Restore Next Week

Redundant Array of

Inexpensive/Independent Disks

RAID 0 Disk striping (best I/O performance, no redundancy!)

RAID 1 Disk mirroring (complete redundancy)

RAID 5 Disk striping with additional parity information. The parity information is split across multiple disks

RAID 0+1 A combination of RAID 0 and 1 (mirror of stripes)

RAID 10 A combination of RAID 1 and 0 (stripe of mirrors)

(5)

Erik Hjelm˚as Fileserver Administration RAID LVM Filesystems Mounting a Filesystem Backup/Restore Next Week

RAID cont.

• www.acnc.com/04_00.html • en.wikipedia.org/wiki/Nested_RAID_levels

(6)

Erik Hjelm˚as Fileserver Administration RAID LVM Filesystems Mounting a Filesystem Backup/Restore Next Week

Logical Volume Managers

Logical Volume Managers (LVMs)provide a higher-level view of disk storage, and gives much more flexibility in allocating storage

• Physical disks can be made intophysical volumes by dividing them into physical partitions/

extents

• A volume groupis a named collection of physical volumes

• Volume groups can be split into subunits calledlogical volumes

• A logical volume can hold a single file system, and is much more flexible than a disk partition!

• Logical volumes are composed oflogical partitions/extents

• Logical partitions/extents usually map one-to-one to physical partitions/extents (in either striping or linear mode), but in case the logical volume is set up to store redundant copies of data it can map one-to-many

(7)

Erik Hjelm˚as Fileserver Administration RAID LVM Filesystems Mounting a Filesystem Backup/Restore Next Week

LVM cont.

hda1 hdc1 (PV) \ / diskvg (VG) / | \

usrlv rootlv varlv (LV:s)

| | |

(8)

Erik Hjelm˚as Fileserver Administration RAID LVM Filesystems Mounting a Filesystem Backup/Restore Next Week

Filesystems

• We now a lot about filesystems from the operating systems course

• These days, most professional file systems are journalling file systems

• The problem journalling file systems solve is that if your host crashes, traditional file system have to run extensive checks (fsck) on the integrity of the file systems

• Journalling file systems keep a transaction log (a journal) of the most recent file system operations, thus allows them to be replayed and allows for much faster recovery

(9)

Erik Hjelm˚as Fileserver Administration RAID LVM Filesystems Mounting a Filesystem Backup/Restore Next Week

Networked Filesystems

• Unix: NFS (Network File System) • Server: /etc/exports

• Client: /etc/fstab

• MSWindows: CIFS (Common Internet File System) (formerly known as SMB)

• Samba is (among other things) an open source implementation of CIFS, thus MSWindows clients can mount Samba shares

• Other possibilities include DFS, AFS, coda, InterMezzo

• Problems with authentication! understand what is implied by: NFSv{2,3,4}

(10)

Erik Hjelm˚as Fileserver Administration RAID LVM Filesystems Mounting a Filesystem Backup/Restore Next Week

mount

/

umount

• File systems can be mounted with the mount command: mount -t type device dir

• e. g. mount -t iso9660 /dev/hdc /mount/cdrom

• (see also man mountof course)

• To unmount, simply use: umount dir

• e. g. umount /mount/cdrom

(11)

Erik Hjelm˚as Fileserver Administration RAID LVM Filesystems Mounting a Filesystem Backup/Restore Next Week

/etc/fstab

Fromman fstab:

The file fstab contains descriptive information about the various file systems. fstab is only read by programs, and not written; it is the duty of the system administrator to properly create and maintain this file.

e.g.

# # <file system> <mount point> <type> <options> <dump> <pass> /dev/hda3 / ext3 errors=remount-ro 0 1

/dev/hda2 none swap sw 0 0 proc /proc proc defaults 0 0

/dev/fd0 /floppy auto user,noauto 0 0 /dev/cdrom /cdrom iso9660 ro,user,noauto 0 0 /dev/hda1 /boot ext3 defaults 0 2

(12)

Erik Hjelm˚as Fileserver Administration RAID LVM Filesystems Mounting a Filesystem Backup/Restore Next Week

Punchline

Be interested in alle levels of data storage, “never trust the vendor”

(13)

Erik Hjelm˚as Fileserver Administration RAID LVM Filesystems Mounting a Filesystem Backup/Restore Next Week

Backup System = Data

Restoration System

• Why? • accidental deletion • disk failure • malware (virus) • archival purposes

(14)

Erik Hjelm˚as Fileserver Administration RAID LVM Filesystems Mounting a Filesystem Backup/Restore Next Week

Backup/Restore: The Questions

(From “Essential system administration” by Frisch:)

• What files need to be backed up?

• Where are these files?

• Who will backup the files?

• Where, when and under what conditions should backups be performed?

• How often do these files change?

• How quickly does an important missing or damaged file need to be restored?

• What is the expected rate of loss or failure?

• How long do we need to retain the data?

• Where should the backup media be stored?

(15)

Erik Hjelm˚as Fileserver Administration RAID LVM Filesystems Mounting a Filesystem Backup/Restore Next Week

Other Factors

• What media to use? • magnetic tape • optical • disk

• File-based vs device-based

• Compression

• Problems with online backup • file changes

(16)

Erik Hjelm˚as Fileserver Administration RAID LVM Filesystems Mounting a Filesystem Backup/Restore Next Week

Two Basic Strategies

Full Copy all files

Partial Two concepts sometimes referred to as the same:

Differential All new or modified files since last full backup

Incremental All new or modified files since last full or partialbackup

• Difference between differential and

incremental sometimes referred to as levelx where x∈0,1,2, . . .

(17)

Erik Hjelm˚as Fileserver Administration RAID LVM Filesystems Mounting a Filesystem Backup/Restore Next Week

A useful command

find dir -newer /var/adm/yesterday -ls | \ awk ’{sum+=$7}; END {print "diff =",sum}’ (from Frisch 2002)

(18)

Erik Hjelm˚as Fileserver Administration RAID LVM Filesystems Mounting a Filesystem Backup/Restore Next Week

Backup Schedules:

Grandfather-Father-Son

(19)

Erik Hjelm˚as Fileserver Administration RAID LVM Filesystems Mounting a Filesystem Backup/Restore Next Week

(20)

Erik Hjelm˚as Fileserver Administration RAID LVM Filesystems Mounting a Filesystem Backup/Restore Next Week

Backup Schedules: Modified

(21)

Erik Hjelm˚as Fileserver Administration RAID LVM Filesystems Mounting a Filesystem Backup/Restore Next Week

Next Week

• Monitoring

Figure

Updating...

References