1846975 Members
4530 Online
110257 Solutions
New Discussion

lvextend -m 1 PVG

 
SOLVED
Go to solution
JOHN TURNER_2
Frequent Advisor

lvextend -m 1 PVG

is it possible to lvextend -m 1 to create a mirror and specify the PVG name such as VGP_CCA_D2M instead of specifying the disks or the volume group so that i can mirror straight into the mirror disks that have been set up in the /etc/lvmpvg file
GUI's are for wimps!
5 REPLIES 5
Stefan Farrelly
Honored Contributor

Re: lvextend -m 1 PVG


Yes indeed.
Im from Palmerston North, New Zealand, but somehow ended up in London...

Re: lvextend -m 1 PVG

Yes you can, but if you set up the logical volume with PVG-strict allocation policy then you don't even need to specify a PVG at all. If PVG-strict is the allocation policy on the logical volume then mirrored extents will automatically go into a different physical volume group from their corresponding original extent.

See the man page for lvextend/lvchange/lvcreate for more info.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Marco Santerre
Honored Contributor

Re: lvextend -m 1 PVG

Yes you are allowed to do that
Cooperation is doing with a smile what you have to do anyhow.
LucianoCarvalho
Respected Contributor

Re: lvextend -m 1 PVG

Yes! You can do that.
S.K. Chan
Honored Contributor
Solution

Re: lvextend -m 1 PVG

Yes you can, if you look at the man pages for lvextend you can specify the PV name or PVG name at the end. But let me ask you this ..
the LV that you're trying to extend (eg: /dev/vg01/lvol1) when it was first created and mirrored did you set the strict allocation policy to PVG-strict ? Example ..
# lvcreate -L 1200 -m 1 -s g -n lvol1 /dev/vg01
==> Creating a 1.2GB LV (lvol1) and set strict alloaction policy to PVG-strict (-s g).
If the answer is yes then all you need to do is (when you need to extend it) is to run the regular lvextend command.
# lvextend -L 2400 /dev/vg01/lvol1
as the mirroring policy has been setup during the creation.