?
Solved

Identify drive info in a RAID from command line on remote server.

Posted on 2010-01-01
28
Medium Priority
?
6,397 Views
Last Modified: 2012-05-08
What I am looking for is a way to query a server to see what size hard drives are used in their RAID array.  This way I can make sure and take the correct parts with me to the users site.  While I can log in and see this information, I was looking for a faster way to do this.

NOTE: I can not install any third party apps on the clients computers, these are not my servers and I don't want to have to drive all over town fixing them if there is a conflict or other issue.  I am looking for a command line or vbscript solution.

Thanks!
0
Comment
Question by:ednetman
  • 10
  • 9
  • 5
  • +3
28 Comments
 
LVL 47

Expert Comment

by:David
ID: 26158751
There is no universal utility that will do this, as there is no industry standard API or mechanism that allows for pass-through programming to disk drives behind RAID controllers, or for that matter, querying a RAID engine.   Products such as smartmon-ux can drill down into numerous RAID controllers, but by no means is it complete.

Remember, it is the job of the RAID controller to present a logical device to the BIOS and the O/S (if not a PC architecture) rather than physical drives.
0
 
LVL 76

Expert Comment

by:Alan Hardisty
ID: 26159699
What makes are the servers?
HP provide their servers with Array Configuration Utilities that can show you the drive sizes, spin speeds etc (see image).

HP-RAID-Info.jpg
0
 
LVL 26

Expert Comment

