Operating System - HP-UX
1834798 Members
2608 Online
110070 Solutions
New Discussion

Re: Size mismatch between disk size reported by pvdisplay and diskinfo

 
SOLVED
Go to solution
Nikhil_1
Advisor

Size mismatch between disk size reported by pvdisplay and diskinfo

Hi,

While following up on the diskinfo post, I checked the pvdisplay
output (as suggested by Bill McNAMARA)

If I calcuate size using diskinfo
s1 = blocks per disk * bytes per sector
s1 = 2147678720 bytes

If I calcualte size using pvdisplay
s2 = Total PE * PE Size * Bytes in One MB
s2 = 511 * 4 * (1024 * 1024)
s2 = 2143289344

1. The "Mbytes" is actually 1024 * 1024 (and not 1000 * 1000), right?
2. What accounts for the difference between s1 and s2? (PVRA, VGRA ?)

With regards,
Nikhil

 

 

P.S. This thread has been moved from Disk to HP-UX > LVM and VxVM. - Hp Forum Moderator

2 REPLIES 2
Vincent Fleming
Honored Contributor
Solution

Re: Size mismatch between disk size reported by pvdisplay and diskinfo

First off, your s2 is incorrect... it should be:

s2= 512 * 4 * 1024 * 1024
s2= 2147483648

s1 - s2 = 195072

in blocks (divide by 512): 381 blocks

or 190.5 Kbytes

The LVM does use some space on the drive for headers and such - how much, I don't know, but it really doesn't matter because it's not a significant amount - 190K is nothing.

Wait until you create a filesystem on it - you'll lose somewhere around 10% of the usable space to filesystem overhead.

As for the definition of MBytes, it depends on who you ask... really.

Marketing types tend to define it as 1000 * 1000, but us technical people define it as 1024 * 1024. For your purposes, use 1024 * 1024.

I gather from your questions that you're a little new at this - which is not a bad thing (better you ask than not understand!) So, I'll offer this little bit of advice: don't sweat over this stuff - you will rarely be able to account for every single byte of storage unless you have kernel sources to read and see exactly what it's doing with the storage and why - and if you do (I have), you'll find that it's not losing anything. Chaulk it up to system overhead and "marketing math". Always order a little more storage than you think you need.

The same goes for other system resources, such as CPU and memory. Always order a little bit more than you think you will need, because you can never account for every little bit of system overhead, rounded numbers, and such.

Good luck!

-Vince

No matter where you go, there you are.
Nikhil_1
Advisor

Re: Size mismatch between disk size reported by pvdisplay and diskinfo

> First off, your s2 is
> incorrect... it should be:
>
> s2= 512 * 4 * 1024 * 1024

Well, pvdisplay reports
Total PE as 511, not 512.

> Marketing types tend to define it as 1000 * 1000, but
> us technical people define it as 1024 * 1024. For your
> purposes, use 1024 * 1024.

Thanks Vince.

With regards,
Nikhil