渣渣兔 发表于 2025-2-18 12:08:18

服务器系统盘符确定硬盘槽位

1.故障描述

客户一台RH5885 V3 服务器,服务器slot1和slot2设置raid1安装系统,slot3~8设置单盘raid1存储hadoop数据,近期sde硬盘故障必要更换。
https://i-blog.csdnimg.cn/direct/3b22ba1dc95048eb93dd42bc44ee7824.png
https://i-blog.csdnimg.cn/direct/f0bdc2fa0aa048d69ccade1233d90742.png
2.故障分析

如何通过硬盘盘符sde查询硬盘槽位?两种查询方法,一种是Linux系统命令行方式查询,一种是SmartKit网络日志方式查询。
2.1.Linux系统命令行方式查询

1)通过smart信息确认硬盘序列号
在OS下执行smartctl -a /dev/sdd命令,打印信息中“Serial Number”对应的信息即为硬盘序列号。如下所示,“Serial Number”为16F1K00TFJZC。
$ smartctl -a /dev/sdd
smartctl 6.4 2015-06-04 r4109 (local build)
Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:   MG04ACA600E
Serial Number:    16F1K00TFJZC
LU WWN Device Id: 5 000039 6cb70234d
Firmware Version: FSCJ
User Capacity:    6,001,175,126,016 bytes
Sector Sizes:   512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:      Not in smartctl database
ATA Version is:   ATA8-ACS (minor revision not indicated)
SATA Version is:SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Fri Jan4 17:07:21 2019 CST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
2)通过硬盘序列号确认硬盘槽位号
a.安装storcli64工具
LSI官网下载Latest MegaRAID StorCLI下载地址:http://www.lsi.com/downloads/Public/RAID%20Controllers/RAID%20Controllers%20Common%20Files/1.14.12_StorCLI.zip
安装StorCLI:
To install StorCLI, perform the following steps:
1. Unzip the StorCLI package.
2. To install the StorCLI RPM, run the rpm -ivh <StorCLI-x.xx-x.noarch.rpm> command.
storcli64所在路径为/opt/MegaRAID/storcli/storcli6
b.查询所有硬盘信息,并将查询到的信息生存为txt文档
storcli64 /call/eall/sall show all > /home/slot.txt
c.slot.txt文档中,查找步调2.1中所查询到的硬盘序列号
在查找到的硬盘序列号所在的硬盘信息中/c0/e29/s5中s5的5即为硬盘槽位号
https://i-blog.csdnimg.cn/direct/37d95e24d6f4434ca757ec0c90c87b83.png
d.硬盘亮灯
storcli64 /c0/e29/s5 start locate
storcli64 /c0/e29/s5 stop locate
   备注:
storcli64 /c0/e29/s5 start locate命令的/c0/e29/s5的0、29、5分别表现硬盘所在RAID卡的ID号、Enclosure的ID号和硬盘槽位号,此中RAID卡的ID号和Enclosure的ID号可在步调2.2中查找到的硬盘序列号所在的硬盘信息中查询到。
2.2 通过硬盘序列号确认硬盘槽位号(其他)

https://i-blog.csdnimg.cn/direct/45d32ee1c5c44693a447c22c669e7f86.png
https://i-blog.csdnimg.cn/direct/bdbe9f9ab5fd4230a50452ded3865563.png
2.3 SmartKit网络日志方式查询

a.SmartKit日志网络
将SmartKit安装目录Huawei SmartKit\tools\ServerInspect\tools\InfoCollect\tools下的“InfoCollect_Linux.tar.gz”文件,拷贝至服务器Linux操纵系统。
解压InfoCollect_Linux.tar.gz
$ tar -zxvf InfoCollect_Linux.tar.gz
然后执行./infoCollect.sh命令,收集日志。
b.通过smart信息确认硬盘序列号
在网络的/disk/disk_smart.txt日志文件中,查找“smartctl -a /dev/sdd”字段,查看其对应的内容中“Serial Number”对应的信息
c.通过硬盘序列号确认硬盘槽位号
在网络的/raid/sasraidlog.txt日志文件中查找步调1中所查询到的硬盘序列号“16F1K00TFJZC”。硬盘序列号所在的硬盘信息中的“Slot Number”对应的信息即为硬盘槽位号信息。
d.利用storcli64 /c0/e29/s5 start locate命令点亮硬盘定位指示灯或查找对应服务器的用户指南以确定硬盘的物理位置。定位完成后可利用storcli64 /c0/e29/s5 stop locate命令关闭硬盘定位指示灯。

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: 服务器系统盘符确定硬盘槽位