UPDATE-SMART-DRIVEDB(8)

πŸ’– update-smart-drivedb β€” the smartmontools drive-database glow-up πŸ’–

okay bestie, welcome to update-smart-drivedb(8), straight out of the SMART Monitoring Tools family. this is the little script that keeps your drive database looking fresh. let's get into it πŸ’…


✨ NAME ✨

update-smart-drivedb β€” update smartmontools drive database


πŸ¦‹ SYNOPSIS πŸ¦‹

update-smart-drivedb [OPTIONS] [DESTFILE]

🌸 DESCRIPTION 🌸

[This man page is generated for the Linux version of smartmontools. It does not contain info specific to other platforms.]

so, update-smart-drivedb updates /usr/share/smartmontools/drivedb.h β€” or your very own DESTFILE if you're feeling custom β€” and it pulls from branches/RELEASE_7_5_DRIVEDB of the smartmontools SVN repository. slay.

the tools it uses for downloading? one of these icons: curl(1), wget(1), lynx(1), or svn(1). pick your fighter.

the downloaded file gets verified with OpenPGP/GPG key ID 721042C5. and bestie, the public key block is literally included in the script, so no extra setup, we love that 🫢

the old file stays put if the downloaded file is identical (ignoring the differences in Id string) β€” otherwise it gets moved to drivedb.h.old.

the old file also stays if the downloaded file reports an older version on the same branch. you can override that with the --force option. but if the branch version differs, the file is always updated. periodt.


✨ OPTIONS ✨

  • -s SMARTCTL, --smartctl SMARTCTL β€” use the smartctl(8) executable at path SMARTCTL for the drive database syntax check. the form -s - disables the syntax check entirely. default is /usr/bin/smartctl.
  • -t [DIR/]TOOL, --tool [DIR/]TOOL β€” use TOOL for download. TOOL is one of: curl wget lynx svn. default is the first one found in PATH. if a DIR is also specified, the plain TOOL name must begin with any of the above names.
  • -u LOCATION, --url-of LOCATION β€” use URL of LOCATION for download. LOCATION is one of:
    • github (GitHub mirror of SVN repository),
    • sf (Sourceforge code browser),
    • svn (SVN repository),
    • svni (SVN repository via HTTP instead of HTTPS),
    • trac (Trac code browser).

the default is svn.

  • --url URL β€” download from URL. a valid OpenPGP/GPG signature with .raw.asc extension must also exist unless --no-verify is also specified.
  • --file FILE β€” copy from local FILE. a valid OpenPGP/GPG signature FILE.raw.asc must also exist unless --no-verify is also specified.
  • --trunk β€” download from SVN trunk. this requires --no-verify because the trunk versions are not signed. no signature, no safety net, you've been warned 😭
  • --branch X.Y β€” download from branches/RELEASE_X_Y_DRIVEDB. this also selects the OpenPGP/GPG key for older branches (5.40 to 6.6: Key ID DFD22559).
  • --cacert FILE β€” use CA certificates from FILE to verify the peer.
  • --capath DIR β€” use CA certificate files from DIR to verify the peer.
  • --insecure β€” don't abort download if certificate verification fails. this option is also required if a HTTP URL is selected with the -u option.
  • --no-verify β€” don't verify signature with GnuPG. living dangerously, i see πŸ™ˆ
  • --force β€” allow downgrades. by default, the database is not replaced with an older version of the same branch.
  • --export-key β€” print the OpenPGP/GPG public key block.
  • --dryrun β€” print download commands only. no actual downloading, just vibes.
  • -q, --quiet β€” suppress info messages. 🀫
  • -v, --verbose β€” verbose output. give me everything.
  • -h, --help β€” print help text.

πŸŽ€ EXAMPLES πŸŽ€

regular update, the classic:

# update-smart-drivedb
/usr/share/smartmontools/drivedb.h 7.2/5225 updated to 7.2/5237

revert to previous version (the "oops, undo" move):

# update-smart-drivedb --force \
  --file /usr/share/smartmontools/drivedb.h.old
/usr/share/smartmontools/drivedb.h 7.2/5237 downgraded to 7.2/5225

download the database from SVN trunk to current directory:

$ update-smart-drivedb --trunk --no-verify -s - -u trac drivedb-trunk.h
drivedb-trunk.h 7.3/5254 newly installed (NOT VERIFIED)
notice that (NOT VERIFIED) at the end? that's the trunk life. no signature, no promises πŸ’€

⭐ EXIT STATUS ⭐

exit status is 0 if the database has been successfully updated or is already up to date. if an error occurs, the exit status is 1. simple as that, bestie.


🧚 FILES 🧚

  • /usr/bin/update-smart-drivedb β€” full path of this script.
  • /usr/bin/smartctl β€” used to check syntax of new drive database.
  • /usr/share/smartmontools/drivedb.h β€” current drive database.
  • /usr/share/smartmontools/drivedb.h.raw β€” current drive database with unexpanded SVN Id string.
  • /usr/share/smartmontools/drivedb.h.raw.asc β€” signature file.
  • /usr/share/smartmontools/drivedb.h.*old* β€” previous files.
  • /usr/share/smartmontools/drivedb.h.*error* β€” new files if rejected due to errors.
  • /usr/share/smartmontools/drivedb.h.lastcheck β€” empty file created if downloaded file was identical.

πŸ‘‘ AUTHORS πŸ‘‘

Christian Franke. this manual page was originally written by Hannes von Haugwitz <hannes@vonhaugwitz.com>.


πŸ’œ REPORTING BUGS πŸ’œ

to submit a bug report, create a ticket in the smartmontools wiki: <https://www.smartmontools.org/>.

alternatively, send the info to the smartmontools support mailing list: <https://listi.jpberlin.de/mailman/listinfo/smartmontools-support>.

they're nice, i promise. go tell them what broke 🫢


🌈 SEE ALSO 🌈

smartctl(8), smartd(8).


🌟 PACKAGE VERSION 🌟

smartmontools-7.5 2025-04-30 r5714
$Id: update-smart-drivedb.8.in 5605 2024-03-29 17:12:50Z chrfranke $

and that's the whole thing, bestie πŸ’– this page is from smartmontools-7.5, dated 2025-04-30, and it's the UPDATE-SMART-DRIVEDB(8) manual. go forth and update that database, you absolute icon πŸ”₯πŸ‘‘