Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to add partition using fdisk

Status
Not open for further replies.

stevenriz

IS-IT--Management
May 21, 2001
1,069
Hi everyone, I have this config currently...

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 28177 226227330 83 Linux
/dev/sda3 28178 32001 30716280 83 Linux
/dev/sda4 32002 36469 35889210 5 Extended
/dev/sda5 32002 36469 35889178+ 8e Linux LVM

I would like to remove sda2 and make that two separate partitions in order to have another dedicated mount point. Unfortunately when I remove sda2 and add a smaller sda2, when I try to do another add partition, I get no free sectors available
Command (m for help): n
No free sectors available

So even though the disk looks like this, I cannot squeeze another file system in there. Am I out of luck or is there a way around it? I tried adding a LV but I get the "no free sectors available" message...

thanks!
 
You can only have 4 primary partitions.
If you look at your existing structure, you have 4 primaries, one of which (sda4) is an extended partition (which should allow another 4 children.
I would guess that when you remove sda2 you're replacing it with another primary. That would cause you to run out of primaries again.
I guess you need to add an extended and then add two children of that extended.
Try gooling for "extended partitions" and I'm sure you'll get a better explanation.


Trojan.
 
ya I know, I don't get the (e)xtended options this is all I get... l or p :( not a huge deal, I just want to fix it if possible...

Command action
l logical (5 or over)
p primary partition (1-4)
 
You want a logical (non-primary) partition. But that is the least of your problems. Unless you want to backup what you have, re-partition and possibly re-install the OS just use the set up you currently have. From my perspective, you've painted yourself into a corner.

More info might prove useful. Posting your fstab might shed some light on the situtation or comfirm my suspicions.

Lorenzo Wacondo (System Administrator)

## Just because you can do something doesn't mean you should.
 
It may be possible, but will certainly be dangerous, to redo your partitions without losing the data. You should be able to do the following, but you would need to modify your /etc/fstab at the same time.

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 32001 226227330 5 Linux
/dev/sda5 14 28177 226227330 83 Linux
/dev/sda6 28178 32001 30716280 83 Linux
/dev/sda4 32002 36469 35889210 5 Extended
/dev/sda7 32002 36469 35889178+ 8e Linux LVM

Of course I have never tried it, so you may be out of luck.

Also, have you tried qtParted?


pansophic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top