Thought this would be good information to add to the 1st post in this thread so other people dont have to go digging around for it.
I just got a 6 Terabyte WD RED Drive "WD60EFRX"
and the following did not work
badblocks -ws /dev/sdaX
It gave me an error
"badblocks: Value too large to be stored in data type invalid end block (5860522584): must be 32-bit value"
I needed to change the block size in order to get it work
badblocks -b 4096 -ws /dev/sdaX
I did get an error
"set_o_direct: Inappropriate ioctl for device"
But according to
dlavigne in his post
Dec 23, 2014
"I asked our GEOM guru who says:
FreeBSD does not do any caching for block device I/O. That makes O_DIRECT flag setting pointless there. I am not sure whether it should cause error, but I don't think that error should cause any problems if the tool is still working.
0x10 value for kern.geom.debugflags is still correct if user really wants to access raw device, that is mounted by the system. But it should be used with care, since it may be a way to shoot his own foot."
TLDR
For Drives 6 terabytes or bigger use the following command
badblocks -b 4096 -ws /dev/sdaX