Operating System - HP-UX
1833543 Members
2926 Online
110061 Solutions
New Discussion

Re: URGENT How can I figure out EXACTLY raw disk size in KB

 
SOLVED
Go to solution
Mike Rightmire
Frequent Advisor

URGENT How can I figure out EXACTLY raw disk size in KB

I need to know the EXACT KB size of a raw space on some of HP drives. The lv is 2000 MB, one of two LVs in a VG. I am having difficulty as I do not know how many true KBs HP considers an MB (is it based on block size PE, ETC.)

Any help, including just the answer, would be great. These are raw data LVs.

Thx!
"If we treated each person we met as if they were carrying an unspeakable burden, we might almost treat each other as we should." Dale Carnegie
7 REPLIES 7
Sridhar Bhaskarla
Honored Contributor
Solution

Re: URGENT How can I figure out EXACTLY raw disk size in KB

Let me see if I understood your question correctly.

I am sure you are not looking for the info returned by diskinfo /dev/rdsk/cxtydz.

If this disk is part of a volume group, the way to find the unused disk space is

do a pvdisplay /dev/dsk/cxtydz.

Multiply Free PE with PE Size
Multiply the result with 1024.

You will get the free size on the PV in K Bytes.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
James R. Ferguson
Acclaimed Contributor

Re: URGENT How can I figure out EXACTLY raw disk size in KB

Hi Mike:

1K = 1024, so, 2000 MB = 2,048,000 KB

Regards!

...JRF...
Ovidiu D. Raita
Valued Contributor

Re: URGENT How can I figure out EXACTLY raw disk size in KB

2000 MB = 2000 * 1024 KB
For a disk use diskinfo /dev/rdsk/cXdXtX
Ovidiu
Simple solutions to complex problems
Sridhar Bhaskarla
Honored Contributor

Re: URGENT How can I figure out EXACTLY raw disk size in KB

If you are talking about a RAW logical volume, it would be the size of the logical volume multiplied by 1024.

So, in your case it would be 2000*1024=2048000 KB and this is what you get in bdf command for normal logical volumes.

I hope I understood your question.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
linuxfan
Honored Contributor

Re: URGENT How can I figure out EXACTLY raw disk size in KB

Hi Mike,


Did you already try diskinfo

diskinfo /dev/rdsk/cXtYdZ

and 1MB is always 1024KB or 1024*1024 bytes

-Regards
Ramesh
They think they know but don't. At least I know I don't know - Socrates
Mike Rightmire
Frequent Advisor

Re: URGENT How can I figure out EXACTLY raw disk size in KB

Fantastic!! That's what I needed confirmed, that when it sayd 1 MB it truly is 1024 KB. That gives me the answer I need! Everyone gets 10 points and a gold star :-) !
"If we treated each person we met as if they were carrying an unspeakable burden, we might almost treat each other as we should." Dale Carnegie
A. Clay Stephenson
Acclaimed Contributor

Re: URGENT How can I figure out EXACTLY raw disk size in KB

Hi Mike:

The MB is our usage is 2^20 (1024 * 1024); so your value is 2000 * 1024 * 1024 = 2,097,152,000 Bytes.

You are obviously confused by the 'marketing MB' which is calculated by taking the above value and dividing by 10^6 to get 2097.152MB and obviously makes our 2.1GB drive much better than your dinky 2GB drive eventhough they are exactly the same.

Regards, Clay

In your case
2000 * 1024 * 1024
If it ain't broke, I can fix that.