[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Disk Space Calculation - Some Space missing - Where did it Go?



On Fri, 2007-04-06 at 13:40 -0700, Andrew Sackville-West wrote:
> On Fri, Apr 06, 2007 at 11:26:46PM +0530, Siju George wrote:
> > Hi,
> > 
> > Just want to know a little bit about disk space calculation.
> > 
> > I have a hard disk of 500 GB as shown here.
> > 
> > =============================================================================
> > websrv-1:~# fdisk -l /dev/sda
> > 
> > Disk /dev/sda: 500.1 GB, 500106813440 bytes
> [...]
> > There are 3 partitions
> > 
> > 1) sda5 is LVM and is 464 GB approx
> [...]
> > 2) sda1 and sda2 are 300MB and 2GB approximately. 
> [..]
> > So sda5 + sda1 + sda2 = 470GB + 300MB + 2 GB = 472.3 or 473GB approximately.
> > 
> > But my hard disk is 500GB.
> > 
> > So where did 27 ( 500 -473 ) GB go?
> > 
> > Is there any error in my Calculations?
> 
> disk drive manufacturers label their disks based on a 1 GB = 1000 MB =
> 1000 K, but the partition sizes are based on 1 GB = 1024 MB = 1024 K. 
> 
> that's how I understand it. 

That is how the user is bamboozled. Even the drive itself says it right
on its label, after a few lawsuits.

I just happen to have 4 - 300GB disks in a single LVM volume group.

# vgdisplay voidVG
  --- Volume group ---
  VG Name               voidVG
  Format                lvm2
[snip]
  VG Size               1.09 TB
  PE Size               32.00 MB
  Total PE              35772

Each one of those drives is a "300GB" drive. But yet, I only get 1.09TB
out of the 4 drives.

Now, lets try the math to explain this. We should have 1200G or 1.2T.
But wait we actually do.

Figure it this way:

         35775 (number of Physical Extents)
        x   32 MB Physical Extent size
        x 1024 KBytes per MByte
        x 1024 Bytes per KByte
        -----------------------------------
        1,200,409,804,800 Bytes

Are we clear yet? See it *DOES* == 1.2T (base10)
-- 
greg, greg@gregfolkert.net

Novell's Directory Services is a competitive product to Microsoft's
Active Directory in much the same way that the Saturn V is a competitive
product to those dinky little model rockets that kids light off down at
the playfield. -- Thane Walkup



Reply to: