阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

Dell服务器MegaCli命令只返回Exit Code: 0x00问题分析

159次阅读
没有评论

共计 4698 个字符,预计需要花费 12 分钟才能阅读完成。

今天同事给我说一台 Dell 的服务器做了 RAID 后,使用 MegaCli 看不到 RAID 信息,上去看了一下确实不返回任何 RAID 信息,但是确实机器上做了 RAID。

Dell 服务器 MegaCli 命令只返回 Exit Code: 0x00 问题分析

这就奇怪了,然后把 MegaCli 升级到最新版,还是同样的结果

Dell 服务器 MegaCli 命令只返回 Exit Code: 0x00 问题分析

公司用的基本上都是 dell 系列的服务器,之前机器的 raid 信息都是 MegaCli 获取的,这几情况就有点怪异了。因为之前遇到过 raid 卡版本导致的其他问题,所以这次也怀疑是不是 raid 卡版本导致的问题,所以打算看看系统 raid 卡的版本信息

Dell 服务器 MegaCli 命令只返回 Exit Code: 0x00 问题分析

没有找到 raid 信息,不过看了一下 SCSI 控制器的信息,根据 SAS1068E 上网一查,得出 SAS1068E 的 raid 卡是 SAS 6i/R。

Dell 服务器 MegaCli 命令只返回 Exit Code: 0x00 问题分析

为啥 SAS 6i/ R 的 raid 信息用 MegaCli64 命令就获取不到呢,SAS 6/iR 只支持 2 块硬盘做 raid0 或者 raid1。现在返回去看看 MegaCli64 工具,MegaCli64 工具虽然非常好用,功能也很多,不仅能查看 RAID 卡信息,而且还能设置 RAID 卡,但是它却不支持 SAS 6/iR 的 RAID 卡,Dell 好多 1U 型号的服务器默认的 RAID 控制器都是 SAS 6i/R,而对于这款控制器 MegaCli64 是不能使用的。那为什么 MegaCli64 不支持 SAS 6i/ R 呢,因为 megacli 是为 PERC 控制器设计的 (它使用的是大家熟悉的 megaraid 驱动),但是 SAS 6i/ R 控制器针对的是 mpt* 类型的驱动,所以 MegaCli64 取不出 raid 信息。不过想在命令行模式下想管理 SAS 6i/R,可以使用 Lsiutil 这个工具。

下载 lsiutil 工具

链接:http://www.lsi.com/downloads/Public/Obsolete/Obsolete%20Common%20Files/LSIUtil_1.62.zip

解压后看到支持的系统还是蛮多的啊

Dell 服务器 MegaCli 命令只返回 Exit Code: 0x00 问题分析

我是 linux 64 位的系统,在 linux 目录下直接拷贝 lsiutil.x86_64 到目标机器上,修改为可执行权限。下面我们来看看 lsiutil.x86_64 怎么用,lsiutil.x86_64 有两种模式,一种是交互式的,一种是命令行模式:

lsiutil.x86_64 交互式

Dell 服务器 MegaCli 命令只返回 Exit Code: 0x00 问题分析

lsiutil.x86_64 命令行式

Dell 服务器 MegaCli 命令只返回 Exit Code: 0x00 问题分析

可以看到 lsiutil.x86_64 也是可以查看 raid 信息的。帮助文档如下:

http://www.thomas-krenn.com/de/wikiDE/images/4/44/Lsi_userguide_2006_20130528.pdf

如果你是 debian/Ubuntu 系统,则可以下载相应的 deb 包

wget 'http://hwraid.le-vert.net/debian/pool-wheezy/lsiutil_1.60-1_amd64.deb'
dpkg -i lsiutil_1.60-1_amd64.deb

关于次问题的官方解释如下:

http://lists.us.dell.com/pipermail/linux-poweredge/2009-March/038758.html

下面附上 MegaCli64 的返回状态码信息

MegaCLI Error Messages

