Operating System - HP-UX
1753858 Members
7484 Online
108809 Solutions
New Discussion юеВ

Re: LV in a VG that spans multiple disks and devices.

 
c.h.Ip
Occasional Contributor

LV in a VG that spans multiple disks and devices.

Hello,

i've two sets of MSA 30 disk arrays arrangeing like this:

MSA 1: 8 disks (labelled "Disk 1" to "Disk 8")
MSA 2: 8 disks (labelled "Disk 1" to "Disk 8")

and I've created a VG that contains 8 disks (4 disks in MSA 1, and 4 disks in MSA 2)

After that I wish to create a few LVs that stripes the disks in MSA 1 (and mirrored in MSA 2)

MSA 1 MSA 2

disk 1 | | | disk 1 | | |
disk 2 | LV 1 | LV| disk 2 | LV 1 | LV|
disk 3 | | 2 | <-> disk 3 | | 2 |
disk 4 | | | disk 4 | | |

If I create the VG spans for 8 disks initially, it looks like that when I create the LV, I couldn't assign which group of disks that the LV should be resided on.

In order to doing the setup described above correctly, do the steps below correct?

1. Create the VG in one MSA array (4 disks)
2. Create the LVs needed
3. Extend the VG into another MSA so that total 8 disks are included
4. For each LV, change the parameter 'No. of mirrors' from 0 to 1, and LVM shall make use of the newly-claimed space in MSA 2 for mirroring the LVs?

Thanks a lot :)


2 REPLIES 2
Robert-Jan Goossens
Honored Contributor

Re: LV in a VG that spans multiple disks and devices.

Hi,

create a volume group with all the disk of msa1, create the logical volumes and then add the disks of msa2 and mirror them.

create a volume group with all disks, lvcreate the logical volumes on a specific disk

lvcreate -L X -n lvol1 /dev/vgXX /dev/dsk/cxtydz (msa1)

lvextend -m /dev/vgXX/lvol1 /dev/dsk/cxtydz (disk on msa2)

you could also use pvg's (Physical Volume Groups)
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=723122

Regards,
Robert-Jan
Siju Vadakkan
Trusted Contributor

Re: LV in a VG that spans multiple disks and devices.

Hi,

Use physical volume group method,

1. create one pvg group with disks from MSA1,
vgcreate -g disk1 disk2 disk3 disk4

2. Create another PVG group with disk from MSA2,

vgextend -g disk1 disk2 disk3 disk4

1.lvcraete -L size -s g -D y -m 1

the above command will create mirror on msa2 group.

Siju