Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] disk capacity mismatch
Date: Thu, 15 Feb 2007 20:06:03
Message-Id: 200702151959.10110.michaelkintzios@gmail.com
In Reply to: Re: [gentoo-user] disk capacity mismatch by Dan Farrell
1 On Thursday 08 February 2007 21:45, Dan Farrell wrote:
2 > On Thu, 8 Feb 2007 13:34:21 -0800
3 >
4 > "Michael Higgins" <mhiggins@×××××××××××××.com> wrote:
5 > > Hello, list --
6 > >
7 > >
8 > > # df -h
9 > > Filesystem Size Used Avail Use% Mounted on
10 > > /dev/hda3 20G 12G 7.5G 61% /
11 > > udev 236M 2.7M 233M 2% /dev
12 > > shm 236M 0 236M 0% /dev/shm
13 > > /dev/hda5 14G 13G 1.3G 91% /home/col/dump
14 > > /dev/hda6 14G 12G 2.0G 86% /home/col/music
15 >
16 > so here the sizes added up are ~48.5 gigs, right? and here...
17 >
18 > > Disk /dev/hda: 80.0 GB, 80026361856 bytes
19 >
20 > we can see the 80 gig drive recognized as such.
21 >
22 > > 16 heads, 63 sectors/track, 155061 cylinders
23 >
24 > and you have 155,061 cylinders on the disk, but
25 >
26 > > Device Boot Start End Blocks Id System
27 > > /dev/hda1 * 1 497 250456+ 83 Linux
28 > > /dev/hda2 498 2482 1000440 82 Linux swap /
29 > > Solaris /dev/hda3 2483 44103 20976984 83 Linux
30 > > /dev/hda4 44104 99582 27961416 5 Extended
31 > > /dev/hda5 44104 71843 13980928+ 83 Linux
32 > > /dev/hda6 71844 99582 13980424+ 83 Linux
33 >
34 > you only fill to cylinder 99,582. So 99,582 of 155,061 leaves us
35 > only about 64% of the drive used, and your 30 'missing' gigs simply not
36 > partitioned off. Unfortunately, since you haven't any more primary
37 > partitions, you have space after /dev/hda4 and no way to use it.
38 > Hopefully you know something about nondestructive partition resizing.
39 >
40 > good luck!
41
42 Or, boot off a LiveCD, tar the last partition contents somewhere off disk,
43 optionally you could delete the files/directories (use shred if you wish),
44 then use fdisk to delete the last partition, create a new extended partition
45 and the desired number and sizes of logical partitions, reboot with the
46 LiveCD, create a new fs type on each of your new partitions and untar back
47 your old partition.
48
49 There's a catch. Your first new logical partition will need to be at least as
50 large as the data you had in your old partition. If you want to move some of
51 the directories & mount points into a new different partition, this would be
52 the time to do it. Instead of tar-ring the complete partition, just tar
53 separately the relevant directories.
54
55 I'm sure there must be some LVM, EVM type of trick that you could use to
56 achieve the above, but I have always used this, aheam, conventional method to
57 do it.
58
59 HTH.
60 --
61 Regards,
62 Mick