by:MidnightOne
ID: 26160017
You might try the program WinAudit (http://www.pxserver.com/WinAudit.htm). It doesn't require installation to run on a server.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 4

Expert Comment

by:matiasl
ID: 26161000
Check with the Raid-controller manufacturers documentation to see what software you can use.
0
 
LVL 7

Author Comment

by:ednetman
ID: 26166342
The servers are all different brands.  Dell, HP, a few old Compaq ProLiant, SuperMicro,and IBM.  I want to be able to check this info out remotely from a command line or vbscript, so WinAudit won't work.  That has to be run on the local machine. :-(  Any other ideas?
0
 
LVL 76

Expert Comment

by:Alan Hardisty
ID: 26166360
I don't think there is anything available that can do this for you I am afraid.

Sorry.
0
 
LVL 47

Expert Comment

by:David
ID: 26166565
Again, no such product exists, nor can it ever exist if you think about it.  A universal utility that has vendor unique capabilities for ALL RAID controllers?   Does  any similar product exist for any other type of technology?  Not even universal remote controls support every make/model of television.  RAID controllers use vendor/product unique APIs, so any vendor that even wants to go down that path must be willing to write a product that supports everything, and more important, the manufacturers must be willing to sign over non-disclosure agreements with such a software vendor.  

Not going to happen.  Certain vendors refuse to release APIs to any third party, I know this for a fact, so just fuggetaboutit.

The best you can do is find a small number of utilities that works for what you have.
0
 
LVL 26

Expert Comment

by:MidnightOne
ID: 26200967
You say you're looking for a vbscript or other remote tool to dig out the RAID information, but what kind of remote access do you have to the client's systems that will allow you to 'not drive all over town'?
0
 
LVL 7

Author Comment

by:ednetman
ID: 26201147
I have access to the machine via a remote command prompt.  That's why I am looking for a script I can run (using cscript) or a dos  command.

I use these commands a lot:
hostname
ipconfig

Get S/N#:
wmic bios get serialnumber

Get Model:
wmic csproduct get name

And was looking for something like this so I could have the correct parts with me.  Most of these guys will not let me use anything more than pstools on their servers, and I can see their point.  I am a contractor and since I don't work for their company, they give me limited access.

Thanks!

Ed
0
 
LVL 26

Expert Comment

by:MidnightOne
ID: 26202642
I suppose you could use WinAudit with psexec...

psexec \\server -c -w c:\ "WinAudit.exe /r=gsoPxuTUeERNtnzDaIbMpmidcSArBLF /o=html /f=./%computername%.html"
0
 
LVL 47

Expert Comment

by:David
ID: 26202655
above only gets info for logical devices, not physical disk drives behind a raid controller.
0
 
LVL 26

Expert Comment

by:MidnightOne
ID: 26202766
Okay, I've been playing with WMI scripting and I know the attached pulls the RAID controller (and all other SCSI devices); let me dig some and see if I can come up with one that pulls physical drives as well.

strComputer = "." 
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") 
Set colItems = objWMIService.ExecQuery( _
    "SELECT * FROM Win32_SCSIController",,48) 
For Each objItem in colItems 
    Wscript.Echo "-----------------------------------"
    Wscript.Echo "Win32_SCSIController instance"
    Wscript.Echo "-----------------------------------"
    Wscript.Echo "Caption: " & objItem.Caption
Next

Open in new window

0
 
LVL 47

Expert Comment

by:David
ID: 26202810
Respectfully, MidnightOne, you have to understand that unless the RAID vendor provides a wmi plug-in (which is profoundly rare), then you are wasting your time.  A RAID controller, by design, does NOT let the O/S access individual disk drives.  Heck, the O/S doesn't even know RAID level, or how many disks are in the raid set.

Neither the STORPORT nor MINIPORT drivers require a vendor to do this, nor do they even define a spec for doing so.  The issue isn't limited to windows either. There is simply no standard for doing this.  All you can get is the logical configuration that the RAID engine presents to the BIOS, or the O/S, depending on the RAID controller and implementation.
0
 
LVL 7

Author Comment

by:ednetman
ID: 26203986
dlethe, just because you do not have the answer, it does not mean that one does not exist.  If HP Managment can see the drives when you log in locally (see above screen shot), there has to be a way to see them through Windows.

Thank you MidnightOne for your help.  I am sure someone will be able to find the key to unlock this puzzle.

Ed
0
 
LVL 47

Expert Comment

by:David
ID: 26204107
I do have the answer. The answer is one does not exist.  But, let me make sure we are asking the same question. You specifically write "a server".  I took that as meaning any server.  IF you are asking about a specific server with a specific family of RAID controller, then the answer is that there are products that do that.

If you write any server, then the answer is no. there is no such product that works with everything.
0
 
LVL 7

Author Comment

by:ednetman
ID: 26204867
That you know of...
0
 
LVL 47

Expert Comment

by:David
ID: 26205299
I'll just then be silent and wait for the inevitable 500 points :)

Seems to me that since your question added a further constraint that it must not be a 3rd party app, then wouldn't it be sufficient to satisfy you that it doesn't exist by simply scanning through the online Microsoft WMI scripting libraries, and their DDK and looking for a system call, function, or DLL library that provides such info?
0
 
LVL 7

Author Comment

by:ednetman
ID: 26205636
I can't install a program, however using psexec to copy the files to a TEMP folder, then executing them is allowed as there are no registry changes.  I would just have to delete the files afterwards.  So far MidnightOne is the closest to a solution.  Let's see if anyone else has anything to add.
0
 
LVL 47

Expert Comment

by:David
ID: 26205751
midnight's solution only gives you the logical drives, it does not tell you anything about the physical disk drives. IT doesn't tell you how many there are, or even their size, which is what you asked for.  


Below has link to the script center that enumerates everything that exists for disk drives ... It provides  much more than what Midnight gave you, but still it does not look inside of any raid controllers

http://vbnet.mvps.org/index.html?code/wmi/win32_diskdrive.htm

0
 
LVL 26

Expert Comment

by:MidnightOne
ID: 26274076
Wow. I get busy for a few days and the crap rains down. :-)

dlethe appears to be right; the WMI approach I was looking at doesn't seem to have the capability of polling a SCSI/SAS RAID controller for underlying information of drives.
At this point I'd say a universal uninstalled solution isn't going to happen.
0
 
LVL 47

Expert Comment

by:David
ID: 26274268
No problem Midnightone - I know I'm probably coming off as pompous on this issue, but I've been writing storage management, disk diags, RAID firmware, driver patches, RAID configurators, NAS & SAN software/firmware, since late 80s on just about every O/S you can imagine, so I *really* have first hand experience with this particular issue.  

