Fixing Bad Blocks Finder burnin “ERROR - unable to open device: /dev/sda [Device or resource is busy]”

My situation

I had four equivalent drives.

I had 2 x RAID 1 mirrors created with mdadm (ref)

I had both of these RAID 1 mirrors pooled together using mergerfs (ref)

The problem

I tried to run a burnin with bad blocks finder.

sudo bbf -c <MYDEVICECAPTCHACODE> burnin /dev/sda

I received an error.

ERROR - unable to open device: /dev/sda [Device or resource is busy]

Unmounting the drives

I went in and unmounted my mergerfs pool and both of my mdadm arrays from their respective spots in my /mnt folder.

$ sudo umount /mnt/storage
$ sudo umount /mnt/mirror1
$ sudo umount /mnt/mirror2

I tried the burnin again here and was still receiving the ERROR.

Deactivating the mdadm array

I then stopped the mdadm arrays, zeroed their superblocks, commented out persistent references to the array in /etc/fstab file, commented out the array definition in my /etc/mdadm/mdadm.conf file, and updated initramfs so that the early boot process doesn’t try to find these arrays. (ref)

Happily ever after

Now my first 10TB drive is doing a burnin… only 28 more hours to go ?

Hopefully this helps someone!

Special thanks to trapexit for not only his help figuring out the issue, but for developing these tools in the first place. Check out his website or his Github.

Here’s a link to the original issue a opened on Github.

Get Notified of New Posts

Sign up for the newsletter and I'll send you an email when there's a new post.