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