Ffsck: The Fast File-System Checker

  • Authors:
  • Ao Ma;Chris Dragga;Andrea C. Arpaci-Dusseau;Remzi H. Arpaci-Dusseau;Marshall Kirk Mckusick

  • Affiliations:
  • University of Wisconsin, Madison and EMC Corporation;University of Wisconsin, Madison;University of Wisconsin, Madison;University of Wisconsin, Madison;McKusick.com

  • Venue:
  • ACM Transactions on Storage (TOS)
  • Year:
  • 2014

Quantified Score

Hi-index 0.00

Visualization

Abstract

Failures, errors, and bugs can corrupt file systems and cause data loss, despite the presence of journals and similar preventive techniques. While consistency checkers such as fsck can detect corruption and repair a damaged image, they are generally created as an afterthought, to be run only at rare intervals. Thus, checkers operate slowly, causing significant downtime for large scale storage systems. We address this dilemma by treating the checker as a key component of the overall file system, rather than a peripheral add-on. To this end, we present a modified ext3 file system, rext3, to directly support the fast file-system checker, ffsck. Rext3 colocates and self-identifies its metadata blocks, removing the need for costly seeks and tree traversals during checking. These modifications allow ffsck to scan and repair the file system at rates approaching the full sequential bandwidth of the underlying device. In addition, we demonstrate that rext3 generally performs competitively with ext3 and exceeds it in handling random reads and large writes. Finally, we apply our principles to FreeBSD’s FFS file system and its checker, doing so in a lightweight fashion that preserves the file-system layout while still providing some of the performance gains from ffsck.