Article 5Q95T smartmontools database update

smartmontools database update

by
walecha
from LinuxQuestions.org on (#5Q95T)
After I installed a new nvme drive about a week ago, smartctl had a segfault every time it checked the condition of the nvme drive in JSON format. Checks without JSON format proceed normally.
Code:# smartctl --all --json=c /dev/nvme0n1
{"json_format_version":[1,0],"smartctl":{"version":[7,2],"svn_revision":"5155","platform_info":"x86_64-linux-5.14.8","build_inf
o":"(local build)","argv":["smartctl","--all","--json=c","/dev/nvme0n1"],"exit_status":0},"device":{"name":"/dev/nvme0n1","info_name":"/
dev/nvme0n1","type":"nvme","protocol":"NVMe"},"model_name":"ADATA SX6000PNP","serial_number":"2L2529AQ4HRP","firmware_version":"VC0S032E
","nvme_pci_vendor":{"id":4332,"subsystem_id":4332},"nvme_ieee_oui_identifier":57420,"nvme_controller_id":1,"nvme_version":{"string":"1.
4","value":66560},"nvme_number_of_namespaces":1,"nvme_namespaces":[{"id":1,"size":{"blocks":500118192,"bytes":256060514304},"capacity":{
"blocks":500118192,"bytes":256060514304},"utilization":{"blocks":500118192,"bytes":256060514304},"formatted_lba_size":512,"eui64":{"oui"
:57420,"ext_id":87204422415}}],"user_capacity":{"blocks":500118192,"bytes":256060514304},"logical_block_size":512,"local_time":{"time_t"
:1633189410,"asctime":"Sat Oct 2 22:43:30 2021 WIB"},"smart_status":{"pfree(): invalid pointer
Aborted (core dumped)It turns out that there are parts/elements of the SMART status of the nvme drive that are not readable when using JSON format. After I update SMART database, smartctl no longer experiences core dumps on those drives.

Code:# /usr/sbin/update-smart-drivedb
/usr/share/smartmontools/drivedb.h updated from branches/RELEASE_7_2_DRIVEDB

# smartctl --all --json=c /dev/nvme0n1
{"json_format_version":[1,0],"smartctl":{"version":[7,2],"svn_revision":"5155","platform_info":"x86_64-linux-5.14.8","build_inf
o":"(local build)","argv":["smartctl","--all","--json=c","/dev/nvme0n1"],"exit_status":0},"device":{"name":"/dev/nvme0n1","info_name":"/
dev/nvme0n1","type":"nvme","protocol":"NVMe"},"model_name":"ADATA SX6000PNP","serial_number":"2L2529AQ4HRP","firmware_version":"VC0S032E
","nvme_pci_vendor":{"id":4332,"subsystem_id":4332},"nvme_ieee_oui_identifier":57420,"nvme_controller_id":1,"nvme_version":{"string":"1.
4","value":66560},"nvme_number_of_namespaces":1,"nvme_namespaces":[{"id":1,"size":{"blocks":500118192,"bytes":256060514304},"capacity":{
"blocks":500118192,"bytes":256060514304},"utilization":{"blocks":500118192,"bytes":256060514304},"formatted_lba_size":512,"eui64":{"oui"
:57420,"ext_id":87204422415}}],"user_capacity":{"blocks":500118192,"bytes":256060514304},"logical_block_size":512,"local_time":{"time_t"
:1633189645,"asctime":"Sat Oct 2 22:47:25 2021 WIB"},"smart_status":{"passed":true,"nvme":{"value":0}},"nvme_smart_health_information_l
og":{"critical_warning":0,"temperature":32,"available_spare":100,"available_spare_threshold":32,"percentage_used":0,"data_units_read":52
736,"data_units_written":436051,"host_reads":935286,"host_writes":2833937,"controller_busy_time":0,"power_cycles":5,"power_on_hours":177
,"unsafe_shutdowns":0,"media_errors":0,"num_err_log_entries":21,"warning_temp_time":0,"critical_comp_time":0},"temperature":{"current":3
2},"power_cycle_count":5,"power_on_time":{"hours":177}}Looks like we need to run update-smart-drivedb regularly, maybe weekly or monthly, considering that there are many variants of nvme drive, especially at the consumer level.latest?d=yIl2AUoC8zA latest?i=Tq_cjd5W4yk:HLQdPnHAf6Y:F7zBnMy latest?i=Tq_cjd5W4yk:HLQdPnHAf6Y:V_sGLiP latest?d=qj6IDK7rITs latest?i=Tq_cjd5W4yk:HLQdPnHAf6Y:gIN9vFwTq_cjd5W4yk
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments