Operating System - HP-UX
1819803 Members
3098 Online
109607 Solutions
New Discussion юеВ

Extent-Based Mirrored Stripes

 
Richard Pople
Occasional Contributor

Extent-Based Mirrored Stripes

Hi all

I am setting up a volume group using extent based mirrored stripes having read many of the posts in this forum to help me on my way. However one point still eludes me: I have 8 disks split over 2 controllers, in creating the PVGs I don't know whether to have 4 disks on one controller in each PVG or two from each controller in each PVG. If the latter, does it matter in what order the disks are in lvmpvg (ie pvgA c1 c1 c2 c2 or c1 c2 c1 c2)? I want to favour striping over mirroring if one has to suffer, ie performance is more important than redundancy.

Thanks in advance for any assistance.
5 REPLIES 5
Armin Feller
Honored Contributor

Re: Extent-Based Mirrored Stripes

Hi,

you have to stripe over 4 disks connected to the same controler and you should mirror to the other controler.

Yes the order in /etc/lvmpvg is importent, do it like this:

VG /dev/vgXY
PVG scsi-a
/dev/dsk/c1...
/dev/dsk/c1...
/dev/dsk/c1...
/dev/dsk/c1...
PVG scsi-b
/dev/dsk/c1...
/dev/dsk/c1...
/dev/dsk/c1...
/dev/dsk/c1...

After you have created the striped lvol you could mirror:

# lvcreate -D y -s g -m 1 -L 1000 -n dist1 /dev/vgDist

For the command above:

-D y specifies distributed allocation policy
-s g specifies PVG-strict allocation policy
-m 1 specifies 1 mirror copy
-L 1000 specifies size in MBytes = 1000
-n dist1 names logical volume dist1


Regards ...
Armin
Stefan Farrelly
Honored Contributor

Re: Extent-Based Mirrored Stripes

I dont think its going to make too much of a difference which way you do it, but if I had to choose I would put 2 disks from each controller in PVGA then 2 from each in PVGB for the mirror.

The obvious answer is to try both and test it. Create it one way (4 on 1 controller in each PVG) then do a;
time dd if=/dev/vgXX/rlvolYY of=/dev/null bs=1024k count=100

And see how long it takes. Then recreate with 2 disks on each controller in each PVG then do the time dd again and see which is quicker.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Richard Pople
Occasional Contributor

Re: Extent-Based Mirrored Stripes

Thanks for the replies.

Makes sense to try out both so I will do that, wasn't sure if there was an accepted right way for doing this.

Armin, are you saying that having all the disks in one PVG on the same controller rather than alternating them is your preferred setup for performance?

Armin Feller
Honored Contributor

Re: Extent-Based Mirrored Stripes

Hi,

you can try the command Stefan wrote:

# time dd if=/dev/vgXX/rlvolYY of=/dev/null bs=1024k count=100

and test if you get better performance if you have 2 by 2 disks on each controler, but to get security you should set the lvol allocation to PVG-strict and mirror against both controlers.

Regards ...
Armin
Patrick Wallek
Honored Contributor

Re: Extent-Based Mirrored Stripes

If was me doing this I would have the 4 disks from controller A in one PVG and the 4 disks from controller B in the other.

PVG parta
/dev/dsk/c1t?d?
/dev/dsk/c1t?d?
/dev/dsk/c1t?d?
/dev/dsk/c1t?d?
PVG partb
/dev/dsk/c2t?d?
/dev/dsk/c2t?d?
/dev/dsk/c2t?d?
/dev/dsk/c2t?d?

The whole point of mirroring is redundancy. If you have 2 disks on 1 controller and 2 on another controller in the same PVG, and 1 of the controllers goes down, what state are you going to be in.

Take this set up for example:

PVG parta
/dev/dsk/c1t?d?
/dev/dsk/c1t?d?
/dev/dsk/c2t?d?
/dev/dsk/c2t?d?
PVG partb
/dev/dsk/c1t?d?
/dev/dsk/c1t?d?
/dev/dsk/c2t?d?
/dev/dsk/c2t?d?

If you were to lose controller 2, you would be dead in the water since all of your mirrored extents are not available.

To restate my opinion, keep all disks on one controller in one PVG and all disks on the other controller in the other PVG so you have your full mirrored redundancy.