/media/q/HDD1 $ systemctl status smartd.service
× smartd.service - Self Monitoring and Reporting Technology (SMART) Daemon
Loaded: loaded (/usr/lib/systemd/system/smartd.service; enabled; vendor preset: enab>
Active: failed (Result: exit-code) since Sat 2022-11-26 16:35:54 PST; 1min 28s ago
Docs: man:smartd(8)
man:smartd.conf(5)
Process: 892 ExecStart=/usr/sbin/smartd -n $smartd_opts (code=exited, status=17)
Main PID: 892 (code=exited, status=17)
Status: "No devices to monitor"
lines 1-8/8 (END)
In /etc/smartd.conf I changed the line
DEVICESCAN
to
DEVICESCAN -d removable
because I have an sd[x] device that I sometimes use, and sometimes not.
man smartd.conf states about type -d
removable - the device or its media is removable. This indicates to
smartd that it should continue (instead of exiting, which is the default
behavior) if the device does not appear to be present when smartd is
started.
Regardless, the smartd daemon still exits during bootup. What am I doing wrong?
I never used smartctl, thus this comment is based on a short study of the man pages.
As I understand it, you may define the type of a device as “removable”, but you still have to tell which device you define as being “removable”. I do not see that in your story. And that story is missing of course any prove of what you tell. Better show the whole of the configuration file, instead of picking out a few words without any context.
Unlike yourself, I studied man smartd.conf extensively. Although it recommends specifying a separate line for each device, it does not state that you must do so. I did not specify a device because sometimes that device is on /dev/sda, at other times on /dev/sdb, and I am not sure what determines which it would be. Hence I looked for a more general way to solve the problem.
But acting on your advice I expanded the line
DEVICESCAN type -d removable
to
DEVICESCAN /dev/sda type -d removable
which produced exactly the same result as before.
I was not “picking out a few words without any context”, as you put it, but one of only 2 active lines in the entire file, and how I had changed it, and quoted the relevant section of the man page to support my action. But as you seem to feel the situation would be clearer if I provide the entirety of /etc/smartd.conf, here it is.
Sample configuration file for smartd. See man smartd.conf.
Monitor 4 ATA disks connected to a 3ware 6/7/8000 controller which uses
the 3w-xxxx driver. Start long self-tests Sundays between 1-2, 2-3, 3-4,
and 4-5 am.
NOTE: starting with the Linux 2.6 kernel series, the /dev/sdX interface
is DEPRECATED. Use the /dev/tweN character device interface instead.
For example /dev/twe0, /dev/twe1, and so on.
#/dev/sdc -d 3ware,0 -a -s L/…/…/7/01
#/dev/sdc -d 3ware,1 -a -s L/…/…/7/02
#/dev/sdc -d 3ware,2 -a -s L/…/…/7/03
#/dev/sdc -d 3ware,3 -a -s L/…/…/7/04
Monitor 2 ATA disks connected to a 3ware 9000 controller which
uses the 3w-9xxx driver (Linux, FreeBSD). Start long self-tests Tuesdays
between 1-2 and 3-4 am.
#/dev/twa0 -d 3ware,0 -a -s L/…/…/2/01
#/dev/twa0 -d 3ware,1 -a -s L/…/…/2/03
Monitor 2 SATA (not SAS) disks connected to a 3ware 9000 controller which
uses the 3w-sas driver (Linux). Start long self-tests Tuesdays
between 1-2 and 3-4 am.
On FreeBSD /dev/tws0 should be used instead
#/dev/twl0 -d 3ware,0 -a -s L/…/…/2/01
#/dev/twl0 -d 3ware,1 -a -s L/…/…/2/03
Same as above for Windows. Option ‘-d 3ware,N’ is not necessary,
disk (port) number is specified in device name.
NOTE: On Windows, DEVICESCAN works also for 3ware controllers.
#/dev/hdc,0 -a -s L/…/…/2/01
#/dev/hdc,1 -a -s L/…/…/2/03
Monitor 3 ATA disks directly connected to a HighPoint RocketRAID. Start long
self-tests Sundays between 1-2, 2-3, and 3-4 am.
#/dev/sdd -d hpt,1/1 -a -s L/…/…/7/01
#/dev/sdd -d hpt,1/2 -a -s L/…/…/7/02
#/dev/sdd -d hpt,1/3 -a -s L/…/…/7/03
Monitor 2 ATA disks connected to the same PMPort which connected to the
HighPoint RocketRAID. Start long self-tests Tuesdays between 1-2 and 3-4 am
#/dev/sdd -d hpt,1/4/1 -a -s L/…/…/2/01
#/dev/sdd -d hpt,1/4/2 -a -s L/…/…/2/03
HERE IS A LIST OF DIRECTIVES FOR THIS CONFIGURATION FILE.
PLEASE SEE THE smartd.conf MAN PAGE FOR DETAILS
-d TYPE Set the device type: ata, scsi, marvell, removable, 3ware,N, hpt,L/M/N
-T TYPE set the tolerance to one of: normal, permissive
-o VAL Enable/disable automatic offline tests (on/off)
-S VAL Enable/disable attribute autosave (on/off)
-n MODE No check. MODE is one of: never, sleep, standby, idle
-H Monitor SMART Health Status, report if failed
-l TYPE Monitor SMART log. Type is one of: error, selftest
-f Monitor for failure of any ‘Usage’ Attributes
-m ADD Send warning email to ADD for -H, -l error, -l selftest, and -f
-M TYPE Modify email warning behavior (see man page)
-s REGE Start self-test when type/date matches regular expression (see man page)
-p Report changes in ‘Prefailure’ Normalized Attributes
-u Report changes in ‘Usage’ Normalized Attributes
-t Equivalent to -p and -u Directives
-r ID Also report Raw values of Attribute ID with -p, -u or -t
-R ID Track changes in Attribute ID Raw value with -p, -u or -t
-i ID Ignore Attribute ID for -f Directive
-I ID Ignore Attribute ID for -p, -u or -t Directive
-C ID Report if Current Pending Sector count non-zero
-U ID Report if Offline Uncorrectable count non-zero
-W D,I,C Monitor Temperature D)ifference, I)nformal limit, C)ritical limit
-v N,ST Modifies labeling of Attribute N (see man page)
-a Default: equivalent to -H -f -t -l error -l selftest -C 197 -U 198
-F TYPE Use firmware bug workaround. Type is one of: none, samsung
-P TYPE Drive-specific presets: use, ignore, show, showall
# Comment: text after a hash sign is ignored
\ Line continuation character
Attribute ID is a decimal integer 1 <= ID <= 255
except for -C and -U, where ID = 0 turns them off.
All but -d, -m and -M Directives are only implemented for ATA devices
If the test string DEVICESCAN is the first uncommented text
then smartd will scan for devices.
DEVICESCAN may be followed by any desired Directives.
I was quite astonished by the tone of your response, it could easily be interpreted as insulting. Perhaps this was inadvertent on your part, deriving from your unfamiliarity with the language. For example, you use the verb form ‘prove’, in a context that requires the noun form ‘proof’.
You should consider to tone down your responses and behave more cooperative. You did not provide any useful information, that’s why hcvv asked that you provide more context and post the complete setting file. You did indeed “pick” some lines out of your configuration file without context.
Answers like yours will repell other ppl with much more experience than you to help you…just saying.
(And insulting/attacking a Global Moderator is never a good starting point as a newbie in a forum…)