Running - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Running

Description:

Only possible file system inconsistencies are some lost resources ... As lost resources will not be used until they have been found and marked as free in bitmap, ... – PowerPoint PPT presentation

Number of Views:44
Avg rating:3.0/5.0
Slides: 17
Provided by: ssrnet
Category:
Tags: bitmap | running

less

Transcript and Presenter's Notes

Title: Running


1
Running FSCK in the Background
  • Marshall Kirk McKusick
  • USENIX BSDCon 2002, Feb

2
Abstract
  • After uncontrolled system crash
  • Traditional FFS
  • Requires fsck
  • Very time consuming
  • Not suitable for servers when high availability
    is critical

3
Abstract
  • After uncontrolled system crash
  • FFS with soft update
  • Only possible file system inconsistencies are
    some lost resources
  • System can be brought up without fsck
  • fsck can be performed whenever convenient
  • But, also not suitable for 24x7 environment

4
Abstract
  • Background fsck
  • fsck can be performed anytime while system is
    fully functional
  • HOW?
  • First, take a snapshot of file system
  • Run fsck on snapshot as background process

5
Snapshot
6
Snapshot
  • Snapshot
  • Author added snapshot capability in BSD
  • As lost resources will not be used until they
    have been found and marked as free in bitmap,
  • There are no limits on how long a background
    fsck can take to find and recover them
  • Suspension time caused by snapshot creation
  • Less than 1sec
  • Independent of the size of file system

7
Snapshot
  • Snapshot
  • Other useful functionalities
  • Ability to do reliable dumps of active file
    system
  • Ability to provide back-ups of the file system
  • These functionalities was first popularized by
    NetApp WAFL (Hitz el al, 1994)

8
Snapshot Performance
  • Environment
  • Computer 2 x Celeron 350MHz, 256M RAM
  • OS FreeBSD 5.0
  • Disk
  • Small file system
  • 0.5 Gb, 8K block, 1K fragment, 90 full, 70874
    files
  • Large file system
  • 7.7 Gb, 16K block, 2K fragment, 90 full, 520715
    files
  • Load four continuously running simultaneous
    Andrew benchmarks

9
Snapshot Performance
  • Results
  • Snapshot creation times
  • On idle file system
  • On active file system

10
Snapshot Performance
  • Results
  • Snapshot removal times
  • On idle file system
  • On active file system

11
Background fsck
12
Background fsck
  • Implementation
  • Take a snapshot
  • Run its traditional algorithms over snapshot
  • 5 phases

13
Background fsck
  • Problems when using background fsck
  • Background fsck cannot update the on-disk image
    of file system
  • Because, the file system state will be different
    from that of snapshot
  • User-level program cannot obtain kernel-level
    locks needed to provide consistent updates of
    file system data structures

14
Background fsck
  • Solution
  • Five operations were implemented in the kernel
    (added system call)
  • Set/clear superblock flags
  • Adjust an inode block count
  • Adjust an inode ref count
  • Free a range of inodes
  • Free a range of blocks/fragments

15
Background fsck Performance
  • Results
  • Traditional fsck times
  • On idle file system

16
Background fsck Performance
  • Results
  • Background fsck times
  • On idle file system
  • On active file system
Write a Comment
User Comments (0)
About PowerShow.com