Knowing (hard) disk status?

Is there any way to know the status (say okay/not okay) in Windows NT
using C++/C? I can find find out the status of a partition/volume,
similarly I want to find out what the status disk has?

thanks in adv.

-Pankaj

What do you mean by disk status (ok/not ok)?

===========================
Mark Roddy
Consultant, Microsoft DDK MVP
Hollis Technology Solutions
xxxxx@hollistech.com
www.hollistech.com
603-321-1032

-----Original Message-----
From: Pankaj
To: “NT Developers Interest List”
Date: Wed, 21 Aug 2002 14:57:55 +0530
Subject: [ntdev] Knowing (hard) disk status?

> Is there any way to know the status (say okay/not okay) in Windows NT
> using C++/C? I can find find out the status of a partition/volume,
> similarly I want to find out what the status disk has?
>
> thanks in adv.
>
> -Pankaj
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@hollistech.com
> To unsubscribe send a blank email to %%email.unsub%%

Here, status means whether the disk is up or functioning properly. Can we
get any status which tells the " disk needs maintenance"(disk is too much
fragmented). This will suffice for our purpose. But is there any other
information which can retrieved along with this ??

Thanks,
Pankaj

“Mark Roddy” wrote in message news:xxxxx@ntdev…
>
> What do you mean by disk status (ok/not ok)?
>
>
> ===========================
> Mark Roddy
> Consultant, Microsoft DDK MVP
> Hollis Technology Solutions
> xxxxx@hollistech.com
> www.hollistech.com
> 603-321-1032
>
>
> -----Original Message-----
> From: Pankaj
> To: “NT Developers Interest List”
> Date: Wed, 21 Aug 2002 14:57:55 +0530
> Subject: [ntdev] Knowing (hard) disk status?
>
> > Is there any way to know the status (say okay/not okay) in Windows NT
> > using C++/C? I can find find out the status of a partition/volume,
> > similarly I want to find out what the status disk has?
> >
> > thanks in adv.
> >
> > -Pankaj
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@hollistech.com
> > To unsubscribe send a blank email to %%email.unsub%%
>
>
>
>

Hmmm… I don’t know if you mean ‘disk’ or ‘volume’. A disk isn’t
fragmented unless I dropped it on the floor :slight_smile: Volumes might be
fragmented. As far as I know there is no system mechanism for reporting
volume fragmentation.

Some disks do support error reporting, but I think this is not
consistent. See the sdk for information on IOCTL_STORAGE_PREDICT_FAILURE.

The Volume Manager thinks it knows if a volume is ‘healthy’ or not, but
this status is as far as I know internal to the volume manager
drivers/services.

You can know if a disk is operational - as in ‘online’ - by pnp
notification, see the platform sdk.

===========================
Mark Roddy
Consultant, Microsoft DDK MVP
Hollis Technology Solutions
xxxxx@hollistech.com
www.hollistech.com
603-321-1032

-----Original Message-----
From: “Nagesh Bhattu”
To: “NT Developers Interest List”
Date: Thu, 22 Aug 2002 00:35:22 +0530
Subject: [ntdev] Re: Knowing (hard) disk status?

> Here, status means whether the disk is up or functioning properly. Can
> we
> get any status which tells the " disk needs maintenance"(disk is too
> much
> fragmented). This will suffice for our purpose. But is there any other
> information which can retrieved along with this ??
>
> Thanks,
> Pankaj
>
> “Mark Roddy” wrote in message
> news:xxxxx@ntdev…
> >
> > What do you mean by disk status (ok/not ok)?
> >
> >
> > ===========================
> > Mark Roddy
> > Consultant, Microsoft DDK MVP
> > Hollis Technology Solutions
> > xxxxx@hollistech.com
> > www.hollistech.com
> > 603-321-1032
> >
> >
> > -----Original Message-----
> > From: Pankaj
> > To: “NT Developers Interest List”
> > Date: Wed, 21 Aug 2002 14:57:55 +0530
> > Subject: [ntdev] Knowing (hard) disk status?
> >
> > > Is there any way to know the status (say okay/not okay) in Windows
> NT
> > > using C++/C? I can find find out the status of a partition/volume,
> > > similarly I want to find out what the status disk has?
> > >
> > > thanks in adv.
> > >
> > > -Pankaj
> > >
> > >
> > > —
> > > You are currently subscribed to ntdev as: xxxxx@hollistech.com
> > > To unsubscribe send a blank email to %%email.unsub%%
> >
> >
> >
> >
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@hollistech.com
> To unsubscribe send a blank email to %%email.unsub%%

Mark Roddy wrote:

Some disks do support error reporting, but I think this is not
consistent. See the sdk for information on IOCTL_STORAGE_PREDICT_FAILURE.

This is what MSDN documentation says-

Upon receiving this IOCTL, the disk class driver attempts to verify if
an IDE drive supports self-monitoring analysis and reporting technology
(SMART). If the drive is a SCSI drive, the class driver attempts to
verify if the SCSI disk supports the equivalent IDE SMART technology:
Information Exception Control Page, X3T10/94-190 Rev 4.

This is not what I require, I will be interested in knowing the status
say whether it is online, or needs maintainance, or has some bad
sectors, or not safe to store data as it has many bad sectors, or
something like this. Something from storage point of view.

You can know if a disk is operational - as in ‘online’ - by pnp
notification, see the platform sdk.

Can you be more specific? I checked SDK docuemntation, but could not
locate. If you are able to give any example, it would of great help.

Thanks for your response, :slight_smile:
-Pankaj

===========================
Mark Roddy
Consultant, Microsoft DDK MVP
Hollis Technology Solutions
xxxxx@hollistech.com
www.hollistech.com
603-321-1032

>

Mark Roddy wrote:

> Some disks do support error reporting, but I think this is not
> consistent. See the sdk for information on
IOCTL_STORAGE_PREDICT_FAILURE.
>

This is what MSDN documentation says-

Upon receiving this IOCTL, the disk class driver attempts to verify if
an IDE drive supports self-monitoring analysis and reporting technology
(SMART). If the drive is a SCSI drive, the class driver attempts to
verify if the SCSI disk supports the equivalent IDE SMART technology:
Information Exception Control Page, X3T10/94-190 Rev 4.

This is not what I require, I will be interested in knowing the status
say whether it is online, or needs maintainance, or has some bad
sectors, or not safe to store data as it has many bad sectors, or
something like this. Something from storage point of view.

That is exactly what SMART and SCSI failure prediction data report. But
not all devices support the interfaces. You can just poll the disks that
are online and support this interface.

My guess is that this stuff is near useless as most disk failures happen
catastrophically over a very short period of time rather than gradually.

> You can know if a disk is operational - as in ‘online’ - by pnp
> notification, see the platform sdk.
>

Can you be more specific? I checked SDK docuemntation, but could not
locate. If you are able to give any example, it would of great help.

See RegisterDeviceNotification in the sdk.

===========================
Mark Roddy
Consultant, Microsoft DDK MVP
Hollis Technology Solutions
xxxxx@hollistech.com
www.hollistech.com
603-321-1032