It is worth just saying why this can't/won't exist
First, best "Standard" today is SMI-S, but this is high-end tier1 and tier2 external RAID mostly, companies such as EMC, Hitachi, LSI, IBM.  The low-end cards and internal cards don't support SMI-S, because it is not only a huge engineering feat, but you need to add a network card and for all practical purposes, have to dedicate a processor and embedded O/S in the firmware just to handle it.   So the component cost alone will add $100 to a low-end card and take up precious real estate, let alone $100K just for even a crappy low-end provider.  So that is a deal killer for the sub-$1000 market due to engineering costs.   Not only that, for a poor end-user, you have to purchase a product that manages SMI-S, and while there is some freebie stuff, it is raw & ugly and a big pig because it looks at raid, file system, cpu, everything.

Before that, Dell tried to strong-arm some people like Adaptec, LSI, AMCC and other internal board vendors to come up with a common metadata format. I was part of that working group.  That fizzled out due not only to politics, but engineering concerns.  A common layout would have commoditized RAID controllers so you could just put a bunch of disks that are in a RAID set , and swap out controller and it would automatically work.  Nice idea, great for Dell, great for end-users, BUT .. problems for the RAID vendors.   Ignore the prospect of commoditizing intellectual property, it meant that the RAID vendors were not free to add functionality such as snapshot backup, or improved algorithms for insuring data integrity.   You had to write to lowest common denominator.  Also you had to worry about issues with upgrading firmware and migrating configs that were in degraded mode.  Issues with required default drive settings relating to retry algorithms, and how to handle disks that might have to be taken offline due to I/O problems.   Anyway, it died, and I am proud to say that I did help the demise, it would really have stagnated development and killed off the low-end RAID market.

ANSI set up several API/SPECs for RAID controller APIs.  I know of only one project that actually tried to use it, a former employer of mine, but they killed off the controller (political, as well as patent-infringement concerns).

