1833013 Members
2139 Online
110048 Solutions
New Discussion

Re: lvsplit

 
SOLVED
Go to solution
hpuxhelp
Regular Advisor

lvsplit

in order for me to use lvsplit, does the logical has to be mirror first before I do lvsplit
eg
lvextend -m 1 /dev/vgy/lvol1 /dev/dsk/c1t4d0
lvsplit -s backup /dev/vgy/lvol1
5 REPLIES 5
Rodney Hills
Honored Contributor
Solution

Re: lvsplit

Yes... The lvsplit creates a new lvol structure off of the mirror.

HTH

-- Rod Hills
There be dragons...
Sridhar Bhaskarla
Honored Contributor

Re: lvsplit

Hi,

Yes. The logical volume should have been mirrored before you could do lvsplit. It is a good idea to ensure that there are no stale extents by doing a "lvdisplay -v /dev/vgy/lvol1"

Your command will split the mirror pair with a copy called '/dev/vgy/lvol1backup' from the lvol1 mirror.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
hpuxhelp
Regular Advisor

Re: lvsplit

can I lvsplit -s backup /dev/vgy/lvol1 on a specific physical volume ??

here is the scenarios
vgextend /dev/vgx /dev/disk/newdisk
vgdisplay -v : has both /dev/disk/newdisk and /dev/disk/old disk
lvextend -m 1 /dev/vgx/lvol1 /dev/dks/newdisk
lvsplit -s backup /dev/vgxlvol1 /dev/dks/olddisk

can I do that??
so now i have two copies of the logical volume at two different devices... incase
something happen to the new disk I will have the copy of the old one
James A. Donovan
Honored Contributor

Re: lvsplit

check the allocation policy on your mirrored logical volume using lvdisplay.

lvdisplay /dev/vgy/lvol1

If the Allocation says strict or PVG-strict, then the mirror is already on a different physical volume. Take a look at the lvcreate manpage (-s option) for the allocation policy definitions.

You cannot use the lvsplit command to specify a disk for your mirror. lvsplit simply splits a pre-existing mirror-pair.
Remember, wherever you go, there you are...
steven Burgess_2
Honored Contributor

Re: lvsplit

Hi

Yes and No

Yes, because that is what lvsplit will actually do. Your mirror copies should be across 2 devices anyway. When you perform the lvsplit you will have 2 copies of data on seperate disks. You would of course need to lvmerge then split to keep the data current.

The whole reason behind the mirroring though is so that if you lose a disk you have 2 copies of the same data. Plus you won't have an outage as the data will be written to the 'good' disk.

When you replace your 'bad' disk with a new one, you just

vgcfgrestore /dev/vg0# /dev/dsk/c#t#d0
vgsync /dev/vg0#

And

No, because you don't actually specify on the command line where you want to split your data to, and the command only accepts logical volumes as arguments

HTH

Steve
take your time and think things through