Simpler Navigation coming for Servers and Operating Systems
Coming soon: a much simpler Servers and Operating Systems section of the Community. We will combine many of the older boards, and you won't have to click through so many levels to get at the information you need. If you are looking for an older board and do not find it, check the consolidated boards, as the posts are still there.
Operating System - Microsoft
cancel
Showing results for 
Search instead for 
Did you mean: 

How to detect the Hard Disk controled by HP Smart Array Controller?

yang shaohua
Frequent Advisor

How to detect the Hard Disk controled by HP Smart Array Controller?

I have the following code to detect local hard disks:

 HANDLE hDevice = CreateFile( "\\\\.\\PhysicalDrive1", 0, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL );
  DISK_GEOMETRY NTGeometry;
  DWORD dwReturned;
  BOOL bSuccess = DeviceIoControl( hDevice
                                 , IOCTL_DISK_GET_DRIVE_GEOMETRY
                                 , NULL
                                 , 0
                                 , &NTGeometry
                                 , sizeof( NTGeometry )
                                 , &dwReturned
                                 , NULL );
  if( bSuccess && dwReturned != 0 )
  {
    long lSector = NTGeometry.SectorsPerTrack;
    long lHead = NTGeometry.TracksPerCylinder - 1;   
    INT64 liCylinder = NTGeometry.Cylinders.QuadPart - 1;
  }

 

but, it will fail when it detects the hard disk controlled by HP Smart Array Controller.

So, Is there available API to detect the harddisks  controlled by HP Smart Array Controller?

 

thanks in advance!

 

 

P.S. This thread has been moved from HP-UX > General to Microsoft > general. - Hp Forum Moderator

13 REPLIES
Bill Hassell
Honored Contributor

Re: How to detect the Hard Disk controled by HP Smart Array Controller?

You won't see any real disks when an array controller is in the middle. The disks have been virtualized into LUNs which have no physical properties except an addressable space. There are DOZENS of array controllers and they have a custom interface (like sautil for a Smart Array) to see the physical disks behind the LUNs. The array can be configured to provide data performance much faster than a single disk, so sectors, cylinders and geometries are meaningless and therefore no interface exists to retrieve that information.



Bill Hassell, sysadmin
yang shaohua
Frequent Advisor

Re: How to detect the Hard Disk controled by HP Smart Array Controller?

thanks for bill's quickly response

I noticed that I still can collect the Mount Points information via Windows' API, for example, Volumn type, Volumn size, Volumn media, Volumn Disk, etc.

So, does it mean the Array Controller have an interface for Windows system?

Since that, Is it possible for me to get the very specific information of the Hard Disk? for example, Physical disk size,Physical disk type, etc

 

Thank you again!

Dennis Handly
Acclaimed Contributor

Re: How to detect the Hard Disk controlled by HP Smart Array Controller?

>Is it possible for me to get the very specific information of the Hard Disk?  For example, Physical disk size

 

I think Bill said you can only get it by looking at the output of sautil on HP-UX.

yang shaohua
Frequent Advisor

Re: How to detect the Hard Disk controlled by HP Smart Array Controller?

Yes, for HPUX, sautil is available, but for Windows, It seems no sautil there

Bill Hassell
Honored Contributor

Re: How to detect the Hard Disk controlled by HP Smart Array Controller?

>> Yes, for HPUX, sautil is available, but for Windows, It seems no sautil there.

 

Correct. Windows (and Linux, etc) will all have something totally different to talk to eacharray controller. It is unlikely that the tools will show you anything about the disk geometry.



Bill Hassell, sysadmin
yang shaohua
Frequent Advisor

Re: How to detect the Hard Disk controlled by HP Smart Array Controller?

Bill, Does it mean there is no way to detect the physical disk size controlled by array controller? on Windows platform?

 

Emil Velez_2
Trusted Contributor

Re: How to detect the Hard Disk controled by HP Smart Array Controller?

Try this

sasmgr get_info -D /dev/sasd1 -q raid

This should show you the physical disks

Also the SMH should show you the disks even if they are part of a raid set.
Emil Velez
Instructor Storage, Servers, HP-UX and Partner Courses
Hewlett Packard Enterprise Education Services
Ask me about training on StoreServ (3PAR) StoreOnce, StoreEasy, StoreAll, StoreVirtual, HP-UX, ServiceGuard and HPE Partner Ready Certification Training

