1827283 Members
3520 Online
109717 Solutions
New Discussion

Resizable PVs.

 
Xavier Pitz_1
Advisor

Resizable PVs.

Hello,

I have a server with a disk array connected to it. On this disk array I can map some LUNs to my server. At the beginning I start with one 5 Gb lun. Then I pvcreate on this disk. Aftewards I extend this LUN by an extra 5 Gb. My lun is now 10 Gb. How to increase the number of PEs on this LUN. There's no pvresize command. There's pvchange but I was not able to find a relevant syntax to do what I want.

Regards,
2 REPLIES 2
Eugeny Brychkov
Honored Contributor

Re: Resizable PVs.

I afraid that you should remove this PV from volume group, recreate PV using 'pvcreate -f' and then include it back to vg
Eugeny

Re: Resizable PVs.

Sorry Xavier, I don't think you can do this at all with LVM. Perhaps you'd have done better to create another seperate 5GB LUN and add that into the volume group the original LUN was in.

If you want to keep the LUN at 10GB your going to have to:

1. backup the data on the LUN.
2. lvremove any logical volumes on the LUN.
3. vgreduce the LUN out of the volume group.
4. run diskinfo on the LUN to make sure you can now see the full 10GB.
5. recreate the LUN for LVM using pvcreate -f
6. You can now *try* to add the LUN back into the volume group, but if the maximum number of physical extents per physical volume' for the volume group is only big enough for 5GB LUNs you'll have to put it into an entirely new volume group.

Unfortunately this is one this that disk array vendors never tell you when they sell you software to dynamically increase LUN sizes. In general its just better to create more LUNs and concatenate them together if required using volume managers - your lucky this is HP-UX! Some other operating systems you'd actually have to do a full reboot to see the additional 5GB.

HTH

Duncan

I am an HPE Employee
Accept or Kudo