Is it possible to extend a extended partition raw space in harddisk thru rhel 6

hi all,

As going thru LVM concepts in rhel 6, got hit with a question about "how to use the raw partition of an harddisk which extended volume is taken a bit"

please find the attached diagram...

is it possible to use this raw space with previously created extended partition without data loss or do we have to delete the previously created extended partition and create again with raw space ?

If the raw space is not in "in the middle" of two partitions and the cylinders are contiguous to the existing extended partition then you can do it directly with fdisk with little risk.

Note that you'll also need to extend the filesystem.

It's uncommon however to leave "raw" space like that since you cannot really use it - there are a few exceptions to the rule but usually they belong to very specialized software... TeraData comes to mi mind.

but once i created three primary partition and remaining raw space was 10G and i used that 5G from that 10G raw space for extended. after created that 5G of extended i was not able to created the remaining raw space 5G for extended.
it messaged like "no free sectors available"

it means i cant use the raw 5G as extended with fdisk command ??

This is why LVM is useful. LVM doesn't care about contiguous space. To LVM, any block device space is usable space, doesn't matter where it is.

But I'm assuming you aren't running LVM. In order to give a more detailed answer, need to know what sort of partition table youre using (MSDOS?) and what type of partitions (primary or extended) each one is.

Typically it's no big deal to extend the partition, then grow the filesystem into the new space.

@ lupin..the..3rd

Actually i am asking about the raw partition under a harddisk of 3 primary and 1 extended,remaining raw partition << pls look in to the diagram for more explanation.

What does "raw partition" mean? By "raw partition", you mean unpartitioned space? If so, the process is easy.

  1. Unmount the filesystem. If you cannot unmount it, then boot the PC using a live CD.
  2. Use Fdisk to increase the size of the partition.
  3. If the kernel was unable to re-read the partition table, reboot.
  4. Now use resize2fs to grow the filesystem into the new space.
1 Like

if you are ready to use tool to accomodate your disks remaining raw space to any partition and you don't have problem in using tools then you can try gparted live CD ISO from this link GParted -- Download

boot your machine using this LIVE CD and use its GUI interface to resize your native Linux partitions.. you can check procedure at GParted -- GParted Manual

1 Like

@parth buch, thanks for your suggestion, will give a try and update you :slight_smile:

You can also just use fdisk or parted instead of gparted.

If you show us you existing disk partition layout, it would help us help you.

@ fpmurphy i have tried with fdisk, it throws message like no free sectors available to use.
just i have this scenario in my Redhat linux training center.
any how thanks for your suggestion.

throws message like? Tell us what it actually says, and better yet, show us what you actually do.

message is "no free sector to available"

And what did you do? You were already asked for partition layout, you might as well show us the output of 'p'.

@corona688

Actually it was an situation met at training centre, once the message thrown as "no free sector avail"
just dropped that case.reached here to get solution for that scenario.