0x00 Command completed successfully
0x01 Invalid command
0x02 DCMD opcode is invalid
0x03 Input parameters are invalid
0x04 Invalid sequence number
0x05 Abort isn't possible for the requested command
0x06 Application 'host' code not found
0x07 Application already in use - try later
0x08 Application not initialized
0x09 Given array index is invalid
0x0a Unable to add missing drive to array, as row has no empty slots
0x0b Some of the CFG resources conflict with each other or the current config
0x0c Invalid device ID / select-timeout
0x0d Drive is too small for requested operation
0x0e Flash memory allocation failed
0x0f Flash download already in progress
0x10 Flash operation failed
0x11 Flash image was bad
0x12 Downloaded flash image is incomplete
0x13 Flash OPEN was not done
0x14 Flash sequence is not active
0x15 Flush command failed
0x16 Specified application doesn't have host-resident code
0x17 LD operation not possibe - CC is in progress
0x18 LD initialization in progress
0x19 LBA is out of range
0x1a Maximum LDs are already configured
0x1b LD is not OPTIMAL
0x1c LD Rebuild is in progress
0x1d LD is undergoing reconstruction
0x1e LD RAID level is wrong for requested operation
0x1f Too many spares assigned
0x20 Scratch memory not available - try command again later
0x21 Error writing MFC data to SEEPROM
0x22 Required HW is missing (i.e. Alarm or BBU)
0x23 Item not found
0x24 LD drives are not within an enclosure
0x25 PD CLEAR operation is in progress
0x26 Unable to use SATA(SAS) drive to replace SAS(SATA)
0x27 Patrol Read is disabled
0x28 Given row index is invalid
0x2d SCSI command done, but non-GOOD status was received - see mf.hdr.extStatus for SCSI_STATUS
0x2e IO request for MFI_CMD_OP_PD_SCSI failed - see extStatus for DM error
0x2f Matches SCSI RESERVATION_CONFLICT
0x30 One or more of the flush operations failed
0x31 FW real-time currently not set
0x32 Command issues while FW in wrong state (i.e. GET RECON when op not active)
0x33 LD is not OFFLINE - IO not possible
0x34 Peer controller rejected request (possibly due to resource conflict)
0x35 Unable to inform peer of communication changes (retry might be appropriate)
0x36 LD reservation already in progress
0x37 I2C errors were detected
0x38 PCI errors occurred during XOR/DMA operation
0x39 Diagnostics failed - see event log for details
0x3a Unable to process command as boot messages are pending
0x3b Returned in case if foreign configurations are imcomplete
0x3d Returned in case if a command is tried on unsupported hardware
0x3e CC scheduling is disabled
0x3f PD CopyBack operation is in progress
0x40 Selected more than one PD per array
0x41 Microcode update operation failed
0x42 Unable to process command as drive security feature is not enabled
0x43 Controller already has a lock key
0x44 Lock key cannot be backed-up
0x45 Lock key backup cannot be verified
0x46 Lock key from backup failed verification
0x47 Rekey operation not allowed, unless controller already has a lock key
0x48 Lock key is not valid, cannot authenticate
0x49 Lock key from escrow cannot be used
0x4a Lock key backup (pass-phrase) is required
0x4b Secure LD exist
0x4c LD secure operation is not allowed
0x4d Reprovisioning is not allowed
0x4e Drive security type (FDE or non-FDE) is not appropriate for requested operation
0x4f LD encryption type is not supported
0x50 Cannot mix FDE and non-FDE drives in same array
0x51 Cannot mix secure and unsecured LD in same array
0x52 Secret key not allowed
0x53 Physical device errors were detected
0x54 Controller has LD cache pinned
0x55 Requested operation is already in progress
0x56 Another power state set operation is in progress
0x57 Power state of device is not correct
0x58 No PD is available for patrol read
0x59 Controller resert is required
0x5a No EKM boot agent detected
0x5b No space on the snapshot repositiry VD
0x5c For consistency SET PiTs, some PiT creations might fail and some succeed
0xFF Invalid status - used for polling command completion

本文永久更新链接地址 :http://www.linuxidc.com/Linux/2017-04/142970.htm

正文完
星哥说事-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-21发表,共计4698字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中