disk shouldn’t have retried I/O on non-existant sectors if the drive was
returning an appropriate error message. Of course not all drives
return sane errors.
-p
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Ward
Sent: Wednesday, June 22, 2005 10:11 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Getting disk size - W2K and XP
I once had a bug in a disk encryption system where even
IOCTL_DISK_GET_DRIVE_GEOMETRY_EX didn’t work, because the disk firmware
returned the wrong answer to the size enquiry.
Because we believed the answer, some of the disk wasn’t encrypted.
In this case, the only reliable solution was to probe up the disk until
it failed and then binary chop between the last good sector and the
first failure to get the highest good sector. It can take some time
because of disk class driver retries on the failing (nonexistent)
sectors.
If you really really want to know the exact capacity of the disk and you
have a client that is paranoid (for instance because he wants the
assurance that ALL of his disk is encrypted) this is probably the only
truly reliable way to do it.
Having said that, of all the disks we tested, only one had this fault
and it was dependant on the rev of the firmware on the disk. But, as I
said, it depends on the paranoia level of your client.
To be fair to the client in the case I’ve described (which is an agency
described by a small number of capital letters), the world probably is
out to get them ![:slight_smile: :slight_smile:](/images/emoji/twitter/slight_smile.png?v=12)
Don
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Andre Tertling
Sent: 22 June 2005 18:03
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Getting disk size - W2K and XP
On Tue, 21 Jun 2005 09:08:32 -0700, “David J. Craig” wrote:
>Yes. Not more than 8MB? Try 63 * 256 * 512 as a clue.
Don’t use CHS!
Weeell, can you elaborate a bit more about this? I happened to run
into the same eerie thing just yesterday. Funny coincidence
If one
shouldn’t use CHS, how to determine the proper values? Remember that
W2K does not support IOCTL_DISK_GET_DRIVE_GEOMETRY_EX. What API can I
use to determine the size in LBAs? As long as I can work with a
partition, everything is quite fine, but what about raw access to the
physical device?
I hope you can shed some light on this ![:slight_smile: :slight_smile:](/images/emoji/twitter/slight_smile.png?v=12)
Kind regards,
Andre
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@careful.co.uk To
unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com