The question is will disks will like to share this info. If you look into SCSI protocol, it provides not that much information. There are three main commands regarding this:
- READ CAPACITY is probably self explanatory -- it provides number of blocks
- INQUIRY provides vendor name, serial number, etc.
- LOG SENSE is likely is most interesting -- it provides many disk-specific informational pages like current temperature, usage statistics, etc. However many of the pages are not supported by disks.
This trio of commands can be issued using lower-layer commands from
sg_logs commands correspondingly. This package is supplied by Linux and shipped with Solaris 11.2+
However, if you look into what
sg_logs can provide for physical disks, there is not that much:
root@calypso-sparc31:~# sg_logs -p 0x0 /dev/rdsk/c0t5000CCA01248AAE0d0s2
HITACHI H106060SDSUN600G A2B0
Supported log pages:
0x00 Supported log pages
0x02 Error counters (write)
0x03 Error counters (read)
0x05 Error counters (verify)
0x06 Non-medium errors
0x0e Start-stop cycle counter
0x0f Application client
0x10 Self-test results
0x15 Background scan results (sbc-3)
0x18 Protocol specific port
0x1a Power condition transition
0x2f Informational exceptions (SMART)
0x30 Performance counters (Hitachi)
0x37 Cache (Seagate), Miscellaneous (Hitachi)
Plus if disk lives behind RAID-controller (like LSI) or storage server, you won't get anything from it.
And this is only for SCSI. ATA family of protocols is completely different beast.