-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello all!
I was about to make a new partition on my hard drive when fdisk reported:
Command (m for help): n Command action l logical (5 or over) p primary partition (1-4) l No free sectors available
Now I know full well there are more sectors available as I am using less than half of the drive!
Disk /dev/hda: 120.0 GB, 120034123776 bytes 255 heads, 63 sectors/track, 14593 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/hda1 * 1 13 104391 83 Linux /dev/hda2 14 4807 38507805 f W95 Ext'd (LBA) /dev/hda5 14 1288 10241406 83 Linux /dev/hda6 1289 3200 15358108+ 83 Linux /dev/hda7 3201 3264 514048+ 82 Linux swap / Solaris /dev/hda8 3265 4539 10241406 8e Linux LVM /dev/hda9 4540 4794 2048256 8e Linux LVM /dev/hda10 4795 4807 104391 83 Linux
As you can see I should have 16065 cylinders but cannot access them. I am as sure as I can be that once upon a time (probably when I made the last 3 partitions for my Rawhide distro) that the end block for the extended partition (#2) was a greater number, and in fact when running Anaconda trying to install FC6Pre the partitioning program shows a LOT of free space on the drive so I figure that either I can't make new partitions because 8 is the limit (I don't know what the actual limit is but I discount this as a possibility as fdisk seems to be showing me that /dev/hda10 is butted up against the end of the drive) or something nasty has re-written my MBR to tell fdisk there's no more room.
So, fellows (and ladies!) My questions are: Is there a definite maximum number of partitions allowed on a drive, and have I reached it?
how do I recalculate drive parameters and fix the MBR (if that is the problem.
I am resisting the urge to wipe and re-install as this represents 3 linux distros and it would likely take a month to fully recover them!
Scott
oldman talbotscott@cox.net writes:
Now I know full well there are more sectors available as I am using less than half of the drive!
Ah, but you're using all the sectors in your extended partition. You need to either [carefully] grow hda2, or add another primary extended partition (say, hda3) which covers the rest of the drive, into which you can add more logical partitions.
As you can see I should have 16065 cylinders but cannot access them.
You have 14593 cylinders. You have used 4807 of them. You should have 9786 left.
Is there a definite maximum number of partitions allowed on a drive, and have I reached it?
I have drives with 14 partitions on them. I've had up to 25 before.
oldman wrote:
Is there a definite maximum number of partitions allowed on a drive, and have I reached it?
dj+fedora@delorie.com wrote:
I have drives with 14 partitions on them. I've had up to 25 before.
I believe there are three caveats to that:
1. The SCSI subsystem only allows 15 (I think) partitions on a disk. And with the standard MS-DOS style partition tables, that always includes all four primary partitions. So one primary + eleven logical partitions is the limit.
2. The libata support for SATA disks uses the SCSI subsystem, and inherits the same limitations.
3. libata support for IDE (= PATA) has been merged and is scheduled to be available for 2.6.19. It won't be the *default* set of drivers, and it's very unlikely to become the default *during* a Fedora Core release, but given Fedora's aims and engineers, I would not be surprised to see this turned on in official Fedora kernels for the FC7 release. (If not, FC8. We're probably talking the next year or so.)
When libata support *is* turned on for parallel IDE, then existing partitions on IDE devices above /dev/hdx15 will become unmountable.
At the same time, the rest of the partitions will be known as /dev/sdx.
Standard Fedora installs will not be affected by this, since they always mount by label. Anyone who has changed this may have to change it back...
Hope this helps,
James.
On Mon, 2 Oct 2006, oldman wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello all!
I was about to make a new partition on my hard drive when fdisk reported:
Command (m for help): n Command action l logical (5 or over) p primary partition (1-4) l No free sectors available
I am sure it is correct! :-)
Now I know full well there are more sectors available as I am using less than half of the drive!
Disk /dev/hda: 120.0 GB, 120034123776 bytes 255 heads, 63 sectors/track, 14593 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/hda1 * 1 13 104391 83 Linux /dev/hda2 14 4807 38507805 f W95 Ext'd (LBA) /dev/hda5 14 1288 10241406 83 Linux /dev/hda6 1289 3200 15358108+ 83 Linux /dev/hda7 3201 3264 514048+ 82 Linux swap / Solaris /dev/hda8 3265 4539 10241406 8e Linux LVM /dev/hda9 4540 4794 2048256 8e Linux LVM /dev/hda10 4795 4807 104391 83 Linux
A you can see I should have 16065 cylinders but cannot access them. I am as sure as I can be that once upon a time (probably when I made the last 3 partitions for my Rawhide distro) that the end block for the extended partition (#2) was a greater number, and in fact when running Anaconda trying to install FC6Pre the partitioning program shows a LOT of free space on the drive so I figure that either I can't make new partitions because 8 is the limit (I don't know what the actual limit is but I discount this as a possibility as fdisk seems to be showing me that /dev/hda10 is butted up against the end of the drive) or something nasty has re-written my MBR to tell fdisk there's no more room.
From what you post above there is no remaining space in the logical partition.
Your logical partition is full. Look at the table above. It says your logical partition goes from 14-4807. If you look at the allocations you have filled all of the space from 14-4807, so it is full.
What does the v command show??
Will it let you make another primary partition?? I cannot remember if you can have 2 extended partitions or not.
So, fellows (and ladies!) My questions are: Is there a definite maximum number of partitions allowed on a drive, and have I reached it?
You are only allowed 4 primary partitions. You have 2. In order to have more than 4 partitions you must make an extended partition.
Before LVM my disks routinely had 12-14 partitions. I think the limit is 16 or so. That might no longer be true since I am doing that from memory and that limit was during the 2.2/2.4 kernel days.
how do I recalculate drive parameters and fix the MBR (if that is the problem.
I doube there is anything wrong with the MBR. If anything you have partitioned yourself into a corner. If you can make another extended partition make one that fills the rest of the empty space on the disk. Again though I cannot remember if you can have more than one.
I found this in the fdisk man page:
A DOS type partition table can describe an unlimited number of partitions. In sector 0 there is room for the description of 4 partitions (called primary). One of these may be an extended partition; this is a box holding logical partitions, with descriptors found in a linked list of sectors, each preceding the corresponding logical partitions. The four primary partitions, present or not, get numbers 1-4. Logical partitions start numbering from 5.
This seems to me to imply that you can only have 1 extended partition, in which case you might be hosed. If you are brave you might be able to use parted to extend the logical partition. Read the info pg (pinfo parted) carefully. I did this a looooooong time ago and it worked but.....
I am resisting the urge to wipe and re-install as this represents 3 linux distros and it would likely take a month to fully recover them!
Good luck.
Regards,
On Mon, 2 Oct 2006, Tom Diehl wrote:
Will it let you make another primary partition?? I cannot remember if you can have 2 extended partitions or not.
i don't think so, not the last time i looked. in any case, if you think about it, being able to create a *second* extended partition for linux would create all sorts of weird numbering problems for those logical partitions inside.
rday
At 11:02 AM -0400 10/2/06, Tom Diehl wrote: ...
Will it let you make another primary partition?? I cannot remember if you can have 2 extended partitions or not.
I think one /can/, but it is contrary to specification (which you showed below), which says there can be only one Extended partition in a Basic partition table. There can certainly be both an Extended and an LVM partition in a Basic partition table.
On Mon, 2 Oct 2006, oldman wrote: ...
I am resisting the urge to wipe and re-install as this represents 3 linux distros and it would likely take a month to fully recover them!
Make an LVM partition. Either just start using it for new partitions, or set up suitable logical volumes on it and copy your existing partitions to them. You could then toss the Extended partition and make its space into LVM and use either as part of the same LVM Volume Group or as a separate VG.
Or, make a backup. It sounds like you don't have one. Get a DVD writer (if you don't have one yet) and some DVD-R disks, and make a dump backup of each partition. (I can help with this if needed; I had to split the dump up into 4.5 GiB "tapes" and dump to a temp file which was then written to DVD. Growisofs is recommended over cdrecord.)
On Mon, 2 Oct 2006, Tony Nelson wrote:
At 11:02 AM -0400 10/2/06, Tom Diehl wrote: ...
Will it let you make another primary partition?? I cannot remember if you can have 2 extended partitions or not.
I think one /can/, but it is contrary to specification (which you showed below), which says there can be only one Extended partition in a Basic partition table. There can certainly be both an Extended and an LVM partition in a Basic partition table.
but wouldn't that LVM correspond to just a primary partition? thus not violating the general rule of only one extended partition?
rday
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Robert P. J. Day wrote:
On Mon, 2 Oct 2006, Tony Nelson wrote:
At 11:02 AM -0400 10/2/06, Tom Diehl wrote: ...
Will it let you make another primary partition?? I cannot remember if you can have 2 extended partitions or not.
I think one /can/, but it is contrary to specification (which you showed below), which says there can be only one Extended partition in a Basic partition table. There can certainly be both an Extended and an LVM partition in a Basic partition table.
but wouldn't that LVM correspond to just a primary partition? thus not violating the general rule of only one extended partition?
rday
Thanks to dj, Tom, Robert, Tony for your help. Fdisk would let me make a new primary partition, but would not let me make it an extended partition (as long as my memory is correct and all I needed to do was change the type to 0f). I was able to resize the partition with parted, and now have added some logical partitions.
Scott
At 12:28 PM -0400 10/2/06, Robert P. J. Day wrote:
On Mon, 2 Oct 2006, Tony Nelson wrote:
At 11:02 AM -0400 10/2/06, Tom Diehl wrote: ...
Will it let you make another primary partition?? I cannot remember if you can have 2 extended partitions or not.
I think one /can/, but it is contrary to specification (which you showed below), which says there can be only one Extended partition in a Basic partition table. There can certainly be both an Extended and an LVM partition in a Basic partition table.
but wouldn't that LVM correspond to just a primary partition? thus not violating the general rule of only one extended partition?
Yes.
From: "Tony Nelson" tonynelson@georgeanelson.com
At 12:28 PM -0400 10/2/06, Robert P. J. Day wrote:
On Mon, 2 Oct 2006, Tony Nelson wrote:
At 11:02 AM -0400 10/2/06, Tom Diehl wrote: ...
Will it let you make another primary partition?? I cannot remember if you can have 2 extended partitions or not.
I think one /can/, but it is contrary to specification (which you showed below), which says there can be only one Extended partition in a Basic partition table. There can certainly be both an Extended and an LVM partition in a Basic partition table.
but wouldn't that LVM correspond to just a primary partition? thus not violating the general rule of only one extended partition?
Yes.
In an abstract sense I'd love to know what limits a disk to only one extended partition other than legacy and sloppy code. I've had two extended partitions on other systems before. I think I did that with the 2.0.x kernel tree at one time, too. All that's needed is simply traversing the partition tables sensibly.
{^_^}
jdow wrote:
From: "Tony Nelson" tonynelson@georgeanelson.com
At 12:28 PM -0400 10/2/06, Robert P. J. Day wrote:
On Mon, 2 Oct 2006, Tony Nelson wrote:
At 11:02 AM -0400 10/2/06, Tom Diehl wrote: ...
Will it let you make another primary partition?? I cannot remember if you can have 2 extended partitions or not.
I think one /can/, but it is contrary to specification (which you showed below), which says there can be only one Extended partition in a Basic partition table. There can certainly be both an Extended and an LVM partition in a Basic partition table.
but wouldn't that LVM correspond to just a primary partition? thus not violating the general rule of only one extended partition?
Yes.
In an abstract sense I'd love to know what limits a disk to only one extended partition other than legacy and sloppy code. I've had two extended partitions on other systems before. I think I did that with the 2.0.x kernel tree at one time, too. All that's needed is simply traversing the partition tables sensibly.
{^_^}
If I remember correctly, it is a limit in the DOS partition table specifications. In practice, I believe you can have both a DOS and a Linux extended partition. If I remember correctly, DOS/Windows will ignore a Linux extended partition, but Linux will see both. It has been a long time sense I played with this, so my memory could be wrong, or things may have changed to follow the specifications better.
Now, for the original problem. I wonder if parted can expand the logical partition to use all the free space. This would give you room for more logical partitions. I have not tried this, so I do not know if it will work. It might be worth playing with on a drive that you can afford to trash...
Mikkel