1

The Scrub utility on Linux can accept different methods of scrubbing. These allow for different types and orders of 'passes'. For example, the 4-pass DoD 5220.22-M section 8-306 procedure is a 4-pass method where the passes are in order of

  1. Random
  2. 0x00
  3. 0xff
  4. Verify

What is the scope of a pass? Does each pass write to the entire file / drive before beginning the next pass, or is the target for scrubbing divided first into blocks, and the whole 4-pass process is performed on each block before moving to the next one?

1 Answer 1

3

The scope of pass is one rotation of that pattern, from the start to the end of the object being destroyed then start "another round" with the next pattern available of that pattern group/method.

Even not having explicitly said at docs(and I could not find at the source code any trace of paralel processing patterns), in a 379MB file, you can see that it passes on each pattern as a sequence. Using dod pattern group as an example:

[root@host ~]# scrub -p dod file
scrub: using DoD 5220.22-M patterns
scrub: padding file with 744 bytes to fill last fs block
scrub: scrubbing file 398323712 bytes (~379MB)
scrub: 0x00    |................................................|
scrub: 0xff    |................  

[root@host ~]# scrub -p dod file
scrub: using DoD 5220.22-M patterns
scrub: padding file with 744 bytes to fill last fs block
scrub: scrubbing file 398323712 bytes (~379MB)
scrub: 0x00    |................................................|
scrub: 0xff    |................................................|
scrub: random  |.........................

[root@host ~]# scrub -p dod file
scrub: using DoD 5220.22-M patterns
scrub: padding file with 744 bytes to fill last fs block
scrub: scrubbing file 398323712 bytes (~379MB)
scrub: 0x00    |................................................|
scrub: 0xff    |................................................|
scrub: random  |................................................|
scrub: 0x00    |................................................|
scrub: verify  |................................................|

I think it's safe to confirm that scrub will pass all patterns one after another the object being destroyed.

2
  • 379MB seems pretty large, certainly much larger than any block size I would divide my target into. I'll mark your answer as the correct one in a few days in lieu of hard documentation. If I haven't done that, feel free to comment here to remind me.
    – Raven
    Jun 1, 2017 at 20:56
  • If that helps you time scrub -p dod file took: real 0m14.572s user 0m4.044s sys 0m2.623s. Of course that this will have lots of things that could impact directly on time...
    – user34720
    Jun 1, 2017 at 21:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .