Partioning - Lost Disk Space

Partioning - Lost Disk Space

Post by Matthew Planchan » Mon, 12 Nov 2001 00:59:16



I seem to have lost ~1Gb of disk space can anyone suggest where it might
have gone? The disk is 30Gb but now there only seems to be 29Gb.

I'm not worried about losing anything on my Linux partition as i'm going to
do a reinstall soon anyway. So if I could recover the lost space and end up
with a blank Linux partition then that would be fine.

This is the output from fdisk:

[matt]# fdisk /dev/hda
The number of cylinders for this disk is set to 3736.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Disk /dev/hda: 255 heads, 63 sectors, 3736 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1      2549  20474811    c  Win95 FAT32 (LBA)
/dev/hda2          2550      3736   9534577+   5  Extended
/dev/hda5          2550      3368   6578586   83  Linux
/dev/hda6          3369      3466    787153+  82  Linux swap
/dev/hda7          3467      3736   2168743+  83  Linux


The number of cylinders for this disk is set to 2548.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/hda1: 255 heads, 63 sectors, 2548 cylinders
Units = cylinders of 16065 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
/dev/hda1p1   ?    120513    235786 925929529+  68  Unknown
Partition 1 does not end on cylinder boundary:
     phys=(288, 101, 46) should be (288, 254, 63)
/dev/hda1p2   ?     82801    116350 269488144   79  Unknown
Partition 2 does not end on cylinder boundary:
     phys=(0, 13, 10) should be (0, 254, 63)
/dev/hda1p3   ?     33551    120595 699181456   53  OnTrack DM6 Aux3
Partition 3 does not end on cylinder boundary:
     phys=(324, 77, 19) should be (324, 254, 63)
/dev/hda1p4   ?     86812     86813     10668+  49  Unknown
Partition 4 does not end on cylinder boundary:
     phys=(335, 78, 2) should be (335, 254, 63)

Partition table entries are not in disk order

Any ideas?

Cheers,

Matt.

 
 
 

Partioning - Lost Disk Space

Post by Dances With Cro » Mon, 12 Nov 2001 01:48:33


On Sat, 10 Nov 2001 15:59:16 GMT, Matthew Planchant staggered into the
Black Sun and said:

Quote:>I seem to have lost ~1Gb of disk space can anyone suggest where it
>might have gone? The disk is 30Gb but now there only seems to be 29Gb.

>[matt]# fdisk /dev/hda
>The number of cylinders for this disk is set to 3736.

>Disk /dev/hda: 255 heads, 63 sectors, 3736 cylinders
>Units = cylinders of 16065 * 512 bytes

>   Device Boot    Start       End    Blocks   Id  System
>/dev/hda1   *         1      2549  20474811    c  Win95 FAT32 (LBA)
>/dev/hda2          2550      3736   9534577+   5  Extended
>/dev/hda5          2550      3368   6578586   83  Linux
>/dev/hda6          3369      3466    787153+  82  Linux swap
>/dev/hda7          3467      3736   2168743+  83  Linux

3736 cylinders * 16065 sectors/cylinder = 60018840 sectors = 30009420K.
You understand that Marketing says that 1G = 1,000,000K, not 1G =
1,048,576K, right?  Your "30G" disk is only 30G in {Marketing,decimal}
G--in binary ("real") G, your disk is 28.6G.

This fiddling with what disk space numbers *really* mean has been going
on in one way or another since ~1970.  HTH, welcome to the world of
computing.

You shouldn't have a partition table in /dev/hda1 at all.  The first 512
bytes of hda1 contain the first block of either NTLDR or IO.SYS if
you've got 'Doze on hda1.

--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin /
http://www.brainbench.com     /  "He is a rhythmic movement of the
-----------------------------/    penguins, is Tux." --MegaHAL

 
 
 

Partioning - Lost Disk Space

Post by Matthew Planchan » Mon, 12 Nov 2001 02:35:47


Quote:>>   Device Boot    Start       End    Blocks   Id  System
>>/dev/hda1   *         1      2549  20474811    c  Win95 FAT32 (LBA)
>>/dev/hda2          2550      3736   9534577+   5  Extended
>>/dev/hda5          2550      3368   6578586   83  Linux
>>/dev/hda6          3369      3466    787153+  82  Linux swap
>>/dev/hda7          3467      3736   2168743+  83  Linux

What is the partition marked /dev/hda2 ? I don't remember creating this,
what does system - Extended mean?

Cheers,

Matt

 
 
 

Partioning - Lost Disk Space

Post by DaZZ » Mon, 12 Nov 2001 06:21:23



Quote:

