Bug 240519 - sysutils/smartmontools: add in daily smart.in possibility to work with areca controllers and autodetect nvme drives
Summary: sysutils/smartmontools: add in daily smart.in possibility to work with areca ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Steve Wills
URL:
Keywords:
: 240520 240525 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-09-12 00:28 UTC by VVD
Modified: 2019-10-02 17:56 UTC (History)
1 user (show)

See Also:
samm: maintainer-feedback+


Attachments
add in daily smart.in possibility to work with areca controllers and autodetect nvme drives (716 bytes, patch)
2019-09-12 00:28 UTC, VVD
no flags Details | Diff
patch updated to bump portrevision and update REQUIRE line (1.61 KB, patch)
2019-09-27 13:52 UTC, Steve Wills
no flags Details | Diff
Further updated patch (36.52 KB, patch)
2019-10-02 17:10 UTC, Steve Wills
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description VVD 2019-09-12 00:28:31 UTC
Created attachment 207401 [details]
add in daily smart.in possibility to work with areca controllers and autodetect nvme drives

1. There are no possibility to set drives on areca controllers in periodic.conf.
Command line look like: smartctl /dev/arcmsr0 -dareca,1 -a
With this patch you can set in periodic.conf:
daily_status_smart_devices="arcmsr0,1 arcmsr0,2 arcmsr0,3 arcmsr0,4 da0 da1"

# /usr/local/etc/periodic/daily/smart

SMART status:
Checking health of /dev/arcmsr0 (-dareca,1): OK
Checking health of /dev/arcmsr0 (-dareca,2): OK
Checking health of /dev/arcmsr0 (-dareca,3): OK
Checking health of /dev/arcmsr0 (-dareca,4): OK
Checking health of /dev/da0: OK
Checking health of /dev/da1: OK


2. Auto-detect in /usr/local/etc/periodic/daily/smart show nvd* devices:
# sysctl -n kern.disks | sed -E 's/[[:<:]](cd|ar)[0-9]+//g'
ada1 ada0 da1 da0 nvd1 nvd0
But smartctl want nvme*. Patch is hack, but it work:
# sysctl -n kern.disks | sed -E 's/[[:<:]](cd|ar)[0-9]+//g; s/nvd/nvme/g'
ada1 ada0 da1 da0 nvme1 nvme0

# /usr/local/etc/periodic/daily/smart 

SMART status:
Checking health of /dev/ada1: OK
Checking health of /dev/ada0: OK
Checking health of /dev/da1: OK
Checking health of /dev/da0: OK
Checking health of /dev/nvme1: OK
Checking health of /dev/nvme0: OK


3. I have question:
if in /usr/local/etc/smartd.conf add option "-m email@domain -M test", then autostart of smartd during boot process is very long - trying end email, but mail daemon starts after smartd daemon. 
I slove this issue: add word "mail" after "# REQUIRE: LOGIN" in /usr/local/etc/rc.d/smartd.
Is it correct way to solve this issue?
If yes, then add, plz, it to sysutils/smartmontools/files/smartd.in (I can make diff file).
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2019-09-12 00:51:04 UTC
*** Bug 240520 has been marked as a duplicate of this bug. ***
Comment 2 VVD 2019-09-12 09:00:33 UTC
*** Bug 240525 has been marked as a duplicate of this bug. ***
Comment 3 VVD 2019-09-12 09:03:39 UTC
Sorry for duplicates, but I got "504 Gateway Time-out" 2 times last night and postpone report till morning. But both reports was successfully added!
Comment 4 Steve Wills freebsd_committer 2019-09-27 13:52:24 UTC
Created attachment 207887 [details]
patch updated to bump portrevision and update REQUIRE line

Yeah, I think that's the right way. See attached patch.
Comment 5 VVD 2019-09-27 15:01:37 UTC
(In reply to Steve Wills from comment #4)
Your patch work fine, thanks!
Comment 6 Steve Wills freebsd_committer 2019-09-27 18:03:30 UTC
(In reply to VVD from comment #5)
Thanks for letting me know. We need maintainer feedback or timeout.
Comment 7 Oleksii Samorukov freebsd_committer 2019-10-02 15:42:19 UTC
Patch looks good, please merge, thank you
Comment 8 Steve Wills freebsd_committer 2019-10-02 17:10:45 UTC
Created attachment 208043 [details]
Further updated patch

Not sure if this is sufficient, but this changes sssd to rely on samba 4.10 directly, rather than vary which samba is used based on the default version in Mk/bsd.default-versions.mk. This still relies on setting SAMBA4_BUNDLED_LDB to no when the SMB option is on in sssd. It also means that you can't use the current default samba, samba 4.8, at the same time as sssd. Again, not sure if this is OK, but wanted to propose it.
Comment 9 Steve Wills freebsd_committer 2019-10-02 17:35:24 UTC
(In reply to Steve Wills from comment #8)
Sorry, posted that comment on the wrong bug.
Comment 10 commit-hook freebsd_committer 2019-10-02 17:47:44 UTC
A commit references this bug:

Author: swills
Date: Wed Oct  2 17:46:42 UTC 2019
New revision: 513591
URL: https://svnweb.freebsd.org/changeset/ports/513591

Log:
  sysutils/smartmontools: support areca controllers and nvme

  While here, ensure mail starts before smartd

  PR:		240519
  Submitted by:	VVD <vvd@unislabs.com>
  Approved by:	samm@os2.kiev.ua (maintianer)

Changes:
  head/sysutils/smartmontools/Makefile
  head/sysutils/smartmontools/files/smart.in
  head/sysutils/smartmontools/files/smartd.in
Comment 11 Steve Wills freebsd_committer 2019-10-02 17:56:03 UTC
Committed, thanks!