badblocks behaving strangely?

Status
Not open for further replies.

IanWorthington

Contributor
Joined
Sep 13, 2013
Messages
144
I'm using badblocks to test a new drive, but regardless of what I specify it only writes x00, even in its normal -w mode where it should loop over 4 different values.

Anyone seen anything like this before?

Code:
root@tools:~ # /uls/badblocks -t 0xff -b 65536 -c 65536 -s -v -w /dev/ada0
Checking for bad blocks in read-write mode
From block 0 to 91570664
Testing with pattern 0x00: set_o_direct: Inappropriate ioctl for device
^C0.02% done, 0:07 elapsed. (0/0/0 errors)
Interrupted at block 20038

root@tools:~ # /uls/badblocks -t 0x55 -b 65536 -c 65536 -s -v -w /dev/ada0
Checking for bad blocks in read-write mode
From block 0 to 91570664
Testing with pattern 0x00: set_o_direct: Inappropriate ioctl for device
^C0.01% done, 0:02 elapsed. (0/0/0 errors)
Interrupted at block 6262

root@tools:~ # /uls/badblocks -b 65536 -c 65536 -s -v -w -t 0xff /dev/ada0
Checking for bad blocks in read-write mode
From block 0 to 91570664
Testing with pattern 0x00: set_o_direct: Inappropriate ioctl for device
^C0.00% done, 0:01 elapsed. (0/0/0 errors)
Interrupted at block 4500

root@tools:~ # /uls/badblocks -b 65536 -c 65536 -s -v -w /dev/ada0
Checking for bad blocks in read-write mode
From block 0 to 91570664
Testing with pattern 0x00: set_o_direct: Inappropriate ioctl for device
done
Reading and comparing: done
Testing with pattern 0x00: 69.78% done, 31:40:39 elapsed. (0/0/0 errors)
 

MrToddsFriends

Documentation Browser
Joined
Jan 12, 2015
Messages
1,338
I'm using badblocks to test a new drive, but regardless of what I specify it only writes x00, even in its normal -w mode where it should loop over 4 different values.

Does it work as expected if you specify the test pattern in decimal (without a prefix)?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Your hostname and the path you're using for badblocks suggest that you aren't running it on a FreeNAS system. Is this the case? It's possible there's a bug in whatever version you're using. I've used the version packaged with FreeNAS 9.10 rather a bit in the last few weeks, and it's worked as expected (cycling through the four patterns it uses by default), though I haven't specified a pattern to test.
 

IanWorthington

Contributor
Joined
Sep 13, 2013
Messages
144
Your hostname and the path you're using for badblocks suggest that you aren't running it on a FreeNAS system. Is this the case? It's possible there's a bug in whatever version you're using. I've used the version packaged with FreeNAS 9.10 rather a bit in the last few weeks, and it's worked as expected (cycling through the four patterns it uses by default), though I haven't specified a pattern to test.

I'm running in a jail (have screen installed there.) The path is a link to the main usr/local/sys.

You've made me think though.... Let me retest it outside the jail...

TK...
 

IanWorthington

Contributor
Joined
Sep 13, 2013
Messages
144
OK, it's NOT the jail. It IS however the value of -c. Works fine up to 16k, goes weird after that, either just not starting up for some values or just writing x00 for others. Odd.

Anyone know where to report it?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Status
Not open for further replies.
Top