Operating System - Microsoft
1752273 Members
4995 Online
108786 Solutions
New Discussion

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 13
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: 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