LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-24-2008, 12:05 PM   #1
msivadass
LQ Newbie
 
Registered: Nov 2007
Location: India
Distribution: RHEL
Posts: 26

Rep: Reputation: 15
Exclamation How to increace the number of partition (more than 15) in rhel 5


Dear Frnds

Im trying to create logical partition in RHEL 5 by using FDISK Command
But Im getting the error "The maximum Number of partition has been created". I have already created 15 partition(Including 3 Primary) on the same Harddisk.Now i want create some more on the same disk. Is there any solution to resolve this issue. Pls let me know. Thanks in advance

Last edited by msivadass; 05-24-2008 at 12:11 PM. Reason: To brief
 
Old 05-24-2008, 12:09 PM   #2
stefan_nicolau
Member
 
Registered: Jun 2005
Location: Canada
Distribution: Debian Etch/Sid, Ubuntu
Posts: 529

Rep: Reputation: 32
There are no solutions. DOS partition tables are limited to 4 primary partitions containing 4 logical partitions each. Guess who you should be thanking...

EDIT: what are you trying to do that requires so many partitions?
EDIT 2: As pixellany pointed out, this is not the reason for the limitation.

Last edited by stefan_nicolau; 05-25-2008 at 08:21 AM. Reason: mistake
 
Old 05-24-2008, 12:20 PM   #3
msivadass
LQ Newbie
 
Registered: Nov 2007
Location: India
Distribution: RHEL
Posts: 26

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by stefan_nicolau View Post
There are no solutions. DOS partition tables are limited to 4 primary partitions containing 4 logical partitions each. Guess who you should be thanking...

EDIT: what are you trying to do that requires so many partitions?
Im trying Xen VMs. Rigth now im having 5 Xen guest os i want increase to more.
 
Old 05-24-2008, 12:27 PM   #4
stefan_nicolau
Member
 
Registered: Jun 2005
Location: Canada
Distribution: Debian Etch/Sid, Ubuntu
Posts: 529

Rep: Reputation: 32
I think xen allows you to use files as disk devices for your guests.
 
Old 05-24-2008, 01:17 PM   #5
brianmcgee
Member
 
Registered: Jun 2007
Location: Munich, Germany
Distribution: RHEL, CentOS, Fedora, SLES (...)
Posts: 399

Rep: Reputation: 40
Use logical volume management [1].

[1] http://www.redhat.com/magazine/009jul05/features/lvm2/
 
Old 05-24-2008, 01:33 PM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by stefan_nicolau View Post
There are no solutions. DOS partition tables are limited to 4 primary partitions containing 4 logical partitions each.
Umm--I don't think this is quite correct. The Legacy standard (IDE, DOS, whatever) has a limit more like 60 partitions.

You are allowed 4 partitions in the MBR. To have more than 4 total partitions, one of the first four can be an "extended" partition, which is really just the beginning of a linked list to the logical partitions.
(Primary partitions do not contain logicals.)

The limit of 15 is a SATA feature--I have no clue why.

PS: Even in SATA, the basic architecture is the same--ie 4 partitions in the MBR, one of which can be an extended

Last edited by pixellany; 05-24-2008 at 01:38 PM. Reason: Afterthought
 
Old 05-25-2008, 08:20 AM   #7
stefan_nicolau
Member
 
Registered: Jun 2005
Location: Canada
Distribution: Debian Etch/Sid, Ubuntu
Posts: 529

Rep: Reputation: 32
I've done a bit more searching and pixellany is correct (sorry for my mistake). You may have four primary partitions, of which one is marked as extended and contains several logical partitions/drives. If your disk is /dev/hdx, the error you get might be the result of trying to create a 5th primary partition. Do you have 3 primary partitions (with filesystems) and an extended partition, or is it 2 primary partitions and one extended? Also keep in mind that different partitioning tools have different limitations (the max. 4 logical partitions I was thinking about was a limitation of one of the tools I used in the past).

/usr/src/linux/Documentation/devices.txt says:
Code:
  3 block	First MFM, RLL and IDE hard disk/CD-ROM interface
		  0 = /dev/hda		Master: whole disk (or CD-ROM)
		 64 = /dev/hdb		Slave: whole disk (or CD-ROM)

		For partitions, add to the whole disk device number:
		  0 = /dev/hd?		Whole disk
		  1 = /dev/hd?1		First partition
		  2 = /dev/hd?2		Second partition
		    ...
		 63 = /dev/hd?63	63rd partition

		For Linux/i386, partitions 1-4 are the primary
		partitions, and 5 and above are logical partitions.
		Other versions of Linux use partitioning schemes
		appropriate to their respective architectures.
...
 22 block	Second IDE hard disk/CD-ROM interface
		  0 = /dev/hdc		Master: whole disk (or CD-ROM)
		 64 = /dev/hdd		Slave: whole disk (or CD-ROM)

		Partitions are handled the same way as for the first
		interface (see major number 3).
...
The next major devices are 33,34,56,57,88,89,90,91
...
  8 block	SCSI disk devices (0-15)
		  0 = /dev/sda		First SCSI disk whole disk
		 16 = /dev/sdb		Second SCSI disk whole disk
		 32 = /dev/sdc		Third SCSI disk whole disk
		    ...
		240 = /dev/sdp		Sixteenth SCSI disk whole disk

		Partitions are handled in the same way as for IDE
		disks (see major number 3) except that the limit on
		partitions is 15.
