primary partition limit on Linux
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
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.
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.
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 :-).