1.2系统信息:
[root@localhost storcli]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.4 (Santiago)
1.3 安装storcli
rpm -ivh storcli-1.03.11-1.noarch.rpm
目录: /opt/Mega/storcli
注意版本问题
我这台服务器是DELL R720xd,2012年上线的,所以我用的是storcli.1.03.11版本。
我用的新版本安装之后,执行命令没有输出,所以这一点需要注意。
1.4一些参数定义:
/cx = Controller ID
/vx = Virtual Drive Number.
/ex = Enclosure ID
/sx = Slot ID
1.5为了管理方便,建立软连接
ln -s /opt/MegaRAID/storcli/storcli64 /bin/storcli
ln -s /opt/MegaRAID/storcli/storcli64 /sbin/storcli
如果不想建立软连接,就在/opt/MegaRAID/storcli 目录下 执行./storcli64 指令
2、查看当前设备raid控制器相关信息
[root@localhost storcli]# ./storcli64 show all 可以看到只有一个控制器
Status Code = 0
Status = Success
Description = None
Number of Controllers = 1
Host Name = localhost.localdomain
Operating System = Linux2.6.32-358.el6.x86_64
System Overview :
===============
------------------------------------------------------------
Ctl Model Ports PDs DGs DNOpt VDs VNOpt BBU sPR DS EHS ASOs
------------------------------------------------------------
0 Mini 8 14 3 0 3 0 Opt On 3 N 0 【只看到一个控制器】
------------------------------------------------------------
Ctl=Controller Index|DGs=Drive groups|VDs=Virtual drives|Fld=Failed
PDs=Physical drives|DNOpt=DG NotOptimal|VNOpt=VD NotOptimal|Opt=Optimal
Msng=Missing|Dgd=Degraded|NdAtn=Need Attention|Unkwn=Unknown
sPR=Scheduled Patrol Read|DS=DimmerSwitch|EHS=Emergency Hot Spare
Y=Yes|N=No|ASOs=Advanced Software Options|BBU=Battery backup unit
ASO :
===
----
Ctl
----
0
----
Cl=Cluster|MD=Max Disks|WC=Wide Cache|SS=Safe Store|FP=Fast Path|Re=Recovery
CR=CacheCade(Read)|RF=Reduced Feature Set|CO=Cache Offload
CW=CacheCade(Read/Write)|X=Not Available/Not Installed|U=Unlimited|T=Trial
3、查看控制器c0的相关信息
[root@localhost storcli]# ./storcli64 /c0 show
Controller = 0
Status = Success
Description = None
Product Name = PERC H710P Mini【控制器型号】
Serial Number = 26300UP
SAS Address = 5d4ae520a6bcbc00
Mfg. Date = 06/04/12
System Time = 05/22/2019 16:22:28
Controller Time = 05/22/2019 08:22:28
FW Package Build = 21.0.2-0001
BIOS Version = 5.30.00_4.12.05.00_0x05110000
FW Version = 3.130.05-1587
Driver Name = megaraid_sas
Driver Version = 06.504.01.00-rh1
Controller Bus Type = N/A
PCI Slot = N/A
PCI Bus Number = 2
PCI Device Number = 0
PCI Function Number = 0
Drive Groups = 3
TOPOLOGY :
========
--------------------------------------------------------------------------
DG Arr Row EID:Slot DID Type State BT Size PDC PI SED DS3 FSpace
--------------------------------------------------------------------------
0 - - - - RAID1 Optl N 278.875 GB dflt N N dflt N
0 0 - - - RAID1 Optl N 278.875 GB dflt N N dflt N
0 0 0 32:24 24 DRIVE Onln N 278.875 GB dflt N N dflt -
0 0 1 32:25 25 DRIVE Onln N 278.875 GB dflt N N dflt -
1 - - - - RAID5 Optl N 4.089 TB dflt N N dflt N
1 0 - - - RAID5 Optl N 4.089 TB dflt N N dflt N
1 0 0 32:0 0 DRIVE Onln N 837.75 GB dflt N N dflt -
1 0 1 32:1 1 DRIVE Onln N 837.75 GB dflt N N dflt -
1 0 2 32:2 2 DRIVE Onln N 837.75 GB dflt N N dflt -
1 0 3 32:3 3 DRIVE Onln N 837.75 GB dflt N N dflt -
1 0 4 32:4 4 DRIVE Onln N 837.75 GB dflt N N dflt -
1 0 5 32:5 5 DRIVE Onln N 837.75 GB dflt N N dflt -
2 - - - - RAID5 Optl N 4.089 TB dflt N N dflt N
2 0 - - - RAID5 Optl N 4.089 TB dflt N N dflt N
2 0 0 32:6 6 DRIVE Onln N 837.75 GB dflt N N dflt -
2 0 1 32:7 7 DRIVE Onln N 837.75 GB dflt N N dflt -
2 0 2 32:8 8 DRIVE Onln N 837.75 GB dflt N N dflt -
2 0 3 32:9 9 DRIVE Onln N 837.75 GB dflt N N dflt -
2 0 4 32:10 10 DRIVE Onln N 837.75 GB dflt N N dflt -
2 0 5 32:11 11 DRIVE Onln N 837.75 GB dflt N N dflt - 【可以看到服务器有几个RAID,每个RAID的级别和成员盘】
--------------------------------------------------------------------------
DG=Disk Group Index|Arr=Array Index|Row=Row Index|EID=Enclosure Device ID
DID=Device ID|Type=Drive Type|Onln=Online|Rbld=Rebuild|Dgrd=Degraded
Pdgd=Partially degraded|Offln=Offline|BT=Background Task Active
PDC=PD Cache|PI=Protection Info|SED=Self Encrypting Drive|Frgn=Foreign
DS3=Dimmer Switch 3|dflt=Default|Msng=Missing|FSpace=Free Space Present
Virtual Drives = 3【服务器有三个RAID,两个RAID5一个RAID1】
VD LIST :
=======
---------------------------------------------------------------
DG/VD TYPE State Access Consist Cache Cac sCC Size Name
---------------------------------------------------------------
0/0 RAID1 Optl RW Yes RaWBD R OFF 278.875 GB
1/1 RAID5 Optl RW Yes RaWBD R OFF 4.089 TB
2/2 RAID5 Optl RW Yes RaWBD R OFF 4.089 TB
---------------------------------------------------------------
Cac=CacheCade|Rec=Recovery|OfLn=OffLine|Pdgd=Partially Degraded|dgrd=Degraded
Optl=Optimal|RO=Read Only|RW=Read Write|B=Blocked|Consist=Consistent|
Ra=Read Ahead Adaptive|R=Read Ahead Always|NR=No Read Ahead|WB=WriteBack|
AWB=Always WriteBack|WT=WriteThrough|C=Cached IO|D=Direct IO|sCC=Scheduled
Check Consistency
Physical Drives = 14【十四个物理磁盘】
PD LIST :
=======
-------------------------------------------------------------------------
EID:Slt DID State DG Size Intf Med SED PI SeSz Model Sp
-------------------------------------------------------------------------
32:0 0 Onln 1 837.75 GB SAS HDD N N 512B WD9001BKHG U
32:1 1 Onln 1 837.75 GB SAS HDD N N 512B WD9001BKHG U
32:2 2 Onln 1 837.75 GB SAS HDD N N 512B WD9001BKHG U
32:3 3 Onln 1 837.75 GB SAS HDD N N 512B WD9001BKHG U
32:4 4 Onln 1 837.75 GB SAS HDD N N 512B WD9001BKHG U
32:5 5 Onln 1 837.75 GB SAS HDD N N 512B WD9001BKHG U
32:6 6 Onln 2 837.75 GB SAS HDD N N 512B WD9001BKHG U
32:7 7 Onln 2 837.75 GB SAS HDD N N 512B WD9001BKHG U
32:8 8 Onln 2 837.75 GB SAS HDD N N 512B WD9001BKHG U
32:9 9 Onln 2 837.75 GB SAS HDD N N 512B WD9001BKHG U
32:10 10 Onln 2 837.75 GB SAS HDD N N 512B WD9001BKHG U
32:11 11 Onln 2 837.75 GB SAS HDD N N 512B WD9001BKHG U
32:24 24 Onln 0 278.875 GB SAS HDD N N 512B ST9300603SS U
32:25 25 Onln 0 278.875 GB SAS HDD N N 512B ST9300605SS U
-------------------------------------------------------------------------
EID-Enclosure Device ID|Slt-Slot No.|DID-Device ID|DG-DriveGroup
DHS-Dedicated Hot Spare|UGood-Unconfigured Good|GHS-Global Hotspare
UBad-Unconfigured Bad|Onln-Online|Offln-Offline|Intf-Interface
Med-Media Type|SED-Self Encryptive Drive|PI-Protection Info
SeSz-Sector Size|Sp-Spun|U-Up|D-Down|T-Transition|F-Foreign
BBU_Info :
========
------------------------------------------------------------
Model State RetentionTime Temp Mode MfgDate Next Learn
------------------------------------------------------------
BBU Optimal 0 hour(s) 30C 0 2011/07/18 None
------------------------------------------------------------
4、获取enclosure信息
硬盘大多是附在enclosure上不是直接附在controller上。
显示所有的enclosure信息,但是系统中只有一个enclosure ,EID:32.
[root@localhost storcli]# ./storcli64 /c0/eall show
Controller = 0
Status = Success
Description = None
Properties :
==========
-----------------------------------------------------------------------------
EID State Slots PD PS Fans TSs Alms SIM Port# ProdID VendorSpecific
-----------------------------------------------------------------------------
32 OK 26 14 0 0 0 0 0 Unavailable BP12G+EXP
-----------------------------------------------------------------------------
EID-Enclosure Device ID |PD-Physical drive count |PS-Power Supply count|
TSs-Temperature sensor count |Alms-Alarm count |SIM-SIM Count
获取单个enclosure ,e32详细信息
[root@localhost storcli]# ./storcli64 /c0/e32 show all
Controller = 0
Status = Success
Description = None
Enclosure /c0/e32 :
==================
Information :
===========
Device ID = 32
Position = 1
Connector Name = Unavailable
Enclosure Type = SES
Status = OK
FRU Part Number = N/A
Enclosure Serial Number = N/A
ESM Serial Number = N/A
Enclosure Zoning Mode = N/A
Partner Device ID = 65535
Inquiry Data :
============
Vendor Identification = DP
Product Identification = BP12G+EXP
Product Revision Level = 1.07
Properties :
==========
-----------------------------------------------------------------------------
EID State Slots PD PS Fans TSs Alms SIM Port# ProdID VendorSpecific
-----------------------------------------------------------------------------
32 OK 26 14 0 0 0 0 0 Unavailable BP12G+EXP
-----------------------------------------------------------------------------
EID-Enclosure Device ID |PD-Physical drive count |PS-Power Supply count|
TSs-Temperature sensor count |Alms-Alarm count |SIM-SIM Count
5、显示物理磁盘信息
语法:storcli64 /cx/eall/sall show 显示所有物理磁盘信息
[root@localhost storcli]# ./storcli64 /c0/e32/sall show 【显示e32上的所有物理硬盘】
[root@localhost storcli]# ./storcli64 /c0/eall/sall show【显示所有enclosure下的所有物理硬盘】
Controller = 0
Status = Success
Description = Show Drive Information Succeeded.
Drive Information :
=================
-------------------------------------------------------------------------
EID:Slt DID State DG Size Intf Med SED PI SeSz Model Sp
-------------------------------------------------------------------------
32:0 0 Onln 1 837.75 GB SAS HDD N N 512B WD9001BKHG U
32:1 1 Onln 1 837.75 GB SAS HDD N N 512B WD9001BKHG U
32:2 2 Onln 1 837.75 GB SAS HDD N N 512B WD9001BKHG U
32:3 3 Onln 1 837.75 GB SAS HDD N N 512B WD9001BKHG U
32:4 4 Onln 1 837.75 GB SAS HDD N N 512B WD9001BKHG U
32:5 5 Onln 1 837.75 GB SAS HDD N N 512B WD9001BKHG U
32:6 6 Onln 2 837.75 GB SAS HDD N N 512B WD9001BKHG U
32:7 7 Onln 2 837.75 GB SAS HDD N N 512B WD9001BKHG U
32:8 8 Onln 2 837.75 GB SAS HDD N N 512B WD9001BKHG U
32:9 9 Onln 2 837.75 GB SAS HDD N N 512B WD9001BKHG U
32:10 10 Onln 2 837.75 GB SAS HDD N N 512B WD9001BKHG U
32:11 11 Onln 2 837.75 GB SAS HDD N N 512B WD9001BKHG U
32:24 24 Onln 0 278.875 GB SAS HDD N N 512B ST9300603SS U
32:25 25 Onln 0 278.875 GB SAS HDD N N 512B ST9300605SS U
-------------------------------------------------------------------------
EID-Enclosure Device ID|Slt-Slot No.|DID-Device ID|DG-DriveGroup
DHS-Dedicated Hot Spare|UGood-Unconfigured Good|GHS-Global Hotspare【表示有热备盘,DHS专有热备,GHS全局热备】
UBad-Unconfigured Bad|Onln-Online|Offln-Offline|Intf-Interface
Med-Media Type|SED-Self Encryptive Drive|PI-Protection Info
SeSz-Sector Size|Sp-Spun|U-Up|D-Down|T-Transition|F-Foreign
从上面信息,可以看出:
只有一个控制器,id 为 0
EID,Enclosure Device ID :32
Slot Number,能看到 0,1,2,3,4,5,6,7,8,9,10,11,24,25
DG:disk group,0,1,2
size:容量,磁盘容量
intf:接口,SAS
Med:介质,ssd 或 hdd
6、查看raid组详细信息
查看系统里面有几个raid组:
[root@localhost storcli]# ./storcli64 /c0/vall show 【查看c0控制下的所有RAID信息】
Controller = 0
Status = Success
Description = None
Virtual Drives :
==============
---------------------------------------------------------------
DG/VD TYPE State Access Consist Cache Cac sCC Size Name
---------------------------------------------------------------
0/0 RAID1 Optl RW Yes RaWBD R OFF 278.875 GB
1/1 RAID5 Optl RW Yes RaWBD R OFF 4.089 TB
2/2 RAID5 Optl RW Yes RaWBD R OFF 4.089 TB 【显示系统有三个raid组】
---------------------------------------------------------------
Cac=CacheCade|Rec=Recovery|OfLn=OffLine|Pdgd=Partially Degraded|dgrd=Degraded
Optl=Optimal|RO=Read Only|RW=Read Write|B=Blocked|Consist=Consistent|
Ra=Read Ahead Adaptive|R=Read Ahead Always|NR=No Read Ahead|WB=WriteBack|
AWB=Always WriteBack|WT=WriteThrough|C=Cached IO|D=Direct IO|sCC=Scheduled
Check Consistency
查看V0 (虚拟磁盘0) raid的详细信息
[root@localhost storcli]# ./storcli64 /c0/v0 show all
Controller = 0
Status = Success
Description = None
/c0/v0 :
======
---------------------------------------------------------------
DG/VD TYPE State Access Consist Cache Cac sCC Size Name
---------------------------------------------------------------
0/0 RAID1 Optl RW Yes RaWBD R OFF 278.875 GB 【V0为RAID1】
---------------------------------------------------------------
Cac=CacheCade|Rec=Recovery|OfLn=OffLine|Pdgd=Partially Degraded|dgrd=Degraded
Optl=Optimal|RO=Read Only|RW=Read Write|B=Blocked|Consist=Consistent|
Ra=Read Ahead Adaptive|R=Read Ahead Always|NR=No Read Ahead|WB=WriteBack|
AWB=Always WriteBack|WT=WriteThrough|C=Cached IO|D=Direct IO|sCC=Scheduled
Check Consistency
PDs for VD 0 :
============
-------------------------------------------------------------------------
EID:Slt DID State DG Size Intf Med SED PI SeSz Model Sp
-------------------------------------------------------------------------
32:24 24 Onln 0 278.875 GB SAS HDD N N 512B ST9300603SS U
32:25 25 Onln 0 278.875 GB SAS HDD N N 512B ST9300605SS U 【可以看到24号和25号盘组成了raid1】
-------------------------------------------------------------------------
EID-Enclosure Device ID|Slt-Slot No.|DID-Device ID|DG-DriveGroup
DHS-Dedicated Hot Spare|UGood-Unconfigured Good|GHS-Global Hotspare
UBad-Unconfigured Bad|Onln-Online|Offln-Offline|Intf-Interface
Med-Media Type|SED-Self Encryptive Drive|PI-Protection Info
SeSz-Sector Size|Sp-Spun|U-Up|D-Down|T-Transition|F-Foreign
VD0 Properties :
==============
Strip Size = 64 KB
Span Depth = 1
Number of Drives Per Span = 2
Disk Cache Policy = Disk's Default
Encryption = None
Data Protection = None
Active Operations = None
Exposed to OS = Yes
Creation Date = 05-09-2012
Creation Time = 01:38:23 PM
Emulation type = None
7、磁盘状态设置
storcli64 /cx/ex/sx set good/offline/online/missing 设置某块磁盘的状态
good 空闲
online/offline 成员盘上下线
missing 设置磁盘为missing状态
磁盘热备
storcli64 /cx/ex/sx add hotsparedrive dgs=x 设置模块磁盘为diskgroup x 的热备盘
storcli64 /cx/ex/sx add hotsparedrive 设置全局热备
storcli64 /cx/ex/sx delete hotsparedrive
磁盘rebuild
storcli64 /cx/ex/sx show rebuild 查看rebild
storcli64 /cx/ex/sx start rebuild
storcli64 /cx/ex/sx stop rebuild
磁盘点灯
storcli64 /cx/ex/sx start locate
storcli64 /cx/ex/sx stop locate
磁盘擦除
快速擦除:
storcli64 /cx/ex/sx set good
storcli64 /cx/fall del|delete [securityKey = xxx]
完全擦除:
storcli /cx[/ex]/sx secureerase [force]
storcli /cx[/ex]/sx start erase [simple| normal| thorough | standard| threepass | crypto]
storcli /cx[/ex]/sx stop erase
storcli /cx[/ex]/sx show erase
8、获取rebuild速率
[root@localhost storcli]# ./storcli64 /c0 show rebuildrate
Controller = 0
Status = Success
Description = None
Controller Properties :
=====================
------------------
Ctrl_Prop Value
------------------
Rebuildrate 30%
------------------
storcli64 /c0 set rebuildrate=60 设置rebuild速率
9、清除缓存
清除raid卡,物理磁盘cache
storcli64 /c0 flushcache
- Linux中使用MegaCli工具查看、管理Raid卡信息
MegaCli是一款管理维护硬件RAID软件,可以通过它来了解当前raid卡的所有信息,包括 raid卡的型号,raid的阵列类型,raid 上各磁盘状态,等等.通常,我们对硬盘当前的状态不太好确定, ...
- Linux查看所有用户和组信息
主要通过以下两个命令: cat /etc/passwd cat /etc/group 步骤一:cat /etc/passwd查看所有的用户信息,详情如下图: 步骤2:cat /etc/passwd|g ...
- 【linux命令】:查看当前登录用户的信息,本文介绍3种方法
作为系统管理员,你可能经常会(在某个时候)需要查看系统中有哪些用户正在活动.有些时候,你甚至需要知道他(她)们正在做什么.本文为我们总结了4种查看系统用户信息(通过编号(ID))的方法. 1. 使用w ...
- Linux学习之CentOS(二十八)--RAID原理基础及Linux下软件RAID配置
一.RAID的原理基础 在 讲解RAID的原理基础之前,我们首先来了解一下传统磁盘的劣势.我们知道一台PC机种都会包含CPU.内存.主板.硬盘.网卡等硬件,影响计算机性能的 组建包括:CPU.主板总线 ...
- 使用MegaCli工具查看Raid磁盘阵列状态
转载自:http://home.51.com/chenjianghui1987/diary/item/10051836.html 文章本身我不做过多修改了,在这里我就把自己在安装时候碰到的难点跟大家提 ...
- linux查看Raid磁盘阵列信息
软件raid:只能通过Linux系统本身来查看 cat /proc/mdstat 可以看到raid级别,状态等信息. 硬件raid: 最佳的办法是通过已安装的raid厂商的管理工具来查看,有cmdli ...
- Linux下查看Raid磁盘阵列信息的方法
Linux下查看软.硬raid信息的方法. 软件raid:只能通过Linux系统本身来查看 cat /proc/mdstat 可以看到raid级别,状态等信息. 硬件raid: 最佳的办法是通过已安装 ...
- 【Linux命令与工具】系统资源查看——free、uname、dmesg以及netstat
free:查看内存的使用情况 用法: free [-b|-k|-m|-g] [-t] 参数: -b: 直接输入free时,显示的单位是KB我们可以使用b(bytes), m(MB), k(KB), g ...
- LSI Storcli 工具使用
查看RAID卡ID 命令功能 查看LSI SAS3108RAID卡的ID. 命令格式 storcli64 show 使用实例 # 查看LSI SAS3108RAID卡的ID. [root@localh ...
随机推荐
- vs把asp.net旧的项目名称全部修改
1 先打开项目,把名称全部替换掉,然后把解决方案,程序集名称全部替换掉. 2 重新生成,清理,关闭项目. 3 把.sln文件用文本编辑器打开,替换里面的名称,然后把文件夹名称都修改好.d 4.打开项目 ...
- SaCa CDC产品简介
1.1 产品简介 东软SaCa™ CDC实时增量数据捕获平台(以下简称SaCa™ CDC)是一款高度可扩展.可靠和易于配置的异构实时事务复制软件,能够提供异构环境下数据的实时捕捉和交付数据,以独立 ...
- ASP.NET Core 入门笔记7,ASP.NET Core MVC 视图布局入门
一.前言 1.本教程主要内容 ASP.NET Core MVC (Razor)视图母版页教程 ASP.NET Core MVC (Razor)带有Section的视图母版页教程 ASP.NET Cor ...
- Linux详细介绍以及常用命令
Linux系统说明 Linux( 诞生于1991.10.5) 继承了Unix以网络为核心的设计思想, 是一个性能稳定的多用户网络操作系统. Linux这个词严格意义上只表示Linux内核, 但日常中, ...
- 【VS开发】使用VS2010创建MFC ActiveX工程项目
1.ActiveX的基本概念 ActiveX控件可以看作是一个极小的服务器应用程序,它不能独立运行,必须嵌入到某个容器程序中,与该容器一起运行.这个容器包括WEB网页,应用程序窗体等... Activ ...
- 使用TensorFlow训练SSD(二):数据的准备
在进行模型的训练之前,需要准备好相关的数据,相关的数据还需要进行标注.这篇博客将使用labelImg标注工具来进行数据的处理. 首先可从https://github.com/tzutalin/labe ...
- Excel小技巧(生成数字篇)
1. 自动生成1-1000: =ROW() 2.随机生成 1-100 : =RANDBETWEEN(1,100) // 若要包含小数点n位,就把(MIN,MAX)改成 (MIN*10^n,MAX*10 ...
- 浅析C语言中printf(),sprintf(),scanf(),sscanf()的用法和区别
printf语法: #include <stdio.h>int printf( const char *format, ... ); printf()函数根据format(格式)给出的格式 ...
- gitlab不能启动了
gitlab意外停止后不能启动,执行gitlab-ctl start 提示全部启动失败. GitLab won’t start – runsv not running. Gitlab didn’t s ...
- 【LOJ】#3109. 「TJOI2019」甲苯先生的线段树
LOJ#3109. 「TJOI2019」甲苯先生的线段树 发现如果枚举路径两边的长度的话,如果根节点的值是$x$,左边走了$l$,右边走了$r$ 肯定答案会是$(2^{l + 1} + 2^{r + ...