Dear reader. I'm sorry if you're expecting a different topic than SMART for this article. I have to disappoint you.
While on FreeBSD and Linux it is very fast and easy to install the smartmontools (to get the smartctl command), I just had to do the same on a Solaris 10 machine. Just for the sake of "write it down", here is a short howto:
1. Download the smartmontools CSW package
wget http://mirror.opencsw.org/opencsw/dublin/i386/5.10/smartmontools-5.42%2cREV%3d2011.12.15-SunOS5.10-i386-CSW.pkg.gz
2. Unpack
gunzip smartmontools-5.42,REV=2011.12.15-SunOS5.10-i386-CSW.pkg.gz
3. Install package
pkgadd -d smartmontools-5.42,REV=2011.12.15-SunOS5.10-i386-CSW.pkg
The following packages are available:
1 CSWsmartmontools smartmontools - S.M.A.R.T. disk monitoring tools
(i386) 5.42,REV=2011.12.15
Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: all
Once installed, smartctl can be executed. First let's scan the hard drives:
/opt/csw/sbin/smartctl --scan
/dev/rdsk/c0t4d0s0 -d scsi # /dev/rdsk/c0t4d0s0, SCSI device
/dev/rdsk/c0t3d0s0 -d scsi # /dev/rdsk/c0t3d0s0, SCSI device
/dev/rdsk/c0t2d0s0 -d scsi # /dev/rdsk/c0t2d0s0, SCSI device
/dev/rdsk/c0t5d0s0 -d scsi # /dev/rdsk/c0t5d0s0, SCSI device
/dev/rdsk/c0t1d0s0 -d scsi # /dev/rdsk/c0t1d0s0, SCSI device
/dev/rdsk/c0t0d0s0 -d scsi # /dev/rdsk/c0t0d0s0, SCSI device
/dev/rdsk/c1t0d0s0 -d scsi # /dev/rdsk/c1t0d0s0, SCSI device
... and then get the SMART information:
/opt/csw/sbin/smartctl /dev/rdsk/c0t0d0s0 -a
smartctl 5.42 2011-10-20 r3458 [i386-pc-solaris2.10] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
Vendor: HP
Product: LOGICAL VOLUME
Revision: 5.22
User Capacity: 73,372,631,040 bytes [73.3 GB]
Logical block size: 512 bytes
Logical Unit id: 0x600508b1001048395656563133510009
Serial number: P61620H9VVV13Q
Device type: disk
Local Time is: Thu Nov 7 15:44:35 2013 CET
Device does not support SMART
Error Counter logging not supported
Device does not support Self Test logging
Unfortunately the disks of this server are so old that they don't support SMART... Bummer :-/. Newer disks would support SMART.
As a workaround the drive's status can also be read with iostat:
iostat -Exn
extended device statistics
r/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device
0.6 5.2 54.2 212.4 0.0 0.0 0.0 7.2 0 0 c0t0d0
0.6 5.0 54.0 212.4 0.0 0.0 0.0 7.7 0 0 c0t1d0
5.5 12.6 688.3 1116.1 0.0 0.4 0.0 23.8 0 3 c0t2d0
5.5 12.4 688.0 1116.1 0.0 0.4 0.0 23.7 0 3 c0t3d0
3.8 17.2 230.3 414.6 0.0 0.1 0.0 3.8 0 2 c0t4d0
3.8 17.1 229.3 414.6 0.0 0.1 0.0 3.8 0 2 c0t5d0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 c1t0d0
c0t0d0 Soft Errors: 10 Hard Errors: 0 Transport Errors: 0
Vendor: HP Product: LOGICAL VOLUME Revision: 5.22 Serial No:
Size: 73.37GB <73372630528 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 10 Predictive Failure Analysis: 0
[...]
ck from Switzerland wrote on Nov 24th, 2017:
Hi Jonas. No, we never got to run smartctl correctly on SmartOS.
Jonas from Germany wrote on Nov 24th, 2017:
Hello ck,
did you manage to get smartctl running with cciss driver on smartos? Or getting the information about the array controller with a different approach?
I installes the official hpssacli and hpacucli utils, but the controller is not found.
ck from Switzerland wrote on Feb 26th, 2015:
Hello Peter. Thanks for your comment. As a matter of fact, I have been spending the last two days together with a programmer who analyzed the smartmontools and its capabilities on SmartOS (a Solaris fork). Result is that the drivers (in my case cciss) are missing to pass the information from the drives behind a storage controller through the OS back to smartctl.
So on a HP DL 380 G7 running with SmartOS (joyent_20121018T224723Z), the following happens, when I try to use -d (tested two days ago):
# smartctl -d cciss,4 /dev/rdsk/c0t0d0 -a
smartctl 5.40 2010-10-16 r3189 [x86_64-sun-solaris2.11] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net
Device: HP LOGICAL VOLUME Version: 5.70
Serial number: 50014380230B2800
Device type: disk
Local Time is: Wed Feb 25 09:56:30 2015 UTC
Device does not support SMART
Error Counter logging not supported
Device does not support Self Test logging
Peter from Germany wrote on Feb 26th, 2015:
The reason your smartctl -a failed is not because the disks are old; it is because it is a hardware raid logical volume rather than a disk. You need to use the -d option (eg -d megaraid,0) or use a passthrough device (like /dev/pass* on bsd, /dev/sg* on Linux) to get the SMART data.
AWS Android Ansible Apache Apple Atlassian BSD Backup Bash Bluecoat CMS Chef Cloud Coding Consul Containers CouchDB DB DNS Database Databases Docker ELK Elasticsearch Filebeat FreeBSD Galera Git GlusterFS Grafana Graphics HAProxy HTML Hacks Hardware Icinga Influx Internet Java KVM Kibana Kodi Kubernetes LVM LXC Linux Logstash Mac Macintosh Mail MariaDB Minio MongoDB Monitoring Multimedia MySQL NFS Nagios Network Nginx OSSEC OTRS Office OpenSearch PGSQL PHP Perl Personal PostgreSQL Postgres PowerDNS Proxmox Proxy Python Rancher Rant Redis Roundcube SSL Samba Seafile Security Shell SmartOS Solaris Surveillance Systemd TLS Tomcat Ubuntu Unix VMWare VMware Varnish Virtualization Windows Wireless Wordpress Wyse ZFS Zoneminder