>>>   Device Boot    Start       End    Blocks   Id  System
>>>/dev/hda1   *         1      2549  20474811    c  Win95 FAT32 (LBA)
>>>/dev/hda2          2550      3736   9534577+   5  Extended
>>>/dev/hda5          2550      3368   6578586   83  Linux
>>>/dev/hda6          3369      3466    787153+  82  Linux swap
>>>/dev/hda7          3467      3736   2168743+  83  Linux

>What is the partition marked /dev/hda2 ? I don't remember creating this,
>what does system - Extended mean?

Boy, do you have a lot to learn. :-)

Short lesson.

There are three types of partitions available on modern IBM-type {read: X86}
platforms. It should be noted that this is OS independant - it's related to
the BIOS and drives, and was set back in time - it's along the lines of the
famous Gates "640k oughta be enough for anybody" syndrome.

These types are Primary and Extended and logical.

You can have a maximum of 4 Primary partitions - but only one extended. Your
extended partition uses one of your primary partition slots, giving a
maximum for the disk of 3 primary and one extended partitions.

This would indicate a maximum of 4 partitions per disk, no? Not quite true.

However, with an extended partition you can have partitions INSIDE the
partition. This is the "logical" partition type.

This allows you to have more than four partitions - if there's
an upper limit on logical partitions I'm yet to find it - however you can only
_boot_ from Primary partitions.

What's the point of all this? Well, extended and logical partition types
allow installation of _lots_ of partitions. This was particularly important
in the days when a 32 meg partition was the largest you could have {circa
MSDOS 3.3}, and you had a big disk - I can remember one disk so large we ran
out of drive letters. In this day and age, it allows you to install _lots_ of
different operating systems on the one disk - provided you can manage them
with some form of boot loader which allows access to the extended partitions.

In your case, I suspect the install routines for Linux saw the fact that you
had an existing primary partition, and did the Linux install on the extended/
logical set by default. I also suspect you installed it with one of the
"automatic" partitioning processes, but I could be wrong.

DaZZa - if that was short, I wonder what long would have been?

--
Address in header is spamblocked. ROT13 the following for email replies

 
 
 

Partioning - Lost Disk Space

Post by Matthew Planchan » Mon, 12 Nov 2001 09:38:05



> In your case, I suspect the install routines for Linux saw the fact that
> you had an existing primary partition, and did the Linux install on the
> extended/ logical set by default. I also suspect you installed it with one
> of the "automatic" partitioning processes, but I could be wrong.

Thanks very much for that.

Very useful. I've always used Mandrake but I (attempted) to install Red
Hat. I think this may have caused the problem, when I have installed
Mandrake in the past I have created 3 partitions aswell as the windows
partion - /, /home and swap. Would these all have been primary partitions?
If I was creating only 4 partitions then why was the extended partition
created for me? Is the 4th partition always created as an extended
partition?

Regards,

Matt.

 
 
 

Partioning - Lost Disk Space

Post by DaZZ » Mon, 12 Nov 2001 18:12:48




>> In your case, I suspect the install routines for Linux saw the fact that
>> you had an existing primary partition, and did the Linux install on the
>> extended/ logical set by default. I also suspect you installed it with one
>> of the "automatic" partitioning processes, but I could be wrong.

>Thanks very much for that.

Welcome. :-)

Quote:>Very useful. I've always used Mandrake but I (attempted) to install Red
>Hat. I think this may have caused the problem, when I have installed
>Mandrake in the past I have created 3 partitions aswell as the windows
>partion - /, /home and swap. Would these all have been primary partitions?
>If I was creating only 4 partitions then why was the extended partition
>created for me? Is the 4th partition always created as an extended
>partition?

Depends what you used to create the partitions.

Disk Druid and the like are "smart" partitioning programs. They attempt to
do what's "best" - best by someone elses definition, not necessarily yours.

fdisk, while old fashioned, give you total control. If you used fdisk, it's
possible you selected an extended partition and don't remember - although I
suspect you used Disk Druid, or DiskDrake {I think the Mandrake partition
editor is called?}, and this is where your extended partition comes from.

If you wanna be sure, use fdisk. You shouldn't ever create 4 primary partitions
on the one disk - while you CAN do it, it's a silly idea, because if you want
to change anything later, you are seriously screwed. AFAIK, even Partition
Magic can't convert a primary partitio to an extended/logical one without
deleting it first.

DaZZa

--
Address in header is spamblocked. ROT13 the following for email replies

 
 
 

Partioning - Lost Disk Space

Post by Matthew Planchan » Mon, 12 Nov 2001 20:37:17



> Disk Druid and the like are "smart" partitioning programs. They attempt to
> do what's "best" - best by someone elses definition, not necessarily
> yours.

> fdisk, while old fashioned, give you total control. If you used fdisk,
> it's possible you selected an extended partition and don't remember -
> although I suspect you used Disk Druid, or DiskDrake {I think the Mandrake
> partition editor is called?}, and this is where your extended partition
> comes from.

> If you wanna be sure, use fdisk. You shouldn't ever create 4 primary
> partitions on the one disk - while you CAN do it, it's a silly idea,
> because if you want to change anything later, you are seriously screwed.
> AFAIK, even Partition Magic can't convert a primary partitio to an
> extended/logical one without deleting it first.

I don't think my Extended partition is mounted - this may be why I thought
that I had lost some disk space.

I'm planning to reinstall linux from scratch would it be a good idea for me
to make all my linux partitions into a single partition before I let
DiskDrake have another go at it. Is it possible that a partition made by
the Red Hat install would not be recognised by DiskDrake?

Cheers,

Matt.

 
 
 

Partioning - Lost Disk Space

Post by DaZZ » Tue, 13 Nov 2001 06:59:54




>> Disk Druid and the like are "smart" partitioning programs. They attempt to
>> do what's "best" - best by someone elses definition, not necessarily
>> yours.
>> fdisk, while old fashioned, give you total control. If you used fdisk,
>> it's possible you selected an extended partition and don't remember -
>> although I suspect you used Disk Druid, or DiskDrake {I think the Mandrake
>> partition editor is called?}, and this is where your extended partition
>> comes from.
>> If you wanna be sure, use fdisk. You shouldn't ever create 4 primary
>> partitions on the one disk - while you CAN do it, it's a silly idea,
>> because if you want to change anything later, you are seriously screwed.
>> AFAIK, even Partition Magic can't convert a primary partitio to an
>> extended/logical one without deleting it first.

>I don't think my Extended partition is mounted - this may be why I thought
>that I had lost some disk space.

You don't mount your extended partition - you mount the loigical partitions
which exist inside it.

This is a snapshot of the partition table on my primary IDE drive.

Disk /dev/hda: 255 heads, 63 sectors, 2490 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1       653   5245191   83  Linux
/dev/hda2           654      2490  14755702+   5  Extended
/dev/hda5           654      1567   7341673+  83  Linux
/dev/hda6          1568      1959   3148708+  83  Linux
/dev/hda7          1960      2451   3951958+  83  Linux
/dev/hda8          2452      2490    313236   82  Linux swap

And this is my mounted filesystem.

/dev/hda1 on / type ext2 (rw)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/hda7 on /home type reiserfs (rw)
/dev/hda5 on /usr type reiserfs (rw)
/dev/hda6 on /var type reiserfs (rw)

Notice that it doesn't reference /dev/hda2 {the extended partition}, but DOES
reference hda5, hda6, hda7 & hda8.

Quote:>I'm planning to reinstall linux from scratch would it be a good idea for me
>to make all my linux partitions into a single partition before I let
>DiskDrake have another go at it. Is it possible that a partition made by
>the Red Hat install would not be recognised by DiskDrake?

If you want exact control over what goes where, don't use Diskdrake. Simple.
If you use Diskdrake, I almost guarantee you'll get an extended/logical
partition set unless you have only one partition.

For a system with only one user, a single partition filesystem is not such
a bad thing - so do it this way if you feel happier using only primary
partitions.

There's no loss associated with using an extended partition - it's only for
logical organisation.

DaZZa

--
Address in header is spamblocked. ROT13 the following for email replies

 
 
 

Partioning - Lost Disk Space

Post by Matthew Planchan » Tue, 13 Nov 2001 07:43:46



> <snipped>
> There's no loss associated with using an extended partition - it's only
> for logical organisation.

Cheers,

Matt.

 
 
 

1. Re-partioning & Re-partioning & Re-partioning & Re-partioning

On Wed, 07 Nov 2001 11:25:08 GMT, Matthew Planchant

What does fdisk or cfdisk say about the partition table layout?

The amount of mounted usable space will vary depending on how the
filesystems are initialized, since the filesystem overhead will vary.

Best regards, Paul

Paul Sherwin Consulting     22 Monmouth Road, Oxford OX1 4TD, UK
Phone  +44 (0)1865 721438   http://www.psherwin.strayduck.com

2. Where is the 'build-guile' script?

3. disk partions (iI am installing 3 OS'es, need > then 4 partions)

4. Bug added to cs4232.c with CONFIG_SOUND_WAVEFRONT addition

5. Lost content of files when disk space ran out

6. firwire

7. Getting back lost disk space

8. Capacity Planning Class

9. Help: Lost disk space

10. Lost disk space

11. Lost disk space! (Wierd!)

12. x-86, Lost disk space on a pcfs partition...

13. lost disk space!