Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have smartd monitoring my hard drives. It works fine generally, but the following error window has been consistently popping up every 24 hours.

This email was generated by the smartd daemon running on:
  host name: sparhawk-XPS-17
  DNS domain: [Unknown]
  NIS domain: (none)
The following warning/error was logged by the smartd daemon:
Device: /dev/sdc [SAT], unable to open device
For details see host's SYSLOG.
You can also use the smartctl utility for further investigation.
Another email message will be sent in 24 hours if the problem persists.

There is no sdc connected, but nevertheless I try sudo smartctl -a /dev/sdc. The result is

smartctl 5.43 2012-06-30 r3573 [x86_64-linux-3.5.0-26-generic] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
Smartctl open device: /dev/sdc failed: No such device

The only non–commented-out line in /etc/smartd.conf is

DEVICESCAN -m root -M exec /usr/share/smartmontools/smartd-runner

Is there a way to make smartd correctly identify the removal of this disk, and not complain about it? If this is not possible, then is there a way to make smartd only monitor sda and sdb?

share|improve this question

I've been experiencing the same issue, so I did some research. I found this:


# smartd will re-read the configuration file if it receives a HUP
# signal

# The file gives a list of devices to monitor using smartd, with one
# device per line. Text after a hash (#) is ignored, and you may use
# spaces and tabs for white space. You may use '\' to continue lines.

# You can usually identify which hard disks are on your system by
# looking in /proc/ide and in /proc/scsi.

# The word DEVICESCAN will cause any remaining lines in this
# configuration file to be ignored: it tells smartd to scan for all
# ATA and SCSI devices.  DEVICESCAN may be followed by any of the
# Directives listed below, which will be applied to all devices that
# are found.  Most users should comment out DEVICESCAN and explicitly
# list the devices that they wish to monitor.

I assume that unregistering the drive from the kernel via

root@localhost# echo 1 > /sys/block/sdX/device/delete

then removing the device entry from /etc/smartd.conf,

then doing "sudo service smartmontools restart" will fix your issue and smartd will stop reporting the missing drive.

share|improve this answer
+1, but I'd prefer a generic solution to only ignore removal of disks in general. Preferably, it'd work automatically for all disks, and also still scan disks for other problems. – Sparhawk Mar 3 '14 at 5:47
smartd is open source, im sure if you implemented such a solution then you could push it upstream – Ace Sep 5 '14 at 17:09
Yes, I know this, but I am still to find the solution that does what I want. – Sparhawk Sep 6 '14 at 0:24

You can cause smartd to only monitor a specific set of devices by listing those devices explicitly in /etc/smartd.conf, instead of using the DEVICESCAN keyword.

So, in order to only monitor /dev/sda and /dev/sdb, you would remove from your smartd.conf:

DEVICESCAN -m root -M exec /usr/share/smartmontools/smartd-runner

And instead of it, add:

/dev/sda -m root -M exec /usr/share/smartmontools/smartd-runner
/dev/sdb -m root -M exec /usr/share/smartmontools/smartd-runner

Then restart the smartd daemon.

The major downside of this approach is that you need to list each disk individually in the configuration. At least with only two disks, that's not too much of a hassle.

share|improve this answer
This works well for preventing scanning of /dev/sdc. However, do you know if smartd will normally scan newly-connected USB drives? Ideally, it would still scan /dev/sdc, but not report when it's disconnected. – Sparhawk Jul 6 '15 at 23:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.