0

I need to blink a drive that I found out had SMART errors using smartmontools. I have omconfig installed and it looks like it can be used for blinking LEDs, but I don't know how to find the controller and pdisk number it needs

As an alternative, I tried looking for /locate files in /sys but they corresponded to controller slots, not the drive letters.

I am using CentOS 7 on a Dell PowerEdge R730.

howderek
  • 143
  • 6

1 Answers1

1

First, try using ledctl from the ledmon package. It is quite simple to use:

Locate a drive:

ledctl locate=/dev/sda

Stop locating a drive:

ledctl locate_off=/dev/sda

If this doesn't work, on Dell systems the omreport tool can be useful for finding drives. I wrote the following script for taking a serial number of a drive (like you can get with smartctl) and returning the controller and pdisk id:

#!/bin/bash
serialnumber=$1
controllers=$(omreport storage controller | grep '^ID' | awk '{print $3}')
for controller in $controllers; do
    id=$(omreport storage pdisk controller=$controller | grep --before 25 $serialnumber | grep '^ID' | awk '{print $3}')
    if [ ! -z "$id" ]; then echo "controller=$controller pdisk=$id"; fi
done;

It can be used like so:

[root@computer ~]# ./get_pdisk_from_serial.sh BTHC711202VV1P6PGN
controller=0 pdisk=0:0:4
howderek
  • 143
  • 6