Code Monkey home page Code Monkey logo

goblktest's Introduction

goblktest

Overview

Tests a block device by writing an iterating SHA-512 hash over the entire device, and then reads back the pattern while comparing to the same computation run a second time.

This validates the entire storage pipeline in two important ways:

  1. Guarantees that each read and write is addressing exactly one location, and doing so consistently. (eg No subtle device bug that is occasionally putting bytes in the wrong sector, or block scheduler/elevator bug that returns reads in the wrong order)
  2. Tests that billions of pseudo-random bit patterns can reliably traverse media, caches, cables, connectors, and all the various components involved in transporting them.

Note that a failure that would be detected by this tool -- but not a more basic testing tool such as badblocks -w -- is a wildly pessimistic and unlikely one. However, it may be a failure that would be insanely difficult to detect otherwise, particularly on archival drives where data is mostly written and rarely read.

Usage

goblktest --open /dev/sdz --bs 4096

  • --open (required)
    • Specifies block device to open for testing.
  • --bs (optional, but recommended)
  • --seed (optional)
    • If running the test on the same medium multiple times, use a different seed value to force a unique hash pattern each time.
  • --start (optional)
    • It's possible to skip some initial blocks on the device, for example to preserve an MBR.
  • --checkonly (optional)
    • If the medium has passed a test previously, it's possible to re-test the read portion. For success, use the same --bs, --seed, and --start arguments, if provided before.

Contributing

Pull requests and issues are welcome. Some open issues might be easy, try to take a stab at those if you're looking for something to do.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.