When managing a SuperMicro 2U server with direct-attached storage (no hardware RAID), physically identifying disks in their drive bays becomes crucial for maintenance. The standard approach using RAID controller utilities isn't available in this scenario.
FreeBSD provides several methods to correlate physical disks with their bay locations:
# List all disks and their serial numbers
camcontrol devlist
For SAS/SATA drives, the sesutil
command is particularly useful:
# Install sesutil if not available
pkg install smartmontools
# Identify disks with enclosure information
sesutil -a /dev/ses0
The most effective way is using the sg_ses
tool (available in both FreeBSD and Linux):
# First install sg3_utils
pkg install sg3_utils
# Turn on LED for specific disk (replace X with enclosure slot)
sg_ses --set=ident /dev/ses0 -i X
# Turn off LED
sg_ses --clear=ident /dev/ses0 -i X
For ZFS users, you can create a mapping between zpools and physical locations:
#!/bin/sh
for disk in $(zpool status | grep -o 'da[0-9]\+'); do
serial=$(smartctl -i /dev/$disk | grep -i serial)
echo "ZFS device $disk has serial $serial"
sesindex=$(sesutil -p /dev/ses0 | grep $disk | awk '{print $1}')
echo "Located in enclosure slot $sesindex"
done
For reference in Linux environments, you can use:
# List all drives with enclosure info
lsscsi -g
# Locate a specific disk
lsblk -o NAME,SERIAL,MOUNTPOINT
# Control LED (requires root)
echo "1" > /sys/class/enclosure/X:X:X:X/Slot Y/locate
Here's a complete workflow to identify a failing disk in your zpool:
- Check zpool status:
zpool status -v
- Find physical device:
glabel status | grep daX
- Get serial:
smartctl -i /dev/daX | grep Serial
- Map to enclosure:
sesutil -p /dev/ses0 | grep daX
- Activate LED:
sg_ses --set=ident /dev/ses0 -i Y
When managing a SuperMicro 2U server with direct-attached storage (no RAID controller), identifying physical disks in their drive bays becomes crucial for maintenance. FreeBSD's ZFS provides excellent software RAID capabilities, but lacks native physical disk location mapping.
The sas2ircu
utility (from Broadcom/LSI) can control drive LEDs on many SuperMicro servers:
# pkg install sas2ircu
# sas2ircu list
# sas2ircu 0 locate 5:1 ON # Turns on LED for enclosure 5, slot 1
For SATA/SAS drives, the sg3_utils
package provides LED control:
# pkg install sg3_utils
# sg_ses --index=0 --set=ident /dev/da1 # Blinks LED for da1
First identify your disk topology:
# camcontrol devlist
# diskinfo -v /dev/da0 | grep serial
# smartctl -i /dev/da0 | grep -i serial
Then create a mapping script:
#!/bin/sh
# Map disk serials to slot numbers
SERIAL_MAP="
0123456789=slot1
9876543210=slot2
"
for disk in $(sysctl -n kern.disks); do
serial=$(smartctl -i /dev/$disk | awk '/Serial Number:/ {print $3}')
slot=$(echo "$SERIAL_MAP" | grep "$serial" | cut -d= -f2)
echo "$disk -> $slot"
sg_ses --index=0 --set=ident /dev/$disk
done
For long-term management, consider creating udev rules or adding disk identifiers to your ZFS pool:
# zpool status -v
# zpool set comment="Located in Slot 3" tank/disk3
SuperMicro backplanes vary by model. For the most accurate results, consult your server's technical documentation regarding:
- SAS expander chip compatibility
- Backplane firmware version
- Drive carrier LED control protocols