...
 65 block	SCSI disk devices (16-31)
		  0 = /dev/sdq		17th SCSI disk whole disk
		 16 = /dev/sdr		18th SCSI disk whole disk
		 32 = /dev/sds		19th SCSI disk whole disk
		    ...
		240 = /dev/sdaf		32nd SCSI disk whole disk

		Partitions are handled in the same way as for IDE
		disks (see major number 3) except that the limit on
		partitions is 15.
...
The next major numbers are 66,67,68,69,70,71,128,129,131,132,133,134,135
Therefore, SCSI supports 15 partitions while ide supports 63. The limitations of the scsi subsystem also apply to sata and usb. On newer (libata) systems, ide devices are also named sdx and share the same device numbers. They are therefore also limited to 15 partitions.

For the anyone wondering how many hard drives are supported by linux: you can have 10 master/slave ide pairs (max. 20 devices) and 256 scsi/sata/usb/new ide devices (names are sda,...,sdz,sdaa,sdab,...,sdiv).

If you really, really, really need more partitions, there may be kernel patches available to increase that number (by reallocating device numbers from somewhere else), but I strongly discourage you from trying. I suggest that you use either LVM or simple files with disk images.

Last edited by stefan_nicolau; 05-25-2008 at 08:22 AM. Reason: typo
 
Old 05-26-2008, 07:09 AM   #8
msivadass
LQ Newbie
 
Registered: Nov 2007
Location: India
Distribution: RHEL
Posts: 26

Original Poster
Rep: Reputation: 15
Thamks Guys for ur valuable feed back.
My problem is solved. Im using file as a partition for my XEN guest.







Quote:
Originally Posted by stefan_nicolau View Post
I've done a bit more searching and pixellany is correct (sorry for my mistake). You may have four primary partitions, of which one is marked as extended and contains several logical partitions/drives. If your disk is /dev/hdx, the error you get might be the result of trying to create a 5th primary partition. Do you have 3 primary partitions (with filesystems) and an extended partition, or is it 2 primary partitions and one extended? Also keep in mind that different partitioning tools have different limitations (the max. 4 logical partitions I was thinking about was a limitation of one of the tools I used in the past).

/usr/src/linux/Documentation/devices.txt says:
Code:
  3 block	First MFM, RLL and IDE hard disk/CD-ROM interface
		  0 = /dev/hda		Master: whole disk (or CD-ROM)
		 64 = /dev/hdb		Slave: whole disk (or CD-ROM)

		For partitions, add to the whole disk device number:
		  0 = /dev/hd?		Whole disk
		  1 = /dev/hd?1		First partition
		  2 = /dev/hd?2		Second partition
		    ...
		 63 = /dev/hd?63	63rd partition

		For Linux/i386, partitions 1-4 are the primary
		partitions, and 5 and above are logical partitions.
		Other versions of Linux use partitioning schemes
		appropriate to their respective architectures.
...
 22 block	Second IDE hard disk/CD-ROM interface
		  0 = /dev/hdc		Master: whole disk (or CD-ROM)
		 64 = /dev/hdd		Slave: whole disk (or CD-ROM)

		Partitions are handled the same way as for the first
		interface (see major number 3).
...
The next major devices are 33,34,56,57,88,89,90,91
...
  8 block	SCSI disk devices (0-15)
		  0 = /dev/sda		First SCSI disk whole disk
		 16 = /dev/sdb		Second SCSI disk whole disk
		 32 = /dev/sdc		Third SCSI disk whole disk
		    ...
		240 = /dev/sdp		Sixteenth SCSI disk whole disk

		Partitions are handled in the same way as for IDE
		disks (see major number 3) except that the limit on
		partitions is 15.
...
 65 block	SCSI disk devices (16-31)
		  0 = /dev/sdq		17th SCSI disk whole disk
		 16 = /dev/sdr		18th SCSI disk whole disk
		 32 = /dev/sds		19th SCSI disk whole disk
		    ...
		240 = /dev/sdaf		32nd SCSI disk whole disk

		Partitions are handled in the same way as for IDE
		disks (see major number 3) except that the limit on
		partitions is 15.
...
The next major numbers are 66,67,68,69,70,71,128,129,131,132,133,134,135
Therefore, SCSI supports 15 partitions while ide supports 63. The limitations of the scsi subsystem also apply to sata and usb. On newer (libata) systems, ide devices are also named sdx and share the same device numbers. They are therefore also limited to 15 partitions.

For the anyone wondering how many hard drives are supported by linux: you can have 10 master/slave ide pairs (max. 20 devices) and 256 scsi/sata/usb/new ide devices (names are sda,...,sdz,sdaa,sdab,...,sdiv).

If you really, really, really need more partitions, there may be kernel patches available to increase that number (by reallocating device numbers from somewhere else), but I strongly discourage you from trying. I suggest that you use either LVM or simple files with disk images.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating and formatting a partion from unallocated space. Lassenc Linux - Newbie 4 03-20-2008 05:09 PM
problem mounting a linux partion from another ext3 partion fkeith Linux - Hardware 1 10-14-2007 07:33 PM
creating boot floppy from RHEL 4 ES system Hotchips Red Hat 3 02-10-2007 05:25 PM
how do i move files from my windows partion to my linux partion awesome_man Linux - Newbie 2 01-30-2004 12:51 PM
Error when try to partion on redHat 7.2 mangueJOE Linux - Software 3 03-07-2002 09:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration