Operating System - HP-UX
1834178 Members
2766 Online
110064 Solutions
New Discussion

Re: Mirroring a Volume Group with non-contigious extents

 
Stefan Saliba
Trusted Contributor

Mirroring a Volume Group with non-contigious extents

I have a volume group with 2 physical volumes. In this volume group I have 3 logical volumes whose exents happen not to be contigious. In fact I have a logical volume with some extents on one disk then some again on the other then again on the first disk.

When at later stage I tried to mirror this volume group I got the mirrored extents in a contigious fashion. So they ended up all on one disc not scattered like the others.

Is there a way I can re-organize the orginal discs to be in a contigious fashion. Is there any disadvantge to be mirrored in this way ?

8 REPLIES 8
John Carr_2
Honored Contributor

Re: Mirroring a Volume Group with non-contigious extents

Hi

if these are data and not o/s you can backup the data to tape delete the files and then restore which will make the data contigous.

you could also split the mirror , delete the files and then remirror the disks and sync the files.

Cheers
John.
James R. Ferguson
Acclaimed Contributor

Re: Mirroring a Volume Group with non-contigious extents

Hi Stefan:

You can use 'pvmove' to move physical extents from one disk to another. This can be done by logical volume, too. Have a look at the man pages.

The only thing you want to avoid is to mirror a logical volume's extents on the same. That is, you do not want mirror copies to occupy the same physical volume as the primary copy. This is the contiguous allocation policy established by default at logical volume creation.

Regards!

...JRF...
Thayanidhi
Honored Contributor

Re: Mirroring a Volume Group with non-contigious extents

Hi,

Consider the followings.

The mirrored disks are in same or different controller?
If it different controllers then you may configure PVG strick instead PV strict, which will take care of disk or controller failures. If it is same contrller it is better to have PV strick volumes. Since the you have mirrored to the disks which are contigious, you can reduce the mirror from the original disks (i.e. lvreduce -m 0 /dev/vgxx/lvolx /dev/dsk/cxtxd0)

Then re-establish the mirror to the same disks which will contigues.(lvextend -m 1 ...)

You can also pvmove if you can manage to make enough rooms for PEs.

--TT
Attitude (not aptitude) determines altitude.
Stefan Saliba
Trusted Contributor

Re: Mirroring a Volume Group with non-contigious extents

Are there any problems though if I had to leave it this way ?


Thayanidhi
Honored Contributor

Re: Mirroring a Volume Group with non-contigious extents

Hi,

The spanned volumes are not recoverable in case of any one disk failure. Though the portion is available on other disks, it is not possible to recover.

Since you have already established the mirror, failure point is taken care.

Just analyse and desire.

There is no other issue
(I feel)

--TT

Note: Make sure you don't keep mirrors copies of volumes to the same PVs. Its of no use.
Attitude (not aptitude) determines altitude.
Stefan Saliba
Trusted Contributor

Re: Mirroring a Volume Group with non-contigious extents

But hold on, you cannot always have an LV on the same disk. Assume a VG of 2PV's each 18GB in size. If you create an LV of 30GB then the LV spans the disks as well.

What I'm afraid of is the fact the if one disk fails, what happens when I replace the disk and do a vgsync. Will it only sync those extents which happen to be on those disks?




harry d brown jr
Honored Contributor

Re: Mirroring a Volume Group with non-contigious extents

You are correct that an LV can span MANY disks, and yet you can MIRROR them without any issues. It's best to have contigious allocation so that you know what is on what disk without expending a lot of brain energy. Remember that keeping it simple is the rule.

Check this thread out on how to replace a disk:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x30e1f9beca68d511abcd0090277a778c,00.html


live free or die
harry
Live Free or Die
Thayanidhi
Honored Contributor

Re: Mirroring a Volume Group with non-contigious extents

Hi Stefan,

If the LV spanned and mirrored, In case of disk failure, You need to just replace the disk and pvcreate, vgcfgrestore and vgsync.

It works and I already experimented.

--TT

Attitude (not aptitude) determines altitude.