[CentOS] Resizing a PV that belongs within a Volume Group?

Fri Feb 19 17:54:35 UTC 2010
Keith Keller <kkeller at wombat.san-francisco.ca.us>

On Fri, Feb 19, 2010 at 12:23:31PM +0100, Alexander Dalloz wrote:
> 
> Given the partition which is a physical volume can be enlarged because
> there is free space directly after the end of the current partition, you
> then can do following very easily:
> 
> 1) fdisk /dev/<device>
> 1a) delete the partition to enlarge
> 1b) re-create the partition from the same starting point to the new size
> 1c) save the changes
> 
> 2) partprobe /dev/<device>
>    to let the kernel know about the change

Will this work if any partitions on <device> are mounted?  When I have
run fdisk to modify a partition table, the kernel complains that it
can't reread the partition table if there are mounted filesystems on the
target disk.  If the root filesystem is on the target disk, a reboot
might be required.  (In the past, fdisk has alerted the kernel if
there's been a partition table change, so partprobe might not be
needed.)

And of course, have backups when messing with the partition table.  :)

--keith

-- 
kkeller at speakeasy.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.centos.org/pipermail/centos/attachments/20100219/4badfbb2/attachment-0005.sig>