1824810 Members
4048 Online
109674 Solutions
New Discussion юеВ

lv distribution on pv

 
SOLVED
Go to solution
Roberto Gallis
Regular Advisor

lv distribution on pv

Hi all,
I have to do a stranger configuration on a vg composed by:
2 18GB disks
3 4GB disks

I have to made
lvol1 8GB
lvol2 8GB
lvol3 8GB
lvol4 6GB
I have to mirror each lv

So, I cannot understand how each lv is distributed on pv and where mirror will be made
The system is 10.20.
Anybody can explane me how the system distributes all lv?

Regards

Roberto
14 REPLIES 14
Vincenzo Restuccia
Honored Contributor

Re: lv distribution on pv

#lvdisplay -v /dev/vgxx/lvoly|more
Stefan Farrelly
Honored Contributor

Re: lv distribution on pv


2x 18GB = 36, 3x 4GB = 12, total 48 GB of disk.

You lvols listed (3x8 + 1x6) = 30 GB, to mirror them all you will need another 30 GB, ie. total 60 GB, and youve only got 48 GB, so youre 12 GB short to mirror it all !
Im from Palmerston North, New Zealand, but somehow ended up in London...
James R. Ferguson
Acclaimed Contributor
Solution

Re: lv distribution on pv

Hi Roberto:

To better understand how extents are allocated to each physical volume, take a look at the man pages for 'lvcreate'. These actually provide quite a good discussion.

The physical disks which will comprise your VG are of odd sizes so your options for spreading the extents across all of the disks will be restricted. Adding mirroring requirements further complicates the geometry of extents possible.

Simply put, using the default options of 'lvcreate' (in part, where the the distributed allocation policy is turned off), all available free extents are allocated from each available physical volume before proceeding to the next available physical volume. In some cases, it's desirable to deploy the '-D' (distibuted) option. When the distributed allocation policy is turned on, only one free extent is allocated from the first available physical volume. The next free extent is allocated from the next available physical volume. Allocation of free extents proceeds in round-robin order on the list of available physical volumes.

Remember that MirrorUX mirrors *logical volumes*.

...JRF...
Roberto Gallis
Regular Advisor

Re: lv distribution on pv

Sorry!!!
The configuration is
2x18GB
6x4GB disks: total 60GB

lv: 8GB - 8GB - 8GB - 6GB in mirror: total 60GB
Stefan Farrelly
Honored Contributor

Re: lv distribution on pv


Aha, thats better. Now you have 60 GB.

So, add all these disks into the same VG.

When you create your lvols assign them to a particular disk, eg. lvcreate -L /dev/vgXX/lvolXX /dev/dsk/cXXXXX

Do this for all your lvols. Once youre done you now know which disk your lvols are on. Lvdisplay -v /dev/vgxx/lvolxx will confirm this for you. Then when your done mirror each one in turn; lvextend -m 1 /dev/vgxx/lvolxx /dev/dsk/cxxxxx where the disk is a different disk to the one the lvol is on, and is the one you want to mirror to. Now an lvdisplay -v /dev/vgxx/lvolxx will list 2 disks, the first one being the primary, the 2nd the mirror.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Pedro Sousa
Honored Contributor

Re: lv distribution on pv

Hi Roberto,
I think you should create your lvols with stripping capacity.
I would do the following
"vgextend -g PVx vgxx /dev/dsk/cxtxdx /dev/dsk/cxtxdx ..." for 1 disk of 18GB and 3x4GB, then I would create the lvols with "lvcreate -i 4 -s g vgxx"
after all this you could extend the VG for the remaining disks wiht another PVG name, and then create the mirror.

good luck.
Roberto Gallis
Regular Advisor

Re: lv distribution on pv

Hi Pedro,
this is a good idea!!
But, I think it's a lot expensive for the system (a class D server, dual 180Mhz) doing a mirrored striped volume.
What do u think?
Pedro Sousa
Honored Contributor

Re: lv distribution on pv

Roberto,
the striping capacity will Improve your performance. By spreading the information through the disks, it will make I/O to be faster.
RAID-0

"Although it does not provide redundancy, striping is often referred to as a form of RAID, known as RAID-0. The Volume Manager's implementation of striping is described in the "Introduction to Volume Manager" chapter of the VERITAS Volume Manager Administrator's Guide . RAID-0 offers a high data transfer rate and high I/O throughput, but suffers lower reliability and availability than a single disk. "

About redundancy, you don't have any problem if you're using mirror.
good luck once more.
Pedro Sousa
Honored Contributor

Re: lv distribution on pv

Just another thing.
Thanks for the points, but you should not forget the others, they may not have help you as you wanted, but they tried.
thanks.
Jeen Oppedijk
Advisor

Re: lv distribution on pv

As far as I know, striping and mirroring the lvols is not possible with the LVM supplied with HP.....
Can anyone prove me wrong?
Roberto Gallis
Regular Advisor

Re: lv distribution on pv

Hi Pedro, just a moment pls...
I'm connected by modem cable....
I know stripe increase I/O rate, but I think on lower systems are expensive for cpu...

I assigned point to all, but vincenzo in each question reply not very well and most of times he do just a copy-past of other docs...
Pedro Sousa
Honored Contributor

Re: lv distribution on pv

I use Stripe in a D350 with two processors, and it goes very well! So, I recommend you to do it. Also searched for information relating I/O vs CPU using RAID 0, and found nothing.

about the points, thanks for the answer.
Roberto Gallis
Regular Advisor

Re: lv distribution on pv

Pedro,
I think to mirror a striped lvol is expensive (if possible to do)

Thanks to all
Regards
Roberto

PS: now I open new question for mirroring a striped lv
Jeff Gyurko
Frequent Advisor

Re: lv distribution on pv

Jeen, RE: Striped mirrors.

oficially, it's unsupported. Real world you can do some form of striped mirrors. Nothing can prevent you from doing the following.
Disk = A B C D
Mirror= 1 2 3 4

extent your LV with the first extend to A.
mirror that extent to 1
extend the LV with the next extent to B
mirror the LV to 2
extend to C
mirror to 3
extend to D
mirror to 4
.
.
.
You may not be able to get to the extent size of Kilobytes like normal, but it's better than nothing. Script it and it's easy to do. Especially with large raw partitions. I've done it and have not had problems, and I'm sure other methods exist.