*

Status
Not open for further replies.

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
Oh god, this is insane :D

But there's more room in the top, you should fill this empty space with more drives (you don't have enough drives I think...) :P
 

TinTIn

Contributor
Joined
Feb 9, 2015
Messages
142
[emoji28]


Sent from my iPhone using Tapatalk
 

TinTIn

Contributor
Joined
Feb 9, 2015
Messages
142
Anyone know a quick way I can run a SMART test on all these drives to check they're ok?


Sent from my iPhone using Tapatalk
 
Joined
Oct 2, 2014
Messages
925

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
A simple script should do it. Best would be if there were a command to list the device identifiers of all the disks, which I'm sure there is, but I don't know it. But this should be a start:
Code:
#!/bin/bash
for disk in {0..75}
do
smartctl -t long /dev/da$disk
done

Obviously you'd change the number range to match whatever disks you have, and this assumes they're all /dev/da(something).
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
I think you should make a script with a for loop like this:
Code:
#!/bin/sh

drives=`sysctl -n kern.disks | awk '{for (i=NF; i!=0 ; i--) print $i }'`

for drive in $drives
do
    smartctl -t long /dev/${drive}
done
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Like I said, I figured there would be a command (or series of commands) to list the identifiers of all installed disks... One of these days I really need to learn a bit about awk...

Actually, do you really need the awk command? The sysctl command appears to list all the disks, and the order shouldn't matter to this application. You could probably simplify to
Code:
for drive in `sysctl -n kern.disks`

...or am I missing something?
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
I only see what seems to be 72 active disks and 12 unoccupied bay or spares. Is this intended?
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
Like I said, I figured there would be a command (or series of commands) to list the identifiers of all installed disks... One of these days I really need to learn a bit about awk...

Actually, do you really need the awk command? The sysctl command appears to list all the disks, and the order shouldn't matter to this application. You could probably simplify to
Code:
for drive in `sysctl -n kern.disks`

...or am I missing something?

Yep, we've replied at the same time :)

Yes, you can omit the awk part. It's just that I copy-pasted it from my scripts thread ;)
 
Last edited:

TinTIn

Contributor
Joined
Feb 9, 2015
Messages
142
Disks at the back of the JBODs too.


Sent from my iPhone using Tapatalk
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Like I said, I figured there would be a command (or series of commands) to list the identifiers of all installed disks... One of these days I really need to learn a bit about awk...

Actually, do you really need the awk command? The sysctl command appears to list all the disks, and the order shouldn't matter to this application. You could probably simplify to
Code:
for drive in `sysctl -n kern.disks`

...or am I missing something?

Yeah, that this could encompass the boot device and other resources like SLOG or L2ARC. There's a reason that the array test script provides a few different options to target drives.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Sure, but does the awk expression do anything to avoid that? It didn't seem to on my system. All it did was (1) break out each listing to a new line, and (2) reverse the order.
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
No, it's a very basic script. The smartctl command will just fail to start the test on the drives that doesn't support it, not a big problem. Of course you can add a test to avoid that but I'll let that as a reader exercise :p
 

TinTIn

Contributor
Joined
Feb 9, 2015
Messages
142
Anyone know much about smartctl 'non-medium error count'? I'm getting figures like 17, 19, 21 on the drives after running short smart tests however all other info looks good and health status is ok.


Sent from my iPhone using Tapatalk
 

TinTIn

Contributor
Joined
Feb 9, 2015
Messages
142
Thanks for all the help, advice and support.


Sent from my iPhone using Tapatalk
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Not a chance I'd ever recommend that. I've seen a lot of people use it for benchmarks, and it is pretty poor at providing good benchmarks too.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Honestly, I find that the best "benchmark" is to use the FreeNAS machine exactly how you intend to use it. If you plan to copy large files on and off the server, then do exactly that.
Of course, if you are looking for things like raw zpool speed, you'll have to do local stuff like dd. Those are generally what I would consider "synthetic" as you are somewhat cheating by doing things locally. dd does give you a "general" feel for how good/bad your zpool is performing. Other things like iperf can help with network testing.
 
Status
Not open for further replies.
Top