[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Read Native Max LBA using C#

Posted on 2009-05-14
2
Medium Priority
?
733 Views
Last Modified: 2012-05-07
I'm trying to figure out how to read in the native max LBA using C#.  For example, if someone changes the max LBA of a drive, I want to be able to read the original max LBA set by the manufacturer of the drive.  Can anybody help me with this, or point me in the right direction?

Thanks in advance!
0
Comment
Question by:dev117
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 39

Expert Comment

by:abel
ID: 24449421
there are basically two kinds of LBA: 28 bit and 48 bit. Whether a drive supports either of those, depends on the drive's driver and sometimes BIOS settings. In older windows versions, the ATAPI driver had a setting for either of those, and it needs to be enabled to allow large LBA. Info on how to check and how to change that is here: http://support.microsoft.com/kb/303013

In the event you mean what the largest LBA number is that a drive allows, you can do a little calculation based on the absolute size of the drive. The sector size is usually 512 bytes on modern windows systems (you can check to be sure). The maximum LBA sector number is then essentially equal to the absolute size divided by 512.

In the event you mean to find what the maximum size can be of a drive when 28-bit or 48-bit LBA is on, it is simple. 28-bit can do 2^28 * 512 = 137,438,953,472, or 128 GB. 48-bit LBA can do 2^48 * 512 = 144,115,188,075,855,872 or 134,217,728 GB or 128 PB (petabytes).

-- Abel --
0
 
LVL 39

Accepted Solution

by:
abel earned 2000 total points
ID: 24449467
In addition, this may be of help to get the real size of a physical drive (the middle section in my post) which was also used to get the LBA size. It is in VB6 code, if you need help translating it to C# let me know: http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_22825938.html
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

656 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