windows 我可以通过PS获取Raid磁盘状态吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2501855/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 14:10:43  来源:igfitidea点击:

Can I get Raid disk status by using PS?

.netwindowspowershell

提问by David.Chu.ca

I have a HP server with Raid 5. Port 0 and 1 are used for data & OS mirroring. The software come with the Raid 5 is Intel Matrix Storage Manager and there is manager console as windows based api to view all the ports, including their status.

我有一台带有 Raid 5 的 HP 服务器。端口 0 和 1 用于数据和操作系统镜像。Raid 5 附带的软件是英特尔矩阵存储管理器,并且有管理器控制台作为基于 Windows 的 api 来查看所有端口,包括它们的状态。

Now they are all in Normal status. I am not sure if the OS/Windows has some APIs or .Net classes to access raid ports and get their status? If so, how can I use PS to get the information? Do I have to reference to the dlls provided by the Intel Matrix Storage Manager if not?

现在他们都处于正常状态。我不确定操作系统/Windows 是否有一些 API 或 .Net 类来访问 raid 端口并获取它们的状态?如果是这样,我如何使用PS来获取信息?如果不需要,我是否必须参考 Intel Matrix Storage Manager 提供的 dll?

Basically, I would like to write a PS script to get read status. In case any of port disk is not normal, a message will be sent out by growl protocol.

基本上,我想写一个 PS 脚本来获取读取状态。如果任何一个端口磁盘不正常,都会通过growl协议发出一条消息。

采纳答案by Chad Miller

The HP servers I've used come its own management software in the form of HP System Insight Manager. Insight Manager has both a a web and command-line interface. Details on all H/W health including disks are provided. There is also a backend consolidated SQL database you can stand up. I'm not sure if HP charges extra for this or its part of their server offering. In any case I would recommend looking into SIM.

我使用的 HP 服务器自带 HP System Insight Manager 形式的管理软件。Insight Manager 具有 Web 和命令行界面。提供了包括磁盘在内的所有硬件运行状况的详细信息。还有一个后端统一 SQL 数据库,您可以站起来。我不确定惠普是否为此或他们的服务器产品的一部分收取额外费用。无论如何,我建议您查看 SIM 卡。

回答by Christopher

    $raidvalues = get-wmiobject -class win32_systemdriver | where-object {$_.displayname -like "*mraid*"}
    $rStatus = $raidvalues.Status

We use this to check for status of RAID controllers on a Dell PowerEdge. You may have to find the correct name to replace *mraid*. Hope the idea helps.

我们使用它来检查 Dell PowerEdge 上 RAID 控制器的状态。您可能需要找到正确的名称来替换*mraid*. 希望这个想法有帮助。