Badblocks (software): multiple drives at once? [SOLVED]

PhilBeyondDriven

Reputable
Oct 1, 2015
5
0
4,520
I'm needing to test a number of drives before I toss them in a server and one of the applications I'm using is badblocks. All of the drives are 2TB Hitachi Ultrastars, and each disk takes 16+ hours to scan. My experience with Linux is next to nothing, save for using Parted Magic a few times.

My question: can I command badblocks to scan multiple drives at once? What would that command look like?

The first drive's command was: badblocks -nvs /dev/sda

Secondary question: what is "destructive" about the destructive flag? What's destroyed?
 
Solution
The answer: Yes, you can test multiple drives simultaneously using badblocks. The version of badblocks I am using is included with Parted Magic. For those curious, here is the process:

- With all drives connected, and Parted Magic loaded, first verify that all disks are recognized. Do this by clicking the Drive Health icon on the desktop, and you're good to go if all of your drives are in the list.

- From there, you will need to know the system-assigned name for your drive. Parted Magic uses the /dev/sd* convention, where the *=drive letter. First drive would be /dev/sda, second drive would be /dev/sdb, and so on. If you're not sure, launch Secure Erase and select the internal wipe. That will bring up a box listing all of your...
I would assume destructive means it will wipe all data on the drive.

I use Active Kill disk to wipe all my drives. they have a free version that lets you do a one pass wipe. I always do 3 pass wipes on new drives at work. if they get any bad/reallocated sectors after having a 3 pass wipe i send them in for a RMA. otherwise they move on to being installed.
 
The answer: Yes, you can test multiple drives simultaneously using badblocks. The version of badblocks I am using is included with Parted Magic. For those curious, here is the process:

- With all drives connected, and Parted Magic loaded, first verify that all disks are recognized. Do this by clicking the Drive Health icon on the desktop, and you're good to go if all of your drives are in the list.

- From there, you will need to know the system-assigned name for your drive. Parted Magic uses the /dev/sd* convention, where the *=drive letter. First drive would be /dev/sda, second drive would be /dev/sdb, and so on. If you're not sure, launch Secure Erase and select the internal wipe. That will bring up a box listing all of your connected drives. For this operation, don't do anything else w/Secure Erase - just note the drive names.

- Then, click the black monitor icon located on the lower left side of the screen. This opens the command prompt.

- Start the first test, using exactly this command: badblocks -wvs /dev/sda

* Note that this command includes the -w flag, which is the destructive version of the badblocks operation. All of your data will be disappeared by this, so PLEASE REMEMBER TO BACK UP YOUR DATA. The -v flag performs the test in verbose mode, and the -s flag makes the operation show its progress. You do not need to separate the flags when entering the commands, lump them all together like I did. If you wish to run the non-destructive version of the test, change the -w flag to -n, which still performs the read/write test but is not supposed to destroy your data. Call me paranoid, but I'm not going to take that chance. I would absolutely, in the strongest way, encourage you to back everything up if you run the non-destructive test.

- Once the first scan starts, click the command prompt icon again, which will launch a new command window. For the second drive, enter this command exactly: badblocks -wvs /dev/sdb

- Do the same thing for the remainder of your drives; open more command windows and enter the same commands, only altering the very last letter to point the system to the correct drive.

Allow the scan to run fully. I can't tell you how long it'll take, but I can say for sure that it's not a fast operation. Plan on having your disk offline and testing for at least one day, likely more if you're testing large and/or multiple drives.

Thank you, drtweak, for your suggestion. And you are correct, destructive translates to wipe. :)
 
Solution