SOLVED smartctl not working as expected

Ganzir

Explorer
Joined
May 15, 2016
Messages
57
Hello I just finished buidling my second NAS and before putting data onto it I wanted to submit all drives to a smarctl test.

However when I enter:

Code:
smartctl –t long /dev/ada0


I get the following:

Code:
smartctl 7.2 2020-12-30 r5155 [FreeBSD 12.2-RELEASE-p6 amd64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

ERROR: smartctl takes ONE device name as the final command-line argument.
You have provided 3 device names:
–t
long
/dev/ada0

Use smartctl -h to get a usage summary


I am no pro at all when it comes to FreeBSD, can someone tell me, what the problem might be.

Thanks in advance.
 
Joined
Jan 7, 2015
Messages
1,155
do camcontrol devlist

In my system these are ada0, ada1 etc are SSDs and they give me the same message as yours. However the test run in the same way against a disk at /dev/da0 etc works as expected
 
Joined
Jan 7, 2015
Messages
1,155
And now strangely they all work
 

Ganzir

Explorer
Joined
May 15, 2016
Messages
57
You are right my disks ars SSDs, however, /da0 leads to the same behaviour:

Code:
root@truenas[~]# camcontrol devlist
<Samsung SSD 850 PRO 256GB EXM04B6Q>  at scbus0 target 0 lun 0 (pass0,ada0)
<Samsung SSD 850 PRO 256GB EXM04B6Q>  at scbus1 target 0 lun 0 (pass1,ada1)
<Samsung SSD 850 PRO 256GB EXM04B6Q>  at scbus2 target 0 lun 0 (pass2,ada2)
<Samsung SSD 850 PRO 256GB EXM04B6Q>  at scbus3 target 0 lun 0 (pass3,ada3)
<Samsung SSD 850 PRO 256GB EXM04B6Q>  at scbus4 target 0 lun 0 (pass4,ada4)
<Samsung SSD 850 PRO 256GB EXM04B6Q>  at scbus5 target 0 lun 0 (pass5,ada5)
<Samsung SSD 850 PRO 256GB EXM04B6Q>  at scbus6 target 0 lun 0 (pass6,ada6)
<Samsung SSD 850 PRO 256GB EXM04B6Q>  at scbus7 target 0 lun 0 (pass7,ada7)
root@truenas[~]# smartctl –t long /dev/da0
smartctl 7.2 2020-12-30 r5155 [FreeBSD 12.2-RELEASE-p6 amd64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

ERROR: smartctl takes ONE device name as the final command-line argument.
You have provided 3 device names:
–t
long
/dev/da0

Use smartctl -h to get a usage summary
 
Joined
Oct 22, 2019
Messages
3,641
There’s something strange about the hyphens being used in your post. Compare the following two lines. They look identical, but they’re actually different. Did you originally happen to copy-paste the command from a webpage or forum post the first time you tried it?

Similar, but completely different (look at the hyphens):
smartctl –t long /dev/ada0
smartctl -t long /dev/ada0


Some things that can cause this:
  • Using a virtual keyboard
  • Copying and pasting the command
 
Last edited:

Ganzir

Explorer
Joined
May 15, 2016
Messages
57
Thank you very much winnielinnie, you are a genius, that was the problem.
 
Top