linux查看磁盘所在槽位

您所在的位置:网站首页 查看分区属于哪个硬盘 linux查看磁盘所在槽位

linux查看磁盘所在槽位

2023-09-24 08:47| 来源: 网络整理| 查看: 265

 

raid卡

raid主要有LSI、Adaptec、Highpoint、Promise四家提供,其中前两家提供的最多。LSI现在属于博通公司。不同厂家使用命令工具不同。

可以通过lspci查看阵列卡信息:# lspci | grep LSI 17:00.0 Serial Attached SCSI controller: LSI Logic / Symbios Logic SAS3008 PCI-Express Fusion-MPT SAS-3 (rev 02) 68:00.0 Serial Attached SCSI controller: LSI Logic / Symbios Logic SAS3008 PCI-Express Fusion-MPT SAS-3 (rev 02)

 

磁盘状态

通过命令查看物理磁盘megacli -PDList -aALL返回的字段中Firmware state有多个状态:

Online 为某个虚拟磁盘的成员盘,可正常使用,处于在线状态。 Unconfigured Good 磁盘状态正常,但不是虚拟磁盘的成员盘或热备盘。 Hot Spare 被设置为热备盘。 Failed 当“Online”状态或“Hot Spare”状态的磁盘出现不可恢复的 错误时,会体现为此状态。 Rebuild 硬盘正在进行数据重建,以保证虚拟磁盘的数据冗余性和完 整性。 Unconfigured Bad “Unconfigured Good”状态磁盘或未初始化的磁盘,出现无 法恢复的错误时,会体现为此状态。 Missing “Online”状态的磁盘被拔出后,体现为此状态。 Offline 为某个虚拟磁盘的成员盘,不可正常使用,处于离线状态。 Shield State 物理磁盘在做诊断操作时的临时状态。 Copyback 新盘正在替换故障成员盘  SAS3IRCU工具

下载安装sas3ircu

不同操作系统下,SAS3IRCU工具的安装方法不同,此处仅以Windows、Linux、VMware为例进行说明,其他操作系统下的安装方法请参考软件包中的“Readme”文件。 登录BROADCOM网站上RAID卡的页面。 在“DOWNLOADS”页签中单击“Management Software and Tools”。打开管理软件和工具列表。 下载最新版本的“SAS3IRCU”工具。 解压后得到适用于不同操作系统的工具包。 安装sas3ircu

Windows系统下安装SAS3IRCU工具。

         a. 将适用Windows的工具包上传到服务器操作系统。

        b. 打开命令行工具。使用命令行工具进入SAS3IRCU工具包所在目录。

         c. Windows下的SAS3IRCU工具不需安装,此时可执行RAID卡命令。    Linux系统下安装SAS3IRCU工具。

        a. 使用文件传输工具(例如Putty)将适用Linux的工具包上传到服务器操作系统。

        b. 在Shell界面中进入SAS3IRCU工具所在目录。

        c. Linux下的SAS3IRCU工具不需安装,此时可执行RAID卡命令。

    VMware系统下安装SAS3IRCU工具。

        a. 使用文件传输工具(例如Putty)将适用VMware的工具包上传到服务器操作系统。

        b. 执行esxcli software vib install -v=vmware-xxx-sas3ircu.vib  命令安装StorCLI工具。

        c. 安装完毕后,即可执行RAID卡命

3. 查看所有控制器

 

#./sas3ircu list Avago Technologies SAS3 IR Configuration Utility. Version 16.00.00.00 (2017.04.26) Copyright (c) 2009-2017 Avago Technologies. All rights reserved. Adapter Vendor Device SubSys SubSys Index Type ID ID Pci Address Ven ID Dev ID ----- ------------ ------ ------ ----------------- ------ ------ 0 SAS3008 1000h 97h 00h:17h:00h:00h 1000h 0097h Adapter Vendor Device SubSys SubSys Index Type ID ID Pci Address Ven ID Dev ID ----- ------------ ------ ------ ----------------- ------ ------ 1 SAS3008 1000h 97h 00h:68h:00h:00h 1000h 0097h SAS3IRCU: Utility Completed Successfully.

 

  4.  根据序列号查询磁盘所在槽位 (磁盘序列号可以根据disk/by-id查看,也可以通过后边smartctl查看)

 

