public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] disk capacity mismatch
@ 2007-02-08 21:34 Michael Higgins
  2007-02-08 21:45 ` Dan Farrell
  2007-02-09  9:09 ` Alan McKinnon
  0 siblings, 2 replies; 4+ messages in thread
From: Michael Higgins @ 2007-02-08 21:34 UTC (permalink / raw
  To: gentoo-user

Hello, list --


# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda3              20G   12G  7.5G  61% /
udev                  236M  2.7M  233M   2% /dev
shm                   236M     0  236M   0% /dev/shm
/dev/hda5              14G   13G  1.3G  91% /home/col/dump
/dev/hda6              14G   12G  2.0G  86% /home/col/music

lbg2 col # fdisk /dev/hda

Command (m for help): p

Disk /dev/hda: 80.0 GB, 80026361856 bytes
16 heads, 63 sectors/track, 155061 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

What did I do wrong? It looks like my 80 GB drive is more like 50 GB. How
did I 'lose' the capacity?

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1         497      250456+  83  Linux
/dev/hda2             498        2482     1000440   82  Linux swap / Solaris
/dev/hda3            2483       44103    20976984   83  Linux
/dev/hda4           44104       99582    27961416    5  Extended
/dev/hda5           44104       71843    13980928+  83  Linux
/dev/hda6           71844       99582    13980424+  83  Linux

What major clue do I lack? :(

-- 
Michael Higgins


-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] disk capacity mismatch
  2007-02-08 21:34 [gentoo-user] disk capacity mismatch Michael Higgins
@ 2007-02-08 21:45 ` Dan Farrell
  2007-02-15 19:59   ` Mick
  2007-02-09  9:09 ` Alan McKinnon
  1 sibling, 1 reply; 4+ messages in thread
From: Dan Farrell @ 2007-02-08 21:45 UTC (permalink / raw
  To: gentoo-user

On Thu, 8 Feb 2007 13:34:21 -0800
"Michael Higgins" <mhiggins@banfieldgroup.com> wrote:

> Hello, list --
> 
> 
> # df -h
> Filesystem            Size  Used Avail Use% Mounted on
> /dev/hda3              20G   12G  7.5G  61% /
> udev                  236M  2.7M  233M   2% /dev
> shm                   236M     0  236M   0% /dev/shm
> /dev/hda5              14G   13G  1.3G  91% /home/col/dump
> /dev/hda6              14G   12G  2.0G  86% /home/col/music

so here the sizes added up are ~48.5 gigs, right?  and here...

> Disk /dev/hda: 80.0 GB, 80026361856 bytes
we can see the 80 gig drive recognized as such.
> 16 heads, 63 sectors/track, 155061 cylinders
and you have 155,061 cylinders on the disk, but

>    Device Boot      Start         End      Blocks   Id  System
> /dev/hda1   *           1         497      250456+  83  Linux
> /dev/hda2             498        2482     1000440   82  Linux swap /
> Solaris /dev/hda3            2483       44103    20976984   83  Linux
> /dev/hda4           44104       99582    27961416    5  Extended
> /dev/hda5           44104       71843    13980928+  83  Linux
> /dev/hda6           71844       99582    13980424+  83  Linux

you only fill to cylinder 99,582.  So 99,582 of 155,061 leaves us
only about 64% of the drive used, and your 30 'missing' gigs simply not
partitioned off.  Unfortunately, since you haven't any more primary
partitions, you have space after /dev/hda4 and no way to use it.
Hopefully you know something about nondestructive partition resizing.

good luck!
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] disk capacity mismatch
  2007-02-08 21:34 [gentoo-user] disk capacity mismatch Michael Higgins
  2007-02-08 21:45 ` Dan Farrell
@ 2007-02-09  9:09 ` Alan McKinnon
  1 sibling, 0 replies; 4+ messages in thread
From: Alan McKinnon @ 2007-02-09  9:09 UTC (permalink / raw
  To: gentoo-user

On Thursday 08 February 2007, Michael Higgins wrote:
> Hello, list --
>
>
> # df -h
> Filesystem            Size  Used Avail Use% Mounted on
> /dev/hda3              20G   12G  7.5G  61% /
> udev                  236M  2.7M  233M   2% /dev
> shm                   236M     0  236M   0% /dev/shm
> /dev/hda5              14G   13G  1.3G  91% /home/col/dump
> /dev/hda6              14G   12G  2.0G  86% /home/col/music
>
> lbg2 col # fdisk /dev/hda
>
> Command (m for help): p
>
> Disk /dev/hda: 80.0 GB, 80026361856 bytes
> 16 heads, 63 sectors/track, 155061 cylinders
> Units = cylinders of 1008 * 512 = 516096 bytes
>
> What did I do wrong? It looks like my 80 GB drive is more like 50 GB.
> How did I 'lose' the capacity?

No, read it again. It doesn't say 50GB.

It says (line 1) that you have an 80G disk comprising 155061 cylinders 
(line 2), each of which are 516096 *bytes* long.

btw, lines 2 and 3 are bogus anyway, your drive doesn't look like that, 
and no drive on the market has looked like that for more than 10 years 
now. It actually means more something along the lines of 

"Your disk is 80GB big, and to make your life easier you can consider it 
to be made up of 155061 cylinders each 0.5M big. Other schemes exist 
but in actual fact it's really just a long string of 156301488 sectors, 
numbered sequentially, each one being 512 bytes long"

hth

alan


-- 
Optimists say the glass is half full,
Pessimists say the glass is half empty,
Developers say wtf is the glass twice as big as it needs to be?

Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] disk capacity mismatch
  2007-02-08 21:45 ` Dan Farrell
@ 2007-02-15 19:59   ` Mick
  0 siblings, 0 replies; 4+ messages in thread
From: Mick @ 2007-02-15 19:59 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 2651 bytes --]

On Thursday 08 February 2007 21:45, Dan Farrell wrote:
> On Thu, 8 Feb 2007 13:34:21 -0800
>
> "Michael Higgins" <mhiggins@banfieldgroup.com> wrote:
> > Hello, list --
> >
> >
> > # df -h
> > Filesystem            Size  Used Avail Use% Mounted on
> > /dev/hda3              20G   12G  7.5G  61% /
> > udev                  236M  2.7M  233M   2% /dev
> > shm                   236M     0  236M   0% /dev/shm
> > /dev/hda5              14G   13G  1.3G  91% /home/col/dump
> > /dev/hda6              14G   12G  2.0G  86% /home/col/music
>
> so here the sizes added up are ~48.5 gigs, right?  and here...
>
> > Disk /dev/hda: 80.0 GB, 80026361856 bytes
>
> we can see the 80 gig drive recognized as such.
>
> > 16 heads, 63 sectors/track, 155061 cylinders
>
> and you have 155,061 cylinders on the disk, but
>
> >    Device Boot      Start         End      Blocks   Id  System
> > /dev/hda1   *           1         497      250456+  83  Linux
> > /dev/hda2             498        2482     1000440   82  Linux swap /
> > Solaris /dev/hda3            2483       44103    20976984   83  Linux
> > /dev/hda4           44104       99582    27961416    5  Extended
> > /dev/hda5           44104       71843    13980928+  83  Linux
> > /dev/hda6           71844       99582    13980424+  83  Linux
>
> you only fill to cylinder 99,582.  So 99,582 of 155,061 leaves us
> only about 64% of the drive used, and your 30 'missing' gigs simply not
> partitioned off.  Unfortunately, since you haven't any more primary
> partitions, you have space after /dev/hda4 and no way to use it.
> Hopefully you know something about nondestructive partition resizing.
>
> good luck!

Or, boot off a LiveCD, tar the last partition contents somewhere off disk, 
optionally you could delete the files/directories (use shred if you wish), 
then use fdisk to delete the last partition, create a new extended partition 
and the desired number and sizes of logical partitions, reboot with the 
LiveCD, create a new fs type on each of your new partitions and untar back 
your old partition.

There's a catch.  Your first new logical partition will need to be at least as 
large as the data you had in your old partition.  If you want to move some of 
the directories & mount points into a new different partition, this would be 
the time to do it.  Instead of tar-ring the complete partition, just tar 
separately the relevant directories.

I'm sure there must be some LVM, EVM type of trick that you could use to 
achieve the above, but I have always used this, aheam, conventional method to 
do it.

HTH.
-- 
Regards,
Mick

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-02-15 20:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-08 21:34 [gentoo-user] disk capacity mismatch Michael Higgins
2007-02-08 21:45 ` Dan Farrell
2007-02-15 19:59   ` Mick
2007-02-09  9:09 ` Alan McKinnon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox