"Vanco, Donald" wrote:

> Can someone point me to the correct hot-to to add a partition to an existing
> system or increase the size of one of my existing partitions.  I currently
> have hda1->4 and fdisk tells me I'll need to delete a current partition and
> add en extended partition to get to hda5.  I've got ~3GB unallocated drive
> space - I'd rather just stretch an existing partition.....
>
> Thanx
> Don

Holy smoke!

Four primary partitions are all there are.  Adding one is not possible without
converting partition 4 to an extended partition and creating logical partitions
within it.
Umm. check that, the partition with the biggest track number at its end.  It IS
possible to put partition 3 after partition 4, for example, but the primary
partitions are necessarily contiguous cylinders.


Stretching one can be done by partition magic, in the commercial arena, or by
using DiskDrake.  I haven't checked the latest DiskDrake, so I do not know if
it will preserve data on an ext2 partition yet.

I would really suggest backing up your "outermost partition", then deleting it
and making an extended partition including the rest of the disk.  Following
that, you can add logical partitions to taste, and leave a portion of the
extended partition open for future dedication.

I usually do leave some vacant space ready for a logical partition on
high-capacity disks.  My reasoning is that I can do some fstab entries and copy
commands and remove commands and a few more fstab entries if I need, for
example, to split /usr into /usr and /usr/local  .  Without the spare space, if
I need to do that sort of split (as I had to do to help someone who had created
/ too small) It would proceed like this:

1. Find a partition with lotsa space

2. Create a directory /lotsa_space/unplanned_part

3. Copy the overflowing stuff to /lotsa_space/unplanned_part  (in this case, it
was /var)

4. remove /var

5.
# ln -s /lotsa_space/unplanned_part /var

Very kludgy compared to leaving a little undedicated space on an extended
partition, but then that's why linux is so neat.  There are many ways to do
things!

Civileme

Reply via email to