Smartctl Question

Home » CentOS » Smartctl Question
CentOS 5 Comments

I had a drive failing on a server. I’ve replaced it. The old drive was
/dev/sdb; the new one’s /dev/sdd. The manpage and googling are failing me
– anyone know how to tell smartd to stop trying to read /dev/sdb (which I’ve pulled, and is sitting here on my desk)? I don’t need the garbage in the logs, and no, I can’t just reboot the server, since it’s a home directory server….

mark

5 thoughts on - Smartctl Question

  • m.roth@5-cent.us wrote:
    Following myself up, I just tried a simple service smartd restart, and I’ll see if that worked. But if anyone’s got other ideas – I do *not* want to have this last after a reboot, though, because I assume sdx will change.

    mark

  • Based on your comments about drive naming (sdX) … you’re using software RAID. I’ve never had problems with smartd keeping a hold on a drive … anyways

    When I remove drives from a server running software RAID, I remove the drive from the SCSI subsystem. That way the new drive gets the same drive name/block device when inserted and detected. The docs you’re looking for are [0] and [1].

    I’ve included an example of mine below. If I’ve misunderstood you, please clarify.

    Here’s an example from my past notes:
    mdadm /dev/md0 -f /dev/sdb3 -r /dev/sdb3
    # do the same hot-fail/hot-remove for partitions 1 and 2 from their array cat /proc/scsi/scsi echo 1 > /sys/block/dev/sdb/device/delete echo “0 1 0” > /sys/class/scsi_host/host0/scan sfdisk -d /dev/sda | sfdisk /dev/sdb mdadm /dev/md0 -a /dev/sdb3
    # do the same hot-add for partitions 1 and 2 to their array watch -n1 cat /proc/mdstat

    [0]
    https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Online_Storage_Reconfiguration_Guide/removing_devices.html
    [1]
    https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Online_Storage_Reconfiguration_Guide/adding_storage-device-or-path.html

  • SilverTip257 wrote:

    Nope. No RAID involved, just /dev/sda, /dev/sdb, etc.

    Restarting the smartd service seems to have cured it – it was complaining every half hour, and hasn’t since the last one before I did the service restart.

    I assume it knew what drives were supposed to be there, and it was all in memory.

    mark

  • Ah, thanks for clarifying. In hindsight there was a pretty good chance I was wrong about you possibly using soft RAID. Anyways…

    BUT removing drives from the SCSI subsystem could still have been helpful to you (since the drives got different block device names).