Linux Partitioning Issue

Barry Brimer lists at brimer.org
Thu Dec 25 04:42:09 UTC 2008



On Thu, 25 Dec 2008, Geofrey Rainey wrote:

> I have a system with a raid 5 array which I have extended using HP array
> Configuration utility tools. You can see from the output of fdisk below
> That the disk has extra space:
>
> Disk /dev/cciss/c0d0: 366.8 GB, 366870733824 bytes
> 255 heads, 63 sectors/track, 44602 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        2563    20482875   8e  Linux
> LVM
> /dev/cciss/c0d0p3            2564        2690     1020127+  82  Linux
> swap / Solaris
> /dev/cciss/c0d0p4            2691       26761   193350307+   5  Extended
> /dev/cciss/c0d0p5            2691       26761   193350276   8e  Linux
> LVM
>
> However because of the limited size of the extended partition I am
> unable to
> use the extra space, I receive the following error:
>
> Command (m for help): n
> No free sectors available
>
> Command (m for help):
>
> Presumably I have to remove partition 5 and also the extended partition
> 4, then resize
> the extended partition to use the extra space. However I'm concerned
> that I'll loose all
> the data on partition 5, is there a way around this? I am wondering if I
> specify the start
> and end cylinders of partition 5 to be the same size will the data be
> preserved?

In my experience if you have the starting position as before, all should be fine.  Delete partition 5, delete 
partition 4, create the new partition 4, with the old start and the 
new end, create the new partition 5 with the same start cylinder for 
partition 5 with a new end cylinder and then run ext2online (RHEL/CentOS 
4) or resize2fs (RHEL/CentOS 5) to extend the filesystem.  As always, 
standard rules apply.  Backups are good, more backups on different systems 
/ disks are better.

Hope this helps.

Barry




More information about the redhat-list mailing list