Bug 1291928 - Consider enabling persistence or blessing a location for persistence data
Summary: Consider enabling persistence or blessing a location for persistence data
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: smartmontools
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Hlavinka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-15 22:18 UTC by Jason Tibbitts
Modified: 2019-02-12 17:42 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-11 17:55:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Trivial patch (698 bytes, patch)
2016-06-06 18:29 UTC, Jason Tibbitts
no flags Details | Diff
Proper patch (1.01 KB, patch)
2016-06-06 20:53 UTC, Jason Tibbitts
no flags Details | Diff

Description Jason Tibbitts 2015-12-15 22:18:16 UTC
I find that I'd really like smartd to spam me daily if it finds any issues, in case I happen to miss one notice.  Without persistence, smartd it seems will only warn me the first time it sees something wrong with a drive and won't notify again (until a fresh boot) even if something additional goes wrong.

I can understand if enabling persistence by default is too much, but could you consider including in the package a location for persistence data (i.e just make a directory /var/lib/smartmontools)?  Perhaps add a comment in /etc/sysconfig/smartmontools as well.  This way there will be a standard location for the data, which could also be added to selinux policy.

Thanks.  If I have another few minutes I'll work up a patch.

Comment 1 Jason Tibbitts 2016-06-06 18:29:44 UTC
Created attachment 1165337 [details]
Trivial patch

I guess I forgot to get back to this, but here's a trivial patch which adds /var/lib/smartmontools to the package.  The selinux policy appears to account for this already:

/var/lib/smartmontools(/.*)?   all files   system_u:object_r:fsdaemon_var_lib_t:s0

so I don't see any reason not to at least have smartmontools create it and mention it in the sysconfig file.

Comment 2 Jason Tibbitts 2016-06-06 20:53:15 UTC
Created attachment 1165406 [details]
Proper patch

Would be good if I actually sent the right patch.  Sorry for the spam.

BTW, I will be happy to commit this for you.

Comment 3 Michal Hlavinka 2016-11-11 17:55:18 UTC
build for rawhide
for other fedora versions, updates were build, but won't be pushed as updates until there is something bigger

Comment 4 Jason Tibbitts 2016-11-11 20:53:40 UTC
Cool, thanks!

Comment 5 Samuel Verschelde 2019-02-12 17:42:09 UTC
Hi! I may be mistaken, but it seems to me that creating /var/lib/smartmontools automatically makes smartd write in it. At least if I believe this report https://github.com/xcp-ng/xcp/issues/137. I can't test myself easily but figured I'd tell you just in case, because I think that was not on purpose (at least, again, if I'm right).


Note You need to log in before you can comment on or make changes to this bug.