disk-burnin.sh -> Unable to detect device type

Status
Not open for further replies.

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
System info:
X9DRI-LN4F+
2x Xeon E5-2630 Hex Core 2.3Ghz
32GB
Backplane: BPN-SAS-826A
2 LSI HBA passed through
8 x 1 TB HDDs
ESXi 6.5

Folks,

Testing my back-up server. loaded 8 x 1 TB HDDs to it that I had laying around.

Created a VM with 16GB RAM and a 32GB boot vdisk, created a raidz2 with all 8 disks, deleted the pool, and:

ssh'ed to the vm, downloaded the script from @Spearfoot git, executed sysctl kern.geom.debugflags=0x10 to allow badblocks write and started the test.

After letting run for awhile, returned to the workstation to check and one of the tests was running badblocks. All others were waiting for smartctl short test to finish. Also noticed that message below:

Code:
root@ben_nas01:/var/log # smartctl -i /dev/ad2
smartctl 6.6 2017-11-05 r4594 [FreeBSD 11.1-STABLE amd64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

/dev/ad2: Unable to detect device type
Please specify device type with the -d option.


Stopped the tests and run smartcrl -a to see if would get the drive info and got the same error above.

Had to boot gparted, erase all partitions, create new ones, format, etc.

Running manually :( So far short completed and long in progress.... tomorrow badblocks.

Have anyone had such scenario?
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478
System info:
X9DRI-LN4F+
2x Xeon E5-2630 Hex Core 2.3Ghz
32GB
Backplane: BPN-SAS-826A
2 LSI HBA passed through
8 x 1 TB HDDs
ESXi 6.5

Folks,

Testing my back-up server. loaded 8 x 1 TB HDDs to it that I had laying around.

Created a VM with 16GB RAM and a 32GB boot vdisk, created a raidz2 with all 8 disks, deleted the pool, and:

ssh'ed to the vm, downloaded the script from @Spearfoot git, executed sysctl kern.geom.debugflags=0x10 to allow badblocks write and started the test.

After letting run for awhile, returned to the workstation to check and one of the tests was running badblocks. All others were waiting for smartctl short test to finish. Also noticed that message below:

Code:
root@ben_nas01:/var/log # smartctl -i /dev/ad2
smartctl 6.6 2017-11-05 r4594 [FreeBSD 11.1-STABLE amd64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

/dev/ad2: Unable to detect device type
Please specify device type with the -d option.


Stopped the tests and run smartcrl -a to see if would get the drive info and got the same error above.

Had to boot gparted, erase all partitions, create new ones, format, etc.

Running manually :( So far short completed and long in progress.... tomorrow badblocks.

Have anyone had such scenario?
Odd...

Did you fat-finger the device name? Shouldn't the device spec be /dev/da2 instead of /dev/ad2, as you show in the error message above?

What does the output of smartctl --scan show?
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
Did you fat-finger the device name? Shouldn't the device spec be /dev/da2 instead of /dev/ad2, as you show in the error message above?

That's a possibility with my 350lb fat fingers. Now I can't be certain, but I'm 99% sure it must have been user's error, as I ran short, long, and badblocks manually and all worked. Your script works, for sure, I've tested several times with it.

Was more going toward a hardware issue as the backplane is new (for me) and I'm using two LSI that I've flashed to IT.

The device IS /dev/da1, so now I'm not sure ...

Thanks :)
 

dak180

Patron
Joined
Nov 22, 2017
Messages
310
After letting run for awhile, returned to the workstation to check and one of the tests was running badblocks. All others were waiting for smartctl short test to finish. Also noticed that message below:

Code:
root@ben_nas01:/var/log # smartctl -i /dev/ad2
smartctl 6.6 2017-11-05 r4594 [FreeBSD 11.1-STABLE amd64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

/dev/ad2: Unable to detect device type
Please specify device type with the -d option.


Stopped the tests and run smartcrl -a to see if would get the drive info and got the same error above.

Had to boot gparted, erase all partitions, create new ones, format, etc.

Running manually :( So far short completed and long in progress.... tomorrow badblocks.

Have anyone had such scenario?

Yes, I ran into a similar issue; try my branch and see if that works for you. I am guessing that you are using sata drives but connected to the LSI HBAs, since they are sas and the drive are sata smartctl needs to be aware of this because of command differences.
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
I am guessing that you are using sata drives but connected to the LSI HBAs, since they are sas and the drive are sata smartctl needs to be aware of this because of command differences.

Correct on all accounts.

Yes, I ran into a similar issue; try my branch and see if that works for you.

Thanks. Will save it for the future.
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
Did you fat-finger the device name?

Just went back to that ssh session and look at the history and YES, I fat fingered some. Does the script checks for a valid device? (Didn't have a chance to look at it yet).
 

dak180

Patron
Joined
Nov 22, 2017
Messages
310
Does the script checks for a valid device? (Didn't have a chance to look at it yet).
Not yet, but I will look into it.

First pass at checking for an existing device is in.
 
Last edited:

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
executed sysctl kern.geom.debugflags=0x10 to allow badblocks write
Please don't do that. What that says is "let me write to disks that are already in use with mounted filesystems". It makes it possible to overwrite and lose actual data, and is not needed for badblocks. Kind of the opposite, actually. If there is anywhere in the forums that still says something inaccurate like "to allow raw writes", please let me know and I will add a note.

smartctl -i /dev/ad2
Modern FreeNAS (FreeBSD) systems will not have "ad" devices, but "ada".
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
Please don't do that. What that says is "let me write to disks that are already in use with mounted filesystems". It makes it possible to overwrite and lose actual data, and is not needed for badblocks. Kind of the opposite, actually. If there is anywhere in the forums that still says something inaccurate like "to allow raw writes", please let me know and I will add a note.

https://forums.freenas.org/index.php?resources/hard-drive-burn-in-testing.92/

upload_2018-4-16_13-56-0.png
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Yes, I ran into a similar issue; try my branch and see if that works for you. I am guessing that you are using sata drives but connected to the LSI HBAs, since they are sas and the drive are sata smartctl needs to be aware of this because of command differences.
Odd, I've never had a problem with my SATA drives on the SAS controller.

Sent from my SAMSUNG-SGH-I537 using Tapatalk
 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506

dak180

Patron
Joined
Nov 22, 2017
Messages
310
Odd, I've never had a problem with my SATA drives on the SAS controller.
If you want really odd, I discovered that not all smartctl commands care that it is a sata drive connected via sas and most of the ones that do, said in their error messages exactly what the issue was (instead automatically dealing with the issue).
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
If you want really odd, I discovered that not all smartctl commands care that it is a sata drive connected via sas and most of the ones that do, said in their error messages exactly what the issue was (instead automatically dealing with the issue).

Try to smartctl a non existing hdd ...

Code:
root@mellobc_nas:~ # smartctl -a /dev/da9
smartctl 6.6 2017-11-05 r4594 [FreeBSD 11.1-STABLE amd64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

/dev/da9: Unable to detect device type
Please specify device type with the -d option.

Use smartctl -h to get a usage summary


This server only has ... eight HDDs :confused:
 

nasnice

Explorer
Joined
Jul 14, 2014
Messages
82
Hi There,
Just had the same problem, was burning in a new system just needed to finish badblocks on one drive when the system shut down due to a power down command from the UPS...
Now the disk that was doing the badblocks just does not show up anymore.... get the same message as per the previous post... But the disk is there..

Any way to properly init a drive again?

In fact the view disks also fails... nothing there.... but smartctl does give me results for all 6 other drives...
Using Webgui and shell.
Tmux does NOT find the session from before power down...
What to do now?
 

nasnice

Explorer
Joined
Jul 14, 2014
Messages
82
Hooked up the drive to another system... Toast.. Up for RMA...
 
Status
Not open for further replies.
Top