大网数据广告活动
服务器运维问答

How do I identify the name of disk in first slot of my server?

· 52CE 我爱测

I have 16 disks inserted into Lenovo SR650. The disk names /dev/sda , /dev/sdb ... are not in order with its position in the slots. I want to identify what is the name of the disk in first slot in Ubuntu16.04.4 commandline.

问题原文

原帖链接 · babueverest · CC BY-SA 4.0

I have 16 disks inserted into Lenovo SR650. The disk names /dev/sda , /dev/sdb ... are not in order with its position in the slots. I want to identify what is the name of the disk in first slot in Ubuntu16.04.4 commandline.

社区高分解答

原帖链接 · shodanshok · CC BY-SA 4.0

Disks are enumerated by path under /dev/disk/by-path/ and via WWN under /dev/disk/by-id/. The first tell you about slot number and, by matching it with WWN, enable you to determine how slot enumeration is layed down (ie: from left to right and bottom to up, or vice versa). Most servers even have the slot themselves numbered (but be warned: I saw occasions where the printed number did not match /dev/disk/by-path).

Assuming you have no SN/WWN information on the disks themselves, you can use LED information to identify the disks:

  • if your enclosure is supported, you can use something as ledctl to let the disk/slot blink;

  • if you can't use ledctl or similar, you can generate a read load for each disk by running, in a fast loop, something as smartctl --all /dev/disk/by-path/<disk> while watching your disk/slot led.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-07-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。