Operating System - Linux
1835667 Members
2716 Online
110082 Solutions
New Discussion

Re: Adding new partition - or not

 
SOLVED
Go to solution
Ian Dennison_1
Honored Contributor

Adding new partition - or not

I am trying to initialise a new partition on the rest of the boot disk, using the command line (no console access).

I have created the new partition using "fdisk" (results listed below) but the "mkfs" command refuses to play ball. Anything obvious going opn here?

Share and Enjoy! Ian

[root@dcslnx10 root]# fdisk -l /dev/cciss/c0d0

Disk /dev/cciss/c0d0: 146.8 GB, 146804797440 bytes
255 heads, 63 sectors/track, 17848 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/cciss/c0d0p1 * 1 13 104391 83 Linux
/dev/cciss/c0d0p2 14 1415 11261565 83 Linux
/dev/cciss/c0d0p3 1416 1669 2040255 82 Linux swap
/dev/cciss/c0d0p4 1670 17848 129957817+ 5 Extended

[root@dcslnx10 root]# mkfs -t ext3 /dev/cciss/c0d0p4

mke2fs 1.32 (09-Nov-2002)
mkfs.ext3: No such device or address while trying to determine filesystem size
[root@dcslnx10 root]#

LINUX - Making the simple things unecessarily complicated!
Building a dumber user
5 REPLIES 5
Sergejs Svitnevs
Honored Contributor
Solution

Re: Adding new partition - or not

You can create an FS on either a primary or a logical partition. The extended partition is like a disk drive; it has a partition table that points to one or more logical partitions.

So try to change /dev/cciss/c0d0p4 type from 5 to 83 an run mkfs again.

Regards,
Sergejs

Ivan Ferreira
Honored Contributor

Re: Adding new partition - or not

Your partition n° 4 is and extended partition, you cannot create a filesystem on it. You must create a logical partition in the extended partition, so you will get c0d0p5, in this partition you can create the filesystem.

Run fdisk again and create the logical paritition, just type "n" and ask the questions. Or you may delete the extended partition and create a primary partition instead of the extended paritition. If you create a primary partition, you will be able to create a filesystem in c0d0p4.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ian Dennison_1
Honored Contributor

Re: Adding new partition - or not

Thanks gents, I had forgotten about the "Upper Memory Bracket" for Disk partitions on Linux.

Problem solved, Share and Enjoy! Ian
Building a dumber user
Matti_Kurkela
Honored Contributor

Re: Adding new partition - or not

Blame the legacy of PC architecture, not Linux.

The PC partition table in the beginning of the disk can only handle four partitions. These are now called "primary" partitions. To get more than four, you must use one of the four slots to build an "extended" partition. Within the extended partition, you can define as many "logical" partitions as you want.

Why this complexity? Well, when using a "standard" PC Master Boot Record at the beginning of the disk, you can use only primary partitions for booting an operating system. If you install LILO or GRUB or any other "advanced" bootloader to the Master Boot Record, you can usually use extended partitions for booting, too.

You have created /dev/cciss/c0d0p4 as an extended partition, which is just a shell for logical partitions and not really useful by itself.

Use fdisk to create another new partition, of type "logical". Because your primary partition slots are already filled, fdisk will probably default to creating a logical partition without bothering to ask.
Note that the logical partition will automatically be located inside the area occupied by the extended partition.

After creating a logical partition, you can set its type ID to Linux (83) as usual.
If this disk contains your root filesystem, you must boot before the change is visible to the kernel.
MK
Ian Derringer
Regular Advisor

Re: Adding new partition - or not

Gentlemen,
Let's say I have an array Lun 0 with 8x72GB RAID1+0 out on the SAN (MSA1500) and presented to server A and the disk designator is "SDA" - Now, I need to add 4 more 72Gb disks to this volume, no big deal from the controller level. Once the expansion done at the controller, how would Linux handle this expansion and how I go about fdisk this volume /dev/sda and give it more space?? Any ideas??

Thank you in advance.

Ian