Spearfoot / FreeNAS-scripts

Handy shell scripts for use on FreeNAS servers
326 stars 64 forks source link

get_hdd_temp.sh not reporting Device Model and Model Family on Toshiba drives #18

Open weust1979 opened 3 years ago

weust1979 commented 3 years ago

In my server, not FreeNAS bit running plain FreeBSD 13.0, I have a mix of Samsung, Micron and Toshiba SATA drives. The Samsung and Micron drives are shown with their Device Model and Model Family in the output, but the Toshiba drives not at all. But when I run the command manually it shows the output just fine.

This is the script output for the drives:

=== DRIVES === da0: 31C [12.0TB] Z8B0A03KFP8G da1: 32C [12.0TB] Z8A0A0N1FP8G da2: 31C [12.0TB] Z8A0A0N8FP8G da3: 32C [12.0TB] Z8B0A032FP8G da4: 33C [12.0TB] Z8B0A03VFP8G da5: 32C [12.0TB] Z8A0A0MBFP8G da6: 38C [1.92TB] 18171D3C4771 Micron 5100 Pro / 52x0 (Micron_5200_MTFDDAK1T9TDN) da7: 35C [1.92TB] 18171D3C4AD0 Micron 5100 Pro / 52x0 (Micron_5200_MTFDDAK1T9TDN) ada0: 36C [250GB] S413NX0M707065K Samsung based SSDs (Samsung SSD 860 EVO M.2) ada1: 35C [250GB] S413NX0M707143Y Samsung based SSDs (Samsung SSD 860 EVO M.2)

This is the line run manually. There is no Model Family present for this drive:

$ doas smartctl -i /dev/da0 | grep "Device Model" Device Model: TOSHIBA HDWG21C

This is a full output of the -i command:

$ doas smartctl -i /dev/da0 smartctl 7.2 2020-12-30 r5155 [FreeBSD 13.0-RELEASE-p4 amd64] (local build) Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION === Device Model: TOSHIBA HDWG21C Serial Number: Z8B0A03KFP8G LU WWN Device Id: 5 000039 918c90e52 Firmware Version: 0601 User Capacity: 12,000,138,625,024 bytes [12.0 TB] Sector Sizes: 512 bytes logical, 4096 bytes physical Rotation Rate: 7200 rpm Form Factor: 3.5 inches Device is: Not in smartctl database [for details use: -P showall] ATA Version is: ACS-3 T13/2161-D revision 5 SATA Version is: SATA 3.3, 6.0 Gb/s (current: 6.0 Gb/s) Local Time is: Mon Oct 18 14:04:15 2021 CEST SMART support is: Available - device has SMART capability. SMART support is: Enabled

I also have two NVME drives which are completely ignored in the output it seems.

If I can add anything to help fix this, please let me know.

weust1979 commented 3 years ago

Just checked the perl script, and that one does report the Device Model, but also shows other info a bit different:

=== Drives ===
   da0:  31C [ 12.0 TB HDD] Z8B0A03KFP8G         TOSHIBA HDWG21C
   da1:  32C [ 12.0 TB HDD] Z8A0A0N1FP8G         TOSHIBA HDWG21C
   da2:  31C [ 12.0 TB HDD] Z8A0A0N8FP8G         TOSHIBA HDWG21C
   da3:  32C [ 12.0 TB HDD] Z8B0A032FP8G         TOSHIBA HDWG21C
   da4:  33C [ 12.0 TB HDD] Z8B0A03VFP8G         TOSHIBA HDWG21C
   da5:  32C [ 12.0 TB HDD] Z8A0A0MBFP8G         TOSHIBA HDWG21C
   da6:  38C [ 1.92 TB SSD] 18171D3C4771         Micron_5200_MTFDDAK1T9TDN (Micron 5100 Pro / 52x0 / 5300 SSDs)
   da7:  35C [ 1.92 TB SSD] 18171D3C4AD0         Micron_5200_MTFDDAK1T9TDN (Micron 5100 Pro / 52x0 / 5300 SSDs)
  ada0:  36C [  250 GB SSD] S413NX0M707065K      Samsung SSD 860 EVO M.2 250GB (Samsung based SSDs)
  ada1:  35C [  250 GB SSD] S413NX0M707143Y      Samsung SSD 860 EVO M.2 250GB (Samsung based SSDs)