On 10/18/06, Jay Leafey jay.leafey@mindless.com wrote:
I just finished playing this "game", though with a SAN volume. It took a couple of steps to take advantage of the extra space. First, the SAN manager extended the volume from 100G to 200G. I idled everything referencing the drive by disabling the volume group ( vgchange --available n vgname ). I then ran fdisk against the volume, noting the starting cylinder of the only partition on the drive. I deleted the partition, recreated it using the same starting cylinder and let fdisk figure out the last usable cylinder on the drive, reset the partition type to LVM, and wrote the partition table. At this point I had to reboot to get the system to re-read the partition table. Once it came back up I used pvresize to extend the physical volume to use the additional space in the partition. After that, vgdisplay showed the additional space as available for allocation. This was complicated by the fact that it was actually a two-node cluster (RHCS and GFS) so I had to reboot both nodes before running pvresize.
I was originally just going take the easy way out by creating a second partition/physical volume to use the additional space, but it seemed inelegant. I'm unlikely to ever extend this LUN more than once, but you just never know!
Hi and thanks for letting me know that I'm not the only one with this situation. And as it seems there is no straightforward and recommended way to do this.
I have experimented and practiced a little with a CentOS installation on VMware to see that both ways of doing this will work. During the last couple of days I've been backing up my volume for safety. Probably on Sunday I will use my practice and I will post my exact steps.
Although a bit "raw" I still prefer editing the original partition (as described above) than adding extended partitions when you grow you "exported disk" (and I most probably will add more disks to my RAID5 volume in the future). Then you always have a simple and clean partition table.
I also think this scenario should be mentioned in the LVM Howto "Common Tasks", and the two (as I know) ways of doing this. Or is this scenario very uncommon?
Regards, Christian
-- Jay Leafey - Memphis, TN jay.leafey@mindless.com _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos