review what i studied `date` - 2017-4-11

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了review what i studied `date` - 2017-4-11相关的知识,希望对你有一定的参考价值。

[[email protected] py]# echo pd63 | cut -c 3-
63

从第三个字符开始截取



在shell函数有自己的parameter,函数其实就是命令




磁带状态的变化,从拔盘,到插盘的过程中。

Device |Normal|Damage|Rebuild|Normal

Virtual Drive |Optimal|Degraded|Degraded|Optimal

Physical Drive |Online|Failed –> Unconfigured|Rebuild|Online



Megcli 是控制Raid的 可以完成上线磁盘,重做磁盘等动作

Megcli 也可以查看磁盘信息:

Megcli查看所有硬盘中的信息:

-a 指定 adapter

Enclosure Device ID 是硬件的ID号

Slot Number: 是硬盘所处槽位的ID号


常用命令:

PD:Physical disks

VD:Virtual disk

/opt/MegaRAID/MegaCli/MegaCli64 -PDList -a0 -NoLog | grep -c "Enclosure Device ID"
#查看适配器#0的物理磁盘数量

/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aAll -NoLog
#查看PD信息来自于所有适配器#ALL

/opt/MegaRAID/MegaCli/MegaCli64 -PDList -a0 -NoLog
#查看PD信息来自于适配器#0

/opt/MegaRAID/MegaCli/MegaCli64 -PDList -a0,1 -NoLog
#查看PD信息来自于适配器#0 #1

/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aAll -NoLog | grep -Ei "(enclosure|slot)"
#查看各个PD的enclosure device id 和 slot number(后边在指定PD时会用到)

/opt/MegaRAID/MegaCli/MegaCli64 -pdInfo -PhysDrv[62:0] -a0
#查看适配器0指定的PD的信息(PD enclosure device id为62 slot number 为 0)

/opt/MegaRAID/MegaCli/MegaCli64 -pdInfo -PhysDrv[62:0] -a0 | grep -i Temp | awk -F ":" ‘{print  $2}‘ | awk -F "C" ‘{print $1}‘
#将单个指定的PD的温度过滤出来的例子

/opt/MegaRAID/MegaCli/MegaCli64 -PdLocate -start -physdrv[252:2] -a0
#点亮指定硬盘(定位)

/opt/MegaRAID/MegaCli/MegaCli64 -pdgetmissing -a0
#查看RAID阵列中掉线的盘

/opt/MegaRAID/MegaCli/MegaCli64 -pdrbld -start -physdrv[12:10] -a0
#手动开启rebuid

/opt/MegaRAID/MegaCli/MegaCli64 -PDOffline -PhysDrv[62:0] -a0
#下线硬盘



以上是关于review what i studied `date` - 2017-4-11的主要内容,如果未能解决你的问题,请参考以下文章

review what i studied `date` - 2017-4-22

review what i studied `date` - 2017-4-9

review what i studied `date` - 2017-4-11

review what i studied `date` - 2017-4-24

review what i studied `date` - 2017-4-26

review what i studied `date` - 2017-3-30