Operating System - HP-UX
1753706 Members
4814 Online
108799 Solutions
New Discussion юеВ

Re: PVG Strict -Distributed Volume

 
Ganesh Balraman
Regular Advisor

PVG Strict -Distributed Volume

Hi All!

When i create one logical volumes using (lvcreate -l 8000 -D y -s g -n lvol1 vg02 in the volume group vg02 which is grouped in 2 PVG's.(Using all extents for this one logical voulme).


How the data will be written on the disk?

1.Whether it will be written in the order of disk40,disk41,disk42,disk44(using both PVG's)

(OR)

2.First it write disk 40,disk41 under PVG0 complete all extents and then move to disk43 disk44 under PVG1.

# cat /etc/lvmpvg
VG /dev/vg02
PVG PVG0
/dev/disk/disk40
/dev/disk/disk41
PVG PVG1
/dev/disk/disk42
/dev/disk/disk43
4 REPLIES 4
Manix
Honored Contributor

Re: PVG Strict -Distributed Volume

Hello Ganesh ,

First we may know what " -s g " & "-D y" means.
-s g is PVG strict policy it means if you create mirrors then they will be placed @ different PVGS & " -D y " means that the data
will be striped across the disks attached to the controller or the disk in one PVG.

& The distributed allocation policy
REQUIRES the PVG-strict allocation
policy ( -s g ) to ensure that mirrors of distributed extents do not overlap
(for maximum availability).

You are not using the switch -m 1 ( mirror PVG strict )in the command above & most of the time the above setup is used for RAID 0 +1 ,stripe + mirror combination of LVM

So specifically answering your question it looks that data will be striped across the disks in the first PVG only (AFAIK )

Thanks
Manix

HP-UX been always lovable - Mani Kalra
nijokj
Trusted Contributor

Re: PVG Strict -Distributed Volume

Distributed Allocation Policy
This example shows how the -D y option can be used to create EXTENT-
BASED MIRRORED STRIPES.

Assume that volume group /dev/vgtest has two physical volume groups:
pvg1 and pvg2.

Assume that each physical volume group has 2 physical volumes.

Assume that the first physical volume in each pvg has 3 extents free
and the second physical volume in each pvg has 2 extents free.

The following command creates a logical volume in vgtest with EXTENT-
BASED MIRRORED STRIPES:

lvcreate -D y -s g -m 1 -l 5 /dev/vgtest

The distributed allocation proceeds as follows:
+ A free extent is allocated from the 1st pvol in pvg1.
+ A free extent is allocated from the 2nd pvol in pvg1.
+ A free extent is allocated from the 1st pvol in pvg1.
+ A free extent is allocated from the 2nd pvol in pvg1.
+ A free extent is allocated from the 1st pvol in pvg1.

+ Mirrors for the five extents are then allocated from the
free extents in pvg2 in a similar manner.
This is raid 0+1

i think this will clear your doubt. In your case as you are not using -m 1 so your logical volume will be distributed in the physical volume group (PVG0) as posted by manix
Ganesh Balraman
Regular Advisor

Re: PVG Strict -Distributed Volume

Here i am using only Striping not mirroring.

How will the data be written to disk when striped with command said by me.

Please advice
P Arumugavel
Respected Contributor

Re: PVG Strict -Distributed Volume

Hi,

when you use -I to specify the stripe size, you must set the number of disks also to stripe across. -i and -I must be specified together.

http://docs.hp.com/en/B2355-90129/lvcreate.1M.html

It will write the data with specified stripe size to the no of disks specified in order within the volume group.

http://docs.hp.com/en/B2355-90672/ch08.html


Rgds...