Operating System - HP-UX
1833926 Members
3858 Online
110063 Solutions
New Discussion

Mirroring lvol spanned in two disks.

 
SOLVED
Go to solution
sysadm_1
Valued Contributor

Mirroring lvol spanned in two disks.

i have two 18gb disks in vg00.Mirror disk/ux is installed.
I have a single lvol with size of 24GB which is spanned across these two disks.
Now i want to add two more 18Gb disks and want to mirror only this lvol.Can anybody tell how to mirror this lvol to new disks?

6 REPLIES 6
Bill McNAMARA_1
Honored Contributor

Re: Mirroring lvol spanned in two disks.

ioscan -fnkC disk

find the device files for the newly added disk.
/dev/dsk/cXtYd0

vgextend /dev/vg00 /dev/dsk/cXtYd0

I'm assuming the lvol in /dev/vg00/lvol1

lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/cXtYd0

lvdisplay -v /dev/vg00/lvol1 | more
to display mirror info.

Bill
It works for me (tm)
Bill McNAMARA_1
Honored Contributor

Re: Mirroring lvol spanned in two disks.

sorry misread.

You're adding two disks:
use
vgextend /dev/vg00 /dev/dsk/cX2ty2d0
to add the second 18G disk to the vg00


I haven't got lvm mirror installed on my system, but believe there is a "-D y" option to distribute the mirror over two disks correctly.

I'll search for it in the forums and get back..
It works for me (tm)
sysadm_1
Valued Contributor

Re: Mirroring lvol spanned in two disks.

Hi Bill,
Here i am not using any type of striping
lvol1 is in two disk because lvol size is 24GB and single disk size is 18GB.
in this condition,commands
vgextend vg00 /dev/dsk/dsk1 /dev/dsk/dsk2
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/dsk1 /dev/dsk/dsk2
will it mirror lvol1 to dsk1 and dsk2??

Zigor Buruaga
Esteemed Contributor

Re: Mirroring lvol spanned in two disks.

Hi,

I think your commands will work fine, LVM will fill up the first disk ( 18 GB ) and then it will use the second disk ( 24 - 18 = 6 GB mirrored in the second disk ).
Anyway, you could try it and then check the result with "pvdisplay -v /dev/dsk/your_new_disks".

Kind regards,
Zigor