Ubuntu + LSI: Check Drive Health with smartctl, Locate Drives with storcli64, and Perform Safe Hot Swap

Practical workflow for Ubuntu storage maintenance with LSI controllers: health checks, drive mapping, and safe hot swap replacement.

Check Drive Health with smartctl

Install smartctl

1
2
sudo apt update
sudo apt install smartmontools

Check mount points and device mapping

1
df

Read SMART info for a drive

1
sudo smartctl -a /dev/sda

Use storcli64 to Map Slots and Physical Drives

For LSI/Broadcom RAID/HBA cards, storcli64 helps map:

  • virtual drive / OS block device
  • enclosure ID and slot ID
  • physical drive serial/model/status

Common commands:

1
2
3
4
storcli64 show
storcli64 /c0 show
storcli64 /c0 /eall /sall show
storcli64 /c0 /vall show all

Safe Hot-Swap Replacement Workflow

  1. Identify the failed drive by slot ID.
  2. Confirm array status and affected virtual disk.
  3. If needed, mark the target disk offline first.
  4. Physically replace the disk (hot swap supported chassis/backplane).
  5. Confirm new disk is detected.
  6. Start or monitor rebuild.

Example commands:

1
2
3
4
5
6
7
8
# Show all physical disks
storcli64 /c0 /eall /sall show

# Show rebuild status
storcli64 /c0 /vall show rebuild

# Show detailed drive status
storcli64 /c0 /e<enclosure> /s<slot> show all

Notes

  • Always verify the slot before pulling any disk.
  • Avoid replacing the wrong drive in degraded arrays.
  • Keep backup and maintenance window procedures in place.
记录并分享
Built with Hugo
Theme Stack designed by Jimmy