1752793 Members
6251 Online
108789 Solutions
New Discussion юеВ

pvg under lvm2 on redhat

 
franlo
Advisor

pvg under lvm2 on redhat

Hello all,

I have a dl385 on 2 xp1024. Is it possible to mirror one array on the second array by using lvm pvg (lvm2-2.02.01-1.3 on redhat as4 u3) ?
I do it find on hpux 11.23 on the same array

If it's not possible on this way (i find nothing on pvg in redhat) there is a another way to synchronize/backup lvol on 2 arrays.


thank for your help

regards

francois
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: pvg under lvm2 on redhat

Shalom,

You can use lvextend to do this.

You have to mirror the entire logical volume,not the physical volume.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ivan Ferreira
Honored Contributor

Re: pvg under lvm2 on redhat

Yes it's possible, but I don't like it last time I tested, wasn't good enough for me. We ended doing replication on storage basis.

For example, to mirror 2 LUNs, you need 3, one small lun acting as "LOG" to avoid full resync (unless --corelog is used, but this requires full resync at reboot, it really sucks).

Full information here:

http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/en-US/RHEL510/Cluster_Logical_Volume_Manager/mirrored_volumes.html
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
franlo
Advisor

Re: pvg under lvm2 on redhat

Thank for your quick reply.

i tried whith both lvextend and lvconvert with no result :

lvdisplay -m /dev/vgSAP/lvTESTFL
--- Logical volume ---
LV Name /dev/vgSAP/lvTESTFL
VG Name vgSAP
LV UUID pkZCl0-0DRP-IvAP-PfKY-q5VP-s3Hk-dfIDc8
LV Write Access read/write
LV Status available
# open 1
LV Size 1000.00 MB
Current LE 125
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:32

--- Segments ---
Logical extent 0 to 124:
Type linear
Physical volume /dev/sdc
Physical extents 1080 to 1204



lvextend -m 1 /dev/vgSAP/lvTESTFL /dev/sdz
Please specify either size or extents (not both)
lvextend: Add space to a logical volume

lvextend
[-A|--autobackup y|n]
[--alloc AllocationPolicy]
[-d|--debug]
[-h|--help]
[-i|--stripes Stripes [-I|--stripesize StripeSize]]
{-l|--extents [+]LogicalExtentsNumber |
-L|--size [+]LogicalVolumeSize[kKmMgGtT]}
[-m|--mirrors Mirrors]
[-n|--nofsck]
[-r|--resizefs]
[-t|--test]
[--type VolumeType]
[-v|--verbose]
[--version]
LogicalVolume[Path] [ PhysicalVolumePath... ]





lvconvert -v -d -m 1 /dev/vgSAP/lvTESTFL /dev/sdz
Checking for existing volume group "vgSAP"
Archiving volume group "vgSAP" metadata (seqno 13).
Adding mirror images is not supported yet.




what's happend ? have you an idea ?


thank a lot for your help


francois
Ivan Ferreira
Honored Contributor

Re: pvg under lvm2 on redhat

>>> Adding mirror images is not supported yet.

You need a newer Red Hat Update. Mirror support was introduced in U4 or U5, i'm not sure.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Heironimus
Honored Contributor

Re: pvg under lvm2 on redhat

I assume that what you're trying to do is the equivalent of defining one PVG for each array and setting the LV to mirror across PVGs instead of just across devices. I don't think Linux LVM has an automatic way to do that. You could probably do it manually by specifying devices to use every time you create/extend a volume.

Another option is to do it at a lower level and create a software RAID1 set across the arrays. You would then put a volume group on that instead of directly on the array devices.