Showing results for 
Search instead for 
Did you mean: 

Mirroring lvols.

Occasional Advisor

Mirroring lvols.

Hi Experts,
Please help me to Migrate the data from jbod to xp storage.We have assigned new luns to the server.under /dev/vgpkg1 having 2 lvols.We need to miiror those lvols in to xp disk.after that reduce the lv form jbod.Here i am attaching the lvdetails .one lv named lvnbu is belowngs to 5 disk.i am confused how to mirror this lv to only to xp disk.still we didnt done the vgextend with new lun for /dev/vgpkg1.
Thanks in Advance.Any more information required please let me know.
James R. Ferguson
Acclaimed Contributor

Re: Mirroring lvols.


LVM mirroring occurs at the logical volume level. Hence it doesn't matter over how many physical volumes a logical volume is spread over at either the source or at the destination volume as long as the allocation (strict and/or contiguous) policies are met during a mirror operation.


Occasional Advisor

Re: Mirroring lvols.

Please correct me if am wrong.
1.vgextend /dev/vgpkg1 /dev/dsk/c108t0d0 /dev/dsk/c108t0d1 /dev/dsk/c108t0d3
2.lvextend -m 2 /dev/vgpkg1/lvnbu /dev/dsk/c108t0d0
3.lvreduce -m 1 /dev/vgpkg1/lvnbu /dev/dsk/c4t8d0 /dev/dsk/c4t9d0 /dev/dsk/c4t10d0 /dev/dsk/c5t0d0 /dev/dsk/c5t1d0 /dev/dsk/c5t2d0
Steven E. Protter
Exalted Contributor

Re: Mirroring lvols.


lvextend -m 2 /dev/vgpkg1/lvnbu /dev/dsk/c108t0d0

This statement assumes there is already 1 mirror copy and you want to create a second.

It will leave you with 3 copies.

lvdisplay -v /dev/vgpkg1/lvnbu
To confirm this. The step may not be needed if you have two valid mirror copies on two different disks.

lvextend will let you make a mirror copy of a lv on the same disk it lives on. You want to avoid this as that would be a pretty useless mirror copy.

Steven E Protter
Owner of ISN Corporation
Occasional Advisor

Re: Mirroring lvols.

The mentioned lv already having mirror copy,but the destination disk is belongs to the Jbod disk. I have to mirror those lvols in to an xp storage disk.once mirroring completd i need to reduce the jobod disk from the lv and from the perticular vg.Please help me with command details has been attached.
P Arumugavel
Respected Contributor

Re: Mirroring lvols.


Your LV's all logical extents and mirror extents are allocated in those 6 disks (/dev/dsk/c4t8d0 /dev/dsk/c4t9d0 /dev/dsk/c4t10d0 /dev/dsk/c5t0d0 /dev/dsk/c5t1d0 /dev/dsk/c5t2d0). As this LV is set strict allocation policy, 3 disk will have original and another three will have mirror. These 3 mirror disks could be found from lvdisplay -v.

First lvreduce mirrors from those 3 disks and vgreduce.
#lvreduce -m 0 /dev/vgpkg1/lvnbu pv_path of 3 disks.
#vgreduce /dev/vgpkg1 pvname of 3 disks.

Then, add the XP disk
#vgextend vgextend /dev/vgpkg1 /dev/dsk/c108t0d0 /dev/dsk/c108t0d1 /dev/dsk/c108t0d3

Now mirror the LV.
#lvextend -m 1 /dev/vgpkg1/lvnbu /dev/dsk/c108t0d0
Ensure /dev/dsk/c108t0d0 has enough PE's.

Now lvreduce the original.
#lvreduce -m 0 /dev/vgpkg1/lvnbu pv_path of 3 disks.(original copies)

This is the way I find easiest.