Operating System - HP-UX
1835916 Members
2344 Online
110087 Solutions
New Discussion

Re: LVM Mirroring to different size LUNS

 
SOLVED
Go to solution
John Goetz
Advisor

LVM Mirroring to different size LUNS

Can I do LVM mirroring to devices that are different in sizes? If this can be done, how would you do it and what are the risks?

We are going from an EMC Sym to EMC DMX storage system and all of the LUN / Device sizes are different.
4 REPLIES 4
Jeff Schussele
Honored Contributor
Solution

Re: LVM Mirroring to different size LUNS

Hi John,

Yes you can do it..BUT....the mirror size will be limited to the capacity of the smaller LUN.
This will effectively waste a lot of space on the new LUNs.
Your EMC people should have planned this better & presented the same size LUNs on the new DMX.

To get full capacity you'll need to transfer the data some other way besides mirroring - via tape or rcp or ftp or such.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Florian Heigl (new acc)
Honored Contributor

Re: LVM Mirroring to different size LUNS

this should not be any trouble, but You should use PVGs and PVG-strict allocation to avoid mirrors ending up on the same disk.

if Your host is dual-pathed to both arrays, You might want to take the 'risk' of simply using pvmove, but in the end, anything works.
yesterday I stood at the edge. Today I'm one step ahead.
Devender Khatana
Honored Contributor

Re: LVM Mirroring to different size LUNS

Hi,

It is not advised to mirror it this way if difference of Size between two LUNs is too large. Just see the following VG parameters before going ahead as these parameters might now allow you to use the full size of new LUNs in existing VG's.

MAX PE Per PV
PE Size

Max PE per PV * PE Size = Max Physical Volume (Here LUN) Size utilized by VG.

This way you can find out the maximum space of one LUN that can be utilized in your existing VG.

Altough you can add LUNs of more than this size but it will be utilizd upto this limit only.

HTH,
Devender
Impossible itself mentions "I m possible"
Bill Hassell
Honored Contributor

Re: LVM Mirroring to different size LUNS

Mirroring is done at the lvol level and when you mirror a disk, you can specify exactly what physical disk (or LUN) to use. Where you put the extents and in what order is completely controllable by the lvextend command. lvextend doesn't care whether the destination disk/LUN is much larger--the extents are just added at the first available locations. If you specify two or three or more destinations disks, the extents are allocated in order up to the end of each disk.

Mirroring doesn't actually care about the various disks or their physical size. In fact, you can use pvmove to move mirrored extents to other disks or even to the same primary disk (a very dumb idea).

The concept of volume groups is to eliminate the concept of physical disks/LUNs y simply creating a pool of disk space. You then allocate the space as needed. You can mirror a 36Gb disk to a bunch of 2Gb disks with no problem. The LVM code looks up every extent as needed so there's no real shortcuts by having the mirror extents on different disks or even in random order.

Oh, but there's the issue of performance. Ideally, the disks would be similar in performance. When the disks aren't really disks but carved out space in an array, this issue is meaningless because all the disk space performs at about the same level (assuming reasonable management of the array parameters).


Bill Hassell, sysadmin