# ll /dev/disk/by-id/ | grep sdm lrwxrwxrwx 1 root root 9 8月 1 14:14 ata-ST8000NM0055-1RM112_ZA1CNVDK -> ../../sdm lrwxrwxrwx 1 root root 9 8月 1 14:14 lvm-pv-uuid-J1WyJ6-4VkN-BPwC-Qcab-eUwZ-RfY1-Cq8x66 -> ../../sdm lrwxrwxrwx 1 root root 9 8月 1 14:14 wwn-0x5000c500b2268d39 -> ../../sdm # ./sas3ircu 0 display | grep ZA1CNVDK -A 3 -B 8 Enclosure # : 2 Slot # : 15 SAS Address : 5001c45-0-023d-bd8f State : Ready (RDY) Size (in MB)/(in sectors) : 7630885/15628053167 Manufacturer : ATA Model Number : ST8000NM0055-1RM Firmware Revision : SN05 Serial No : ZA1CNVDK Unit Serial No(VPD) : ZA1CNVDK GUID : 5000c500b2268d39 Protocol : SATA Drive Type : SATA_HDD

  5. 根据槽位点亮物理磁盘灯

./sas3ircu 0 locate 2:15 on ./sas3ircu 0 locate 2:15 off

 

  6. sas3ircu命令

sas3ircu ... where is: Number between 0 and 255 where is: DISPLAY - display controller, volume and physical device info LIST - Lists all available Avago adapters (does not need ctlr #> CREATE - create an IR volume DELETE - Delete entire RAID configuration on the selected controller DELETEVOLUME - Delete a specific RAID Volume on the selected controller HOTSPARE - make drive a hot spare STATUS - display current volume status info SETOFFLINE - set the physical disk to OFFLINE state SETONLINE - set the physical disk to ONLINE state CONSTCHK - Start Consistency Check operation on the specified IR Volume ACTIVATE - Activate an Inactive IR volume LOCATE - Locate a disk drive on an enclosure LOGIR - Upload or Clear IR Log data BOOTIR - Select an IR Boot Volume as primary boot device BOOTENCL - Select an Enclosure/Bay as primary boot device ALTBOOTIR - Select an IR Boot Volume as alternate boot device ALTBOOTENCL - Select an Enclosure/Bay as alternate boot device HELP - Display help information where are: Command specific values; enter "sas3ircu " to get command specific help

  

smartmontools安装

smartmontools通过使用自我监控(Self-Monitoring)、分析(Analysis)和报告(Reporting)三种技术(缩写为S.M.A.R.T或SMART)来管理和监控存储硬件。如今大部分的ATA/SATA、SCSI/SAS和固态硬盘都搭载内置的SMART系统。SMART的目的是监控硬盘的可靠性、预测磁盘故障和执行各种类型的磁盘自检。smartmontools由smartctl和smartd两部分工具程序组成,它们一起为Linux平台提供对磁盘退化和故障的高级警告

https://linux.cn/article-4461-1.html

 

1. 查看磁盘信息

 

# smartctl -i /dev/sdm smartctl 6.5 2016-05-07 r4318 [x86_64-linux-3.10.0-957.el7.x86_64] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Device Model: ST8000NM0055-1RM112 Serial Number: ZA1CNVDK LU WWN Device Id: 5 000c50 0b2268d39 Firmware Version: SN05 User Capacity: 8,001,563,222,016 bytes [8.00 TB] Sector Sizes: 512 bytes logical, 4096 bytes physical Rotation Rate: 7200 rpm Form Factor: 3.5 inches Device is: Not in smartctl database [for details use: -P showall] ATA Version is: ACS-3 T13/2161-D revision 5 SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s) Local Time is: Thu Aug 1 15:05:07 2019 CST SMART support is: Available - device has SMART capability. SMART support is: Enabled

 

  

 

2. 磁盘检测

 

#后台检测硬盘,消耗时间短 smartctl -t short #后台检测硬盘,消耗时间长 smartctl -t long #前台检测硬盘,消耗时间短 smartctl -C -t short #前台检测硬盘,消耗时间长 smartctl -C -t long

 

 

 

MegaCli工具

 

lspci |grep LSI 02:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 2108 [Liberator] (rev 05

 

 

1. MegaCli安装

wget http://mirror.hep.wisc.edu/stable/extras/6/x86_64/Lib_Utils-1.00-09.noarch.rpm wget http://mirror.hep.wisc.edu/stable/extras/6/x86_64/MegaCli-8.02.21-1.noarch.rpm rpm -ivh Lib_Utils-1.00-09.noarch.rpm rpm -ivh MegaCli-8.02.21-1.noarch.rpm #64位操作系统 ln -sf /opt/MegaRAID/MegaCli/MegaCli64 /usr/sbin/megacli

  

 



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3