Operating System - HP-UX
1834897 Members
2598 Online
110071 Solutions
New Discussion

Re: How to properly Split an LVM Mirrored Boot Environment?

 
Alzhy
Honored Contributor

How to properly Split an LVM Mirrored Boot Environment?

We're planning a critical system upgrade (OS and vPars software). All our systems are currently mirrored. We'd like to break that mirror so we have an old copy of the old boot environment handy. What is the proper way of doing this?
Hakuna Matata.
10 REPLIES 10
Sanjay_6
Honored Contributor

Re: How to properly Split an LVM Mirrored Boot Environment?

Hi Nelson,

Here is a documented process on how to boot from a split mirror if required.

http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000063238284

the itrc doc id is X1401978.

Hope this helps.

Regds
Alzhy
Honored Contributor

Re: How to properly Split an LVM Mirrored Boot Environment?

Is there an easier way -- like simply removing the mirror disk from VG00 so it is independent on its own? Will:

Will lvreducing the LVOLS and then moving the mirror PV out of VG00 actually destroy data on the PV? I was thinking, I can perhaps boot off of the split disk in LVM maint mode and fix VG00 afterwards??

I was thinking a dd copy might as well do the trick - after splitting the PV of course and using that as the dd target. Then boot off the dd disk in a fallback scenario (OVM maint mode) and fix VG00.

Hakuna Matata.
Sanjay_6
Honored Contributor

Re: How to properly Split an LVM Mirrored Boot Environment?

Hi,

when you do lvreduce to reduce the mirror from the secondary disk, you actually destroy that copy on the mirror. lvextend to create a new copy will recreate the mirror. You can verify this by doing a pvdisplay after the lvreduce/lvextend command.

If i'm reading you correctly, you don't want to do that, but instead keep your mirror copy safe to reboot the server from the mirror in the event your primary copy gets corrupted while doing the upgrade.

Another choice is to create a ignite archive and use that to reload the OS in the event of a problem with the upgrade.

Hope this helps.

Regds
Geoff Wild
Honored Contributor

Re: How to properly Split an LVM Mirrored Boot Environment?

I think what you really want to use is the lvsplit command...then lvmerge later.

man lvsplit

lvsplit - split mirrored LVM logical volume into two logical volumes


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Sundar_7
Honored Contributor

Re: How to properly Split an LVM Mirrored Boot Environment?

Nelson,

The document mentioned above is the proper way to do it.

I am doing something very similar right at the moment.

But if you want something very simple, you can just PULL one of the drive and patch the system.

You will have to override the quorum while booting.

When you are done with patching, if the patching is successful, insert the drive that you just pulled off, LVM should automatically sync the stale extends.

If the patching is not successful, PULL the drive that is currently online and PLUG the drive that you pulled off for the first time and boot from it

I cannot think of anything simpler than this :-)

- Sundar
Learn What to do ,How to do and more importantly When to do ?
Alzhy
Honored Contributor

Re: How to properly Split an LVM Mirrored Boot Environment?

Sundar,

That's the other method that we were looking at in addition to a dd copy and a make_net_recovery backup. The problem is the data center is a totally lights out environment - no humans or human help can be difficult to have.

;^)
Hakuna Matata.
Sundar_7
Honored Contributor

Re: How to properly Split an LVM Mirrored Boot Environment?

With the lessons learned in the past couple of days, I tend to be little cautious with lvsplit and lvmerge.

It is not as simple as it sounds.

If I am given the option, I would go with pulling the drive than splitting and merging.
Learn What to do ,How to do and more importantly When to do ?
Prashant Zanwar_4
Respected Contributor

Re: How to properly Split an LVM Mirrored Boot Environment?

Just check your mirroring by booting of the mirroed disk before patching or so. Remove it from bay. Then just boot by one disk. And do patching. Keep it running till you have confidence of syncing disks back...once you do, put the disk back. This is best as I believe lvsplit even if you r successful using that will do the same thing.

hpux -lq at boot will give you desired to boot without mirror.

Hope it helps
Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Prashant Zanwar_4
Respected Contributor

Re: How to properly Split an LVM Mirrored Boot Environment?

Also have an ignite of the system with

make_tape_recovery -A -x inc_entire=vg00 -v -t...

This will keep you hassle free in case you want to reload originial OS.

Just have a glance of ITRC and/or other sites regarding issues regarding upgrade of OS and cPars software. May be it will be good idea to open a question on that so that you will get all valuable inputs. Take necessary precautions besides backing up and taking mirror disk out. So that chances are just least of failing. Also keep track of patches which will be needed to support your upgrade.

Hope above helps

Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Jannik
Honored Contributor

Re: How to properly Split an LVM Mirrored Boot Environment?

The ignite thing is the fastes way... but U ether have to go and make a tape or configure a igniteserver.
I did the same as you some time back, and the HP sollution was to go and pull out the disk, i didn't like that - but that was the sollution.
In sam you have the possibility to do:
disk and filesystems -> action ->
Replace Hot Pluggable Disk
I don't know what that command does, but that is something to look in on.

maybe pvchange -z n /dev.. will do it.

I don't thing you should splitt you volumes with lvsplit and merge that will rename the volume...
jaton