[CentOS] smartctl question

Thu Jul 24 16:26:52 UTC 2014
SilverTip257 <silvertip257 at gmail.com>

On Thu, Jul 24, 2014 at 10:52 AM, <m.roth at 5-cent.us> wrote:

> m.roth at 5-cent.us wrote:
> > 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....
> >
> 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.
>

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


-- 
---~~.~~---
Mike
//  SilverTip257  //