Burning in new hard drives

I just acquired some new hard drives for my ArchiveVolume pool. I always burn new drives in, its a simple process but I thought id go over it with my new site to get some content flowing!

First its best to start with a short smart test, just to confirm the drive is the right drive, and that the drive is ready to go.

I’m on FreeBSD using gmultipath for my drives (attached over ses). smartctl can’t use /dev/multipath/disk<id> so ill have to invoke the gmultipath list command to discover the disk name.

# gmultipath list
Geom name: disk15
Type: AUTOMATIC
Mode: Active/Passive
UUID: 9f6b9313-f39b-11ea-9ad7-001c23d66829
State: OPTIMAL
Providers:
1. Name: multipath/disk15
   Mediasize: 2000398933504 (1.8T)
   Sectorsize: 512
   Mode: r1w1e0
   State: OPTIMAL
Consumers:
1. Name: da58
   Mediasize: 2000398934016 (1.8T)
   Sectorsize: 512
   Mode: r2w2e1
   State: ACTIVE
2. Name: da59
   Mediasize: 2000398934016 (1.8T)
   Sectorsize: 512
   Mode: r2w2e1
   State: PASSIVE

Now that i know what names the consumers go by i can run my tests.

# smartctl -t short /dev/da59

If i want to view the contents of the test i can run the following.

# smartctl -a /dev/da59

Remember you need to replace /dev/da59 with the disk you’re trying to access. If you’re not sure you can check the hard drive serial numbers with a tool like geom disk list.

Now onto the next steps, id recommend running a conveyance and a long test next, remember these tests take time to continue, a %left and estimated total time can be seen using smartctl -a <disk>.

Next is the fun part. badblocks this program will flip every bit on your disk and its one of my favorites, make sure to start up a tmux session once you’re ready for this step so an accidental trip over your networking cable won’t cancel your badblocks command, this can take days!

##Run this in a tmux session!
##This will nuke all data on the drive! Be very sure about running badblocks.
# badblocks -ws /dev/multipath/disk15

##If your drive is newer, the process can be much faster if you specify the right block size
# badblocks -b 4096 -ws <disk>

Once that’s done, then that’s it! If your drives survived, then they’re probably going to do so for a while longer. Remember to regularly run SMART tests and keep an eye on drive health!

Leave a Comment

Your email address will not be published. Required fields are marked *