Operating System - HP-UX
1838263 Members
3578 Online
110125 Solutions
New Discussion

updating to 11.0 ; how to break mirror before?

 
SOLVED
Go to solution
Mark Vollmers
Esteemed Contributor

updating to 11.0 ; how to break mirror before?

Hi, all. Getting ready to update to 11.0 from 10.20, and I want to be sure to have everything ready before. Here's what I have down to do. Am I missing anything? Also, I have stuff mirrored. how do I break the mirror (to use in case I suck it up)? Here is the mirror info:

I have two seagate drives, and these directories are mirrored:

/stand in lvol1
swap in lvol2
/ in lvol3
/opt in lvol4
/tmp in lvol5
/usr in lvol6
/var in lvol7

I see that in SAM I can take the mirror offline. Is this the best way? What I want is for this to be available if I screw up so I can flip the drives around and boot back up. (I will have an ignite tape just in case as well). Should I physically remove the drive or will it flip out since it can't find the drive? I've never really played with the mirror before, so I'm new here.

Also, for the upgrade, here is what I plan. Any other thoughts?
-make ignite tape and full backup
-break mirror
-uninstall patches for 10.20
-uninstall software (???)
-boot to single user mode and cold install 11.0
-restore critical files (/etc/password and so on from tape)
-install programs

At what point should I re-mirror the drives? I will probably patch the new system later. Any other thoughts? Thanks a lot!

Mark
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"
6 REPLIES 6
Andrew R.
Advisor
Solution

Re: updating to 11.0 ; how to break mirror before?

Mark,
The steps you have in mind are great, you might want to test the mirror copy if it is bootable, first identify which drive is your second boot disk

#lvlnboot -v
boot your system from the second copy to make sure it will come up !! (ISL> boot alt)

In order to break the mirror you would do the following for every logical volume

#lvreduce -m 0 /dev/vg##/lvol#
when your upgrade completes,you can sync the mirror copy with

#lvextend -m 1 /dev/vg##/lvol#
or you can probably do
#vgsync vg##

Good Luck,
Live for the infinity life
Michael Tully
Honored Contributor

Re: updating to 11.0 ; how to break mirror before?

Hi Mark,

I went through a similar exercise on one
of our systems a couple of months ago and
here is some thoughts you may wish to
include with your plan.

1. Copy these files to another system.
/etc/passwd
/etc/group
/etc/profile
.profile (roots)
.rhosts (roots)
/etc/hosts
/etc/hosts.equiv
/etc/nsswitch.conf
/etc/mail/sendmail.cf
/etc/mail/aliases
/etc/named.boot
/etc/exports
/etc/oratab (if you have Oracle DB)
/etc/fstab
/etc/lvmtab (Do a "strings" on the file)
/etc/services
/etc/inetd.conf
/etc/rc.config.d/netconf

2. Do an "ioscan -fn" and save output
3. The same with "bdf"
4. And with "swapinfo"
5. Do a "vgdisplay -v" on all VG's and save output.
6. The same for all LV's.
7. And on "lvlnboot -v".
8. Do a Ignite backup of your root vg, if
things goes wrong you can always reinstall 10.20.
9. Full system backup
10. 'vgexport' in preview mode.
11
11. Split your vg00 mirror using lvreduce as
suggested.

Here is a link that I thought was useful from
Bill Hassell for after you have HP-UX 11 up
and running.

http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0x4499e7e60861d511abcd0090277a778c,00.html

HTH
Michael

Anyone for a Mutiny ?
Harinath N
Frequent Advisor

Re: updating to 11.0 ; how to break mirror before?

Hi Mark,

First of all copy all of the important configuration files and command outputs as mentioned by Micheal to a file system belonging to some other VG.

Then you can go ahead in breaking the mirror copy using lvreduce command for each and every file system in root vg.

eg: lvreduce -m 0 /dev/vg00/lvol5 /dev/dsk/c0t4d0

Now you can do vgreduce for the same mirrored disk.
After this ensure to do lvlnboot -R, So after that you can reboot the
system without mirror disk and then export the other vg's config. using vgexport command.

After this exercise you can go ahead with updation activity. Once when everything gets over, you can vgimport the other vg's config and copy all backed up files to replace the new files.
Then you can go ahead for mirroring of the root disk again.

Hope this will help you a bit.

Regards,
N.Harinath.
Mark Vollmers
Esteemed Contributor

Re: updating to 11.0 ; how to break mirror before?

Thanks, all. It sounds so easy listing it out on paper...

Just another question about the mirror (and I apologize in advance if this is a dumb question). When the mirror is broken, the first drive is active with the logical volumes on it. The second is mounted (or attached, rather) with the logical volumes on it, but they are not being accessed. Is the only way to access this drive to boot in single user and boot to it? I guess what I am asking is that is this drive there but not used at all, as far as the system is concerned? If I wanted to use it (for non-mirror), I would need to create new lvols on it first, right? This doesn't really apply to upgrading, but I'm just trying to get a full picture in my head. Thanks!

Mark
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"
Michael Tully
Honored Contributor

Re: updating to 11.0 ; how to break mirror before?

Hi Mark,

Once the 'lvreduce -m 0' has been applied, the
second disk is free and is not used, except
is will still be part of the vg00 group. once
all of the lv's have been mirror reduced run
your vgdisplay -v /dev/vg00 and where the
info is shown for the second disk it should
have all of it's PE's available. If it does
not then you need to see what is still on it.
To check use
# pvdisplay -v /dev/dsk/cXtXdX
If there are any lv's on it they will show here.
Once you are sure that there is no info on it you
can remove it from the volume group by issuing this
# vgreduce /dev/vg00 /dev/dsk/cXtXdX

Now the disk is available and can build your
HP-UX 11 system on it, by booting the HP-UX 11
Core OS CD and starting your installation to that
disk that has been freed up or you can add it to
another volume group and put new lv's on it.

Don't worry about asking questions, some of mine
have been pretty dumb too!

Hope this clarifies things.
Michael
Anyone for a Mutiny ?
Harinath N
Frequent Advisor

Re: updating to 11.0 ; how to break mirror before?

Mark,

You are right, if you want to access the mirrored disk, you have to boot the system in ALT path.

Getting back to your other doubt, the disk can always be used once after breaking the mirror copy, i.e., after performing lvreduce of all mirrored lv's, vgreduce of that vg and importantly the "lvlnboot -R" which updates the BDRA of the bootable physical disk in that vg.

So after isolating the disk from the mirror, you can do a pvcreate for that disk and either make it a part of any present vg's by doing vgextend or can create a new vg on it using vgcreate and then the lv's on it.

Regards,
N.Harinath