Several RAID vendors (can't tell you who, under NDA with them), have common APIs designed to handle SAS, SATA, SCSI, FC, all drives, even iSCSI across their line, but only to be used by them.  They all feel that the API is intellectual property, which is why they don't just publish it.   A few vendors, areca put the API online to encourage 3rd party development and to increase market share.  It is debatable if this made any difference.  

One vendor, in particular, who I better not reveal refuses to release the API to anybody.  (My guess is there are legal reasons because they farmed out development so are not allowed to), but this means that you can write them off as ever being part of any standard.

Some of the RAID chip vendors publish their APIs, and the controller vendors who use their chips decide what features to turn on and off , when they design a board, and farm out development of controller to 3rd party that also tweaks settings either to their internal spec, or their convenience.  That is why 2 motherboard makers, or even 2 motherboards from same vendor that uses same controller chip won't let you use same drivers and/or firmware interchangeably with other systems using same RAID set.  It either won't work or could potentially kill the board.

So anyway, thought I would share my  reasons why this will never happen better than just keep saying no, it doesn't exist.  
(GO COWBOYS!!)
0
 
LVL 7

Author Comment

by:ednetman
ID: 26307822
Found a little info for some of the servers, still waiting to hear back from HP.

This does not have to be a one-size-fits-all solution.  I am more than happy to write a script that runs

wmic csproduct get name

Then based on the response have the script take the next course of action.

~Ed
0
 
LVL 47

Expert Comment

by:David
ID: 26307900
Oh, that is very different, if you are willing to stick to a family of controllers.  
Make sure that the HP ACU software is installed. There is a program called hpacucli.exe.  This can be used as part of a powershell or vbs script to enumerate the hardware and give you exactly what you want.   Output will be similar to this:
Smart Array P400 in Slot 1

   Bus Interface: PCI

   Slot: 1

   Serial Number: P61620D9SUO606

   Cache Serial Number: PA2270H9SUY3XY

   RAID 6 (ADG) Status: Enabled

   RAID 6 (ADG) Enabler Status: Enabled

   Controller Status: OK

   Chassis Slot:

   Hardware Revision: Rev D

   Firmware Version: 4.06

   Rebuild Priority: Medium

   Expand Priority: Medium

   Surface Scan Delay: 15 sec

   Cache Board Present: True

   Cache Status: OK

   Accelerator Ratio: 25% Read / 75% Write

   Drive Write Cache: Disabled

   Total Cache Size: 512 MB

   Battery Pack Count: 1

   Battery Status: OK

   SATA NCQ Supported: True



   Array: A

      Interface Type: SAS

      Unused Space: 0 MB

      Status: OK



      Logical Drive: 1

         Size: 68.3 GB

         Fault Tolerance: RAID 1+0

         Heads: 255

         Sectors Per Track: 32

         Cylinders: 17562

         Stripe Size: 128 KB

         Status: OK

         Array Accelerator: Enabled

         Unique Identifier: 600508B10010443953554F3630360002

         Disk Name: \\.\PhysicalDrive0

         Mount Points: C:\ 68.3 GB



      physicaldrive 1:1

         Port: 2I

         Box: 1

         Bay: 1

         Status: OK

         Drive Type: Data Drive

         Interface Type: SAS

         Size: 72 GB

         Rotational Speed: 15000

         Firmware Revision: HPD4

         Serial Number: 3PD0R6HQ00009809XA47

         Model: HP      DH072ABAA6    

         PHY Count: 1

      physicaldrive 1:2

         Port: 2I

         Box: 1

         Bay: 2

         Status: OK

         Drive Type: Data Drive

         Interface Type: SAS

         Size: 72 GB

         Rotational Speed: 15000

         Firmware Revision: HPD4

         Serial Number: 3PD0QADH00009808331F

         Model: HP      DH072ABAA6    

         PHY Count: 1

-> Then just parse it!

0
 
LVL 7

Author Comment

by:ednetman
ID: 26331092
WOW!  That will help a lot since most of the servers (about 75%) are some model of HP.  Does this NEED to be installed, or can I used psexec to copy and execute the command?  I'm poking around on the servers to find one that has it installed, and when I do I will try it out.

Anything similar for Dell or IBM servers?
0
 
LVL 47

Accepted Solution

by:
David earned 1500 total points
ID: 26331497
smartmon-ux gives below, and it works on the motherboard-RAID and PCI-based LSI SCSI, SAS/SATA, and Dell PERC adapters, but IBM and Dell use a large number of adapters, so no guarantee it works with everything.  Hence my original comments.  It is NOT free, and it does a lot more than just report info, but it is your best shot at a program that will work with large number of adapters.    You can set that program up to query health & configuration on an interval and just watch for changes and send out emails and such

Example output from manual  (http://www.santools.com/smart/unix/manual)

[root@w13 /scratch/common]# ./smartmon-ux -zd
SMARTMon-UX [Release 1.38, Build 30-OCT-2008] - Copyright 2001-2008 SANtools(R), Inc. http://www.SANtools.com
Discovered TSSTcorpCDW/DVD TS-L462D S/N "" on /dev/hdb (SMART unsupported)
Discovered ATA ST3500630NS S/N "9QG43RVS" on /dev/sda (Not Enabling SMART)(476940 MB)
Discovered (1) Controllers:
Port #0. /proc/mpt/ioc0    RAID SAS1068 B1     MPT 105   Firmware (1.18.00)   IOC 0
x86 BIOS image's version: MPTBIOS-6.12.00.00 (2006.10.31)
Bus/Dev/Fun    Board Name       Board Assembly   Board Tracer
130   3   0     SAS1068
SAS1068's phylinks are (Port 0,1,...,8): 1.5 G, down, 3.0 G, down, down, 3.0 G, down, down

Firmware Settings
-----------------
SAS WWID:                       500d068000003505
Multi-pathing:                  Disabled
SATA Native Command Queuing:    Enabled
SATA Write Caching:             Enabled
SATA Maximum Queue Depth:       32
Device Missing Report Delay:    0 seconds
Device Missing I/O Delay:       0 seconds
Phy Parameters for Phynum:      0    1    2    3    4    5    6    7
Link Enabled:                 Yes  Yes  Yes  Yes  Yes  Yes  Yes  Yes
Link Min Rate:                1.5  1.5  1.5  1.5  1.5  1.5  1.5  1.5
Link Max Rate:                3.0  3.0  3.0  3.0  3.0  3.0  3.0  3.0
SSP Initiator Enabled:        Yes  Yes  Yes  Yes  Yes  Yes  Yes  Yes
SSP Target Enabled:           No   No   No   No   No   No   No   No
Port Configuration:           Auto Auto Auto Auto Auto Auto Auto Auto
Target IDs per enclosure:       1
Persistent mapping:             Disabled
Physical mapping type:          Direct Attach

Target ID 0 reserved for boot:  No
Starting slot (direct attach):  0
Target IDs (physical mapping):  0
Interrupt Coalescing:           Enabled, timeout is 16 us, depth is 4

Persistent Mappings
-------------------
No persistent entries found
SAS1068's phylinks are (Port 0,1,...,8): 1.5 G, down, 3.0 G, down, down, 3.0 G, down, down

Discovered ST3500630NS S/N "9QG43RVS" on RAID (Not Enabling SMART) (476940 MB)
Discovered WDC WD2500AAJS-22VTA0 S/N "WD-WMART1663590" on RAID (Not Enabling SMART) (238475 MB)
Discovered LSILOGIC Logical Volume S/N "" on RAID (Not Enabling SMART) (69618 MB
1 volume is active, 2 physical disks are

Volume 0 is Bus 0 Target 4, Type IM (Integrated Mirroring)
Volume Name:
Volume WWID:  0a0cade5ed79d4ab
Volume State:  degraded, enabled
Volume Settings:  write caching disabled, auto configure
Volume draws from Hot Spare Pools:  0
Volume Size 69618 MB, Stripe Size 0 KB, 2 Members
Volume Device:
 Member 1 is PhysDisk 0 at (Bus 0 Target 5)

Discovered HP DF072BAFDT S/N "BJL4P86004TB0862" at Bus 0 Target 5 (70007 MB)  state=online PhysDisk=0
Discovered HP DF072BABUD S/N "J2YD2PCA" at Bus 0 Target 8 (70007 MB)  state=missing, out of sync PhysDisk=1
Volume 0 State:  degraded, enabled
Volume 1 State:  optimal, disabled
0
 
LVL 7

Author Closing Comment

by:ednetman
ID: 31671804
Lots of negativity in the beginning and didn't want to give up any info.  Seemed to think I need an all in one solution, when I never stated that.  Solution seems workable, however command line options not given for the commands so I am still trying to figure out how to get the correct output.
0
 
LVL 1

Expert Comment

by:emanuel_G
ID: 26433037
Well for Dell servers I use "omreport" this tool is part of the Dell OpenManage software, which should be installed on the server if it was installed with the Dell ServerAssistant CD.
You can use this command to get the necessary info from your RAID controller:
omreport storage controller -fmt xml -outa c:\controller.xml
This one is for getting information about the physical disks:
omreport storage pdisk controller=0 -fmt xml -outa c:\pdisks.xml
This is for getting virtual disks info:
omreport storage pdisk controller=0 -fmt xml -outa c:\vdisks.xml
You can just poke around "omreport" to get plenty of information about your server, whether it is Linux or Windows.
I hope this may help.
0
 
LVL 7

Author Comment

by:ednetman
ID: 26433065
Whoa, very cool!  thanks for the info.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You may have discovered the 'Compatibility View Settings' workaround for making your SBS 2008 Remote Web Workplace 'connect to a computer' section stops 'working around' after a Windows 10 client upgrade.  That can be fixed so it 'works around' agai…
There are literally thousands of Exchange recovery applications out there. So how do you end up picking one that’s ideal for your business & purpose? By carefully scouting the product’s features, the benefits it offers you, & reading ample reviews f…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Is your organization moving toward a cloud and mobile-first environment? In this transition, your IT department will encounter many challenges, such as navigating how to: Deploy new applications and services to a growing team Accommodate employee…

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question