internet: Emil.Velez@hpe.com
Linkedin: http://www.linkedin.com/in/emilvelez

HPE Master ASE Server Solutions Architect V3
HPE Master ASE Storage Solutions Architect V2
HP UNIX Certified (ASE HPUX 11iv3 Administration V1)
Certified HPE Instructor
HPE Product Certified - OneView [2016]
HP Sales Certified -Servers, Converged Systems and Services [2015]
HPE Product Certified - Converged Solutions [2017]
Bill Hassell
Honored Contributor

Re: How to detect the Hard Disk controlled by HP Smart Array Controller?

>>  Does it mean there is no way to detect the physical disk size controlled by array controller? on Windows platform

 

No, you can always run the appropriate array utility to determine the size of the disks that are controlled by the Smart Array card. As Emil says, you can also run smh and read the size of each disk. However, your original question was related to system calls to obtain cylinders, track and sectors. That information is not available from array controllers as it is irrelevant.

 

>> on Windows

 

Was this just a part of another question, such as comparing HP-UX to Windows?



Bill Hassell, sysadmin
yang shaohua
Frequent Advisor

Re: How to detect the Hard Disk controlled by HP Smart Array Controller?

thank Emil and Bill

Sorry, I may not clear my question.

My eviorment is a Windows platform, harddisk controlled by HP Array Controller.

What I need is, I want get the some basic info of harddisk( for example, size , type,etc..) controlled by HP Array controller on Windows platform.

So,firstly, I want to know if there is system call ( for example, Windows API) can get such information on Windows platform.

if no system call, if there is available command to get such information on Windows platform.

 

thanks again

Robert_Jewell
Honored Contributor

Re: How to detect the Hard Disk controlled by HP Smart Array Controller?

>> I want get the some basic info of harddisk( for example, size , type,etc..) controlled by HP Array controller on Windows platform.

 

For HP Smart Array controllers, the ACU utility from HP will give you this info.   There is a CLI version that can be used for scripting.  See the following:

 

www.hp.com/go/ACU

 

h20000.www2.hp.com/bc/docs/support/SupportManual/c03297836/c03297836.pdf

 

 

-Bob

----------------
Was this helpful? Like this post by giving me a thumbs up below!
yang shaohua
Frequent Advisor

Re: How to detect the Hard Disk controlled by HP Smart Array Controller?

ACU utility is installed by default on HP ProLiant DL and ML 300, 500, 700 and ProLiant BL servers or Not?

If ACU utility is not installed by default, How to detect the harddisk info there?

My application is used to run on the target machine and find out the harddisk information, so, generally,Using the system call or windows API to detect the harddisk info is the best for me, if no system call or windows API availble, another option is command line based on the platform.

 

any more comments here?

 

thanks you all

yang shaohua
Frequent Advisor

Re: How to detect the Hard Disk controlled by HP Smart Array Controller?

I met the same problem on Linux platform.

My application cannot detect the harddisk controlled by HP Array controller.

:-(

yang shaohua
Frequent Advisor

Re: How to detect the Hard Disk controlled by HP Smart Array Controller?

In my Linux device ( HP DL380 Server, HP Array Controller), My application failed to get the harddisk information,

and I have not find the ACU Utility or sautil something in the Linux box.

I run the fdisk command and got the following output:

# fdisk -l

Disk /dev/cciss/c0d0: 1027.4 GB, 1027472777216 bytes
255 heads, 32 sectors/track, 245929 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

           Device Boot      Start         End      Blocks   Id  System
/dev/cciss/c0d0p1   *           1         276     1126064   83  Linux
/dev/cciss/c0d0p2             277         304      114240   fc  VMware VMKCORE
/dev/cciss/c0d0p3             305      245929  1002150000    5  Extended
/dev/cciss/c0d0p5             305      245929  1002149984   fb  VMware VMFS

 

from the above, you can see the disk size is succesfully collected, So my question is:

How do the command "fdisk" can collect the harddisk information? Does it mean Linux has API , system call or something which can detect the harddisk?

please help me out.