目前维护的dDell服务器,大多使用的都是LSI的MegaRAID卡。 查看系统使用的什么RAID卡,可以使用以下命令: # dmesg |grep -i raid # cat /proc/scsi/scsi # lspci
MegaRAID卡,可以通过官方提供的工具MegaCli来进行检查和控制。 下面是自动检查服务器RAID信息的SHELL脚本:
脚本运行结果: ===================== Host Information ===================== HostName : vps.cszhi.com HostIp : 199.15.166.* ===================== Raid Information ===================== Raid Level :Raid 5 Charger Status: Complete Charger Status: Complete Total Diak Number:9 Online Disk Number:0 Failed Disk Number:0 MegaCli常用参数组合介绍: MegaCli -cfgdsply -aALL | grep "Error" 【正常都是0】 MegaCli -LDGetProp -Cache -LALL -a0 【写策略】 MegaCli -cfgdsply -aALL | grep "Memory" 【内存大小】 MegaCli -LDInfo -Lall -aALL 【查RAID级别】 MegaCli -AdpAllInfo -aALL 【查RAID卡信息】 MegaCli -PDList -aALL 【查看硬盘信息】 MegaCli -AdpBbuCmd -aAll 【查看电池信息】 MegaCli -FwTermLog -Dsply -aALL 【查看RAID卡日志】 MegaCli -adpCount 【显示适配器个数】 MegaCli -AdpGetTime –aALL 【显示适配器时间】 MegaCli -AdpAllInfo -aAll 【显示所有适配器信息】 MegaCli -LDInfo -LALL -aAll 【显示所有逻辑磁盘组信息】 MegaCli -PDList -aAll 【显示所有的物理信息】 MegaCli -AdpBbuCmd -GetBbuStatus -aALL |grep "Charger Status" 【查看充电状态】 MegaCli -AdpBbuCmd -GetBbuStatus -aALL 【显示BBU状态信息】 MegaCli -AdpBbuCmd -GetBbuCapacityInfo -aALL 【显示BBU容量信息】 MegaCli -AdpBbuCmd -GetBbuDesignInfo -aALL 【显示BBU设计参数】 MegaCli -AdpBbuCmd -GetBbuProperties -aALL 【显示当前BBU属性】 MegaCli -cfgdsply -aALL 【显示RAID卡型号,RAID设置,DISK相关信息】 磁带状态的变化,从拔盘,到插盘的过程中: Device |Normal|Damage|Rebuild|Normal Virtual Drive |Optimal|Degraded|Degraded|Optimal Physical Drive |Online|Failed –> Unconfigured|Rebuild|Online 磁盘各个状态说明: A physical disk drive property indicating the status of the drive. A physical disk drive can be in one of the following states: >Unconfigured Good A disk accessible to the RAID controller but not configured as a part of a virtual disk or as a hotspare. >Online A physical disk can be accessed by the RAID controller and is part of the virtual disk. >rebuild A physical disk to which data is being written to restore full redundancy for a virtual disk. >failed A physical disk that was originally configured as Online but on which the firmware detects an unrecoverable error. >Unconfigured bad A physical disk on which the firmware detects an unrecoverable error; the physical disk was Unconfigured Good or the physical disk could not be initialized. Disks with a status of "Unconfigured bad" cannot be used for RAID configurations. >Missing A physical disk that was Online, but which has been removed from its location. >offline The drive is offline or absent. No actions can be performed on the drive until it is back online. >Global hotspare The drive will be used to repair any array in the system that had a drive failure, if the failed drive is equal to, or smaller than the hot spare drive. >Ready The drive is online and operating correctly. >Foreign The drive is part of an array created on a different controller, or created within one enclosure and moved to another on the same controller. It can be used to create a new array after clearing configuration. >None A physical disk with the unsupported flag set. An Unconfigured Good or Offline physical disk that has completed the prepare for removal operation. >copyback A bad physical disk replaced by a good one, then hotspare will copyback data to the good one and change back to hotspare
命令使用:
3.磁带状态的变化,从拔盘,到插盘的过程中。
4.查看磁盘缓存策略
5.设置磁盘缓存策略 WT (Write through WB (Write back) NORA (No read ahead) RA (Read ahead) ADRA (Adaptive read ahead) Cached Direct
例子:
6.创建一个 raid5 阵列,由物理盘 2,3,4 构成,该阵列的热备盘是物理盘 5
7.创建阵列,不指定热备
8.删除阵列
9.在线添加磁盘
10.阵列创建完后,会有一个初始化同步块的过程,可以看看其进度。
11.查看阵列后台初始化进度
12.指定第 5 块盘作为全局热备
13.指定为某个阵列的专用热备
14.删除全局热备
15.将某块物理盘下线/上线
16.查看物理磁盘重建进度
磁带状态的变化,从拔盘,到插盘的过程中: |
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....