1834449 Members
1916 Online
110067 Solutions
New Discussion

Re: extending max_pe

 
bassey essien_1
Frequent Contributor

extending max_pe

I want to change the max_pe on a volume to some
larger number in other to accomodate the new
60 Gig disk. the default number was set at 1060 mb on an 8 gig disk. when i ran vgextend on older volume group, i could only get a minimal disk space increase, much of space on new disk still remains unclaimed. How do i change max_pe on an existing volume group.
thanks.
3 REPLIES 3
Bruce Regittko_1
Esteemed Contributor

Re: extending max_pe

Hi,

It is great to finally be able to read your posts!

Unfortunately, the maximum physical extents per physical volume can only be set at volume group creation with the vgcreate command. Whenever I create a new vg, I always try to anticipate what the largest disk I will add to it and set max_pe accordingly.

--Bruce
www.stratech.com/training
Darrel Louis
Honored Contributor

Re: extending max_pe

Bassey,

The maximum number of physical extents allowed per physical volume is 65,535. (Range is 1 - 65,535; Default is 1016; set using vgcreate -e)

When you're trying to add a disk to a VG and it's out of pe. The only way to proceed.
- Make a good backup
- Create a new VG with enough pe(vgcreate -e #####)
- Copy the data to new VG.

So, you need to create a new volume group.

Regards

Darrel

Dave Wherry
Esteemed Contributor

Re: extending max_pe

As the others said, it can only be changed when you create the volume group.
At the risk of sounding too obvious, if you do not care what your volume group number is and your data is on file systems, not raw, you can save a lot of time.
Create a new volume group with the new disk and new logical volumes.
Create and mount new file systems. Say you have a file system named /data in your old volume group. Create /data2 in the new.
Simply copy your data from the old to the new.
Unmount both and remount the new as /data. Edit /etc/fstab to reflect the changes.

There's nothing special about this. It just saves you the backup and restore time. Copying from disk to disk is much faster.