I'm going to buy a server to host an Oracle database. The server will be running Red Hat Enterprise Linux 5. The server will have 6 hard drives. I know there is a limit of 4 primary partitions in Linux. Here is my question: Is the 4 partition limit per physical hard drive (so I could have 6 disks x 4 primary partitions = 24 primary partitions)? Or is the operating system only capable of supporting 4 primary partitions?

If the operating system can only support 4 primary partitions, how do I initialize the 6 disks? I want to maximize my storage capacity on the server.

Thanks, Chuck

  • Did you look up the difference between primary and extended partitions? If so, have you looked at LVM2? +1, Good question. – Tim Post Feb 27 '09 at 9:31

It isn't a limit of linux, but of the PC partition table format (invented by IBM I think), and therefore is obviously per drive.

Linux actually supports other partition table formats too though I wouldn't really reccommend them if you're running on PC hardware, they're mainly provided so it can co-exist with other operating systems and/or be booted by the firmware on hardware where those partition table formats are customarily used.

| improve this answer | |
  • Most newer computers (even BIOS computers) will support GPT just fine too. – Chris S Jul 24 '11 at 23:16

Yes there is a limit of 4 primary partitions PER hard drive, so you could have 24 total on your new server. You should also note that you pay a pretty severe performance penalty using extended partitions on most drives and that enabling extended partitions requires one primary partition, so you will only have 3 left (per drive).

If you want a truly flexible, redundant system, I would recommend creating a minimum number of primary partitions, using RAID10 to provide both redundancy (through mirroring) and concatenation, and then using the LVM to allow Linux to see the result as one big volume. Note that there is a definite performance penality for each layer of software abstraction you add, so at a minimum, find a hardware RAID controller.

Now for dealing with Oracle ... Oracle has the capability of dealing with its storage space in a wide variety of ways. You can install Oracle on a server built as I've described above, you can use Veritas to manage your disks, or you can allow Oracle to access the drives as raw devices (you only partition a couple for your operating system's use and it doesn't even recognize the other drives). Choosing the right configuration for an Oracle database really involves understanding how the database will be used (as well as redundancy and backup strategies). If you're new to Oracle, it would be wise to find a seasoned mentor.

| improve this answer | |
  • Do you have numbers or anything on the "pretty severe performance penalty using extended partitions"? I've never heard of that and honestly, I'd doubt it. – Joachim Sauer Feb 27 '09 at 9:39
  • I don't have any numbers handy, but can at least describe the "testing" I did. Using a linux LiveCD, I created partitions on a hard drive (some primary and some "logical" or "extended") and then ran: hdparm -Tt /dev/hda? where the ? is replaced by the number for the partition (primary are 1-4). – Steve Moyer Feb 27 '09 at 19:07

In general, you probably shouldn't bother with native (primary/extended) partitions, apart from one partition to boot from. Make everything else one partition, and use some volume manager like LVM.

That gives you much more flexibility (resizing, spanning multiple physical drives, SW RAID). It also has no limit on the number of partitions :-).

| improve this answer | |

Is there any reason that LVM2 is out of the question to manage the entire disk? I realize, sometimes .. yes, there is .. your boss may not want to introduce LVM2 because API hooks to manage it are string based and ugly ... but that's now almost fixed with the emerging liblvm2 (not lvm2cmd).

However, if you'd like some more information on how it helps you to never encounter this issue .. just update your question. I've marked this in favorites and given it +1.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy