Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

1 Answer 1

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

/etc/smartd.conf

# 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 at 5:47
    
smartd is open source, im sure if you implemented such a solution then you could push it upstream –  Ace Sep 5 at 17:09
    
Yes, I know this, but I am still to find the solution that does what I want. –  Sparhawk Sep 6 at 0:24

Your Answer

 
discard

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.