Operating System - HP-UX
1752805 Members
5662 Online
108789 Solutions
New Discussion юеВ

Re: Suspect Ignite has "disappered" my LVM Mirrors

 
Michael Khoury
New Member

Suspect Ignite has "disappered" my LVM Mirrors

I am running HP-UX 11.0 on an rp5450. About a year and a half ago, I had Ignite installed on this machine and as luck would have it, I have had a few opportunities to test if my system could come up from the Ignite tape and the good news is, yes Ignite works great. Not being an HP-UX Guru (I came from Tru64 AlphaServers, suffice it to say I miss my Advfs) I didn't think to check my software mirrors on my system. Lately I've wanted to add some more disk to this system, what I realize now is that I am not mirroring anything on this system. It appears that the volume groups are all intact and that about half of the disks are simply not being used. Is there an easy way to reinstate the mirrors on this system? Any help would be appreciated.

Mike Khoury
11 REPLIES 11
Robert-Jan Goossens
Honored Contributor

Re: Suspect Ignite has "disappered" my LVM Mirrors

Mike,

Mirror-Ux should be installed, could you check with swlist command?

# swlist -l fileset|grep -i mirror

You can find the steps in below doc.

http://www.docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf

Page 24 Mirroring the Root Volume on PA-RISC Servers

Regards,
Robert-Jan
Michael Khoury
New Member

Re: Suspect Ignite has "disappered" my LVM Mirrors

Yes, I am running the MirrorUX. I'll check the materials you are suggesting, thanks.
Bill Hassell
Honored Contributor

Re: Suspect Ignite has "disappered" my LVM Mirrors

This is a feature of Ignite/UX. Mirroring can be far too complex to automatically restore (striping, multiple disks, primary and alternate links, etc) so Ignite restores just the primary disks, ready to mirror. Mirroing the disks is quite easy but I would write a simple script with the lvextend commands. Be sure to look at each volume group for the defined disks, then use pvdisplay to show what space is currently occupied.

In the simplest case, one disk has allocated extents and the other does not. For larger volumes with more than 2 disks, make sure the mirrors are created on a physically different disk, ideally on a different I/O card if possible. Your script would be something like:

lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t2d0
lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c1t2d0
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c1t2d0
lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c1t2d0
...
where c1t2d0 is the unused disk. For multiple disks, list them in the order you want them used.

The mirroring task can be done while the system is running although it will slow down performance for a while.


Bill Hassell, sysadmin
Michael Khoury
New Member

Re: Suspect Ignite has "disappered" my LVM Mirrors

Bill, I get the sense that what you are suggesting is on the money. Like I said in my initial post, I've not done a lot of HP-UX administration so, I'm a bit cowardly and wanting to make sure I don't forget any steps. I probably need to set the alternate boot path as well?
Tim Nelson
Honored Contributor

Re: Suspect Ignite has "disappered" my LVM Mirrors

And additionaly some checks on your work.

1) lvlnboot -v /dev/vg00 ( check your boot, root, and swap paths, both primary and mirror disks should show ).

2) check boot paths. setboot
setboot -a hw_path ( to set your alt boot path )

3) and lastly. shutdown the system and boot from the alternate to test.

Pete Randall
Outstanding Contributor

Re: Suspect Ignite has "disappered" my LVM Mirrors

Michael,

Here's my "cookbook" for mirroring, which, as you've discovered, has to be re-established after an Ignite restore.


The steps to mirror your boot volume are (PA-RISC):

1. Create a physical volume with a boot reserved area
"pvcreate -B /dev/rdsk/c1t6d0"

2. Add the physical volume to the root VG
"vgextend /dev/vg00 /dev/dsk/c1t6d0"

3. Use mkboot to place the boot utilities in the boot area and add the AUTO file
"mkboot /dev/rdsk/c1t6d0"
"mkboot -a "hpux -lq" /dev/rdsk/c1t6d0"

4. Use mkboot to update the AUTO file on the primary boot disk
"mkboot -a "hpux -lq" /dev/rdsk/c0t6d0"

5. Mirror the stand, root and swap logical volumes in order
"lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t6d0"
"lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c1t6d0"
"lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c1t6d0"

6. Then mirror the rest of your root logical volumes
"lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c1t6d0"
etc.

7. Modify your alternate boot path
"setboot -a 8/8.6.0 # use the path of your new boot disk"

8. Edit /stand/bootconf and add your new mirrored boot disk.

That's all there is to it. You may notice that I left out any
lvlnboot commands. That is because they are not
necessary - see the man page:

"This command should be run in recovery mode (-R)
whenever the configuration of the root volume group is
affected by one of the following commands: lvextend,
lvmerge, lvreduce, lvsplit, pvmove, lvremove, vgextend,
or vgreduce (see lvextend(1M), lvmerge(1M), lvreduce(1M),
lvsplit(1M), pvmove(1M), lvremove(1M), vgextend(1M), and
vgreduce(1M)). Starting with HP-UX Release 10.0, this is
done automatically."


For Itanium architecture, follow this guide:
http://docs.hp.com/en/B2355-90950/ch06s02.html#cchgjafa

And, for 11.31, follow this:
http://docs.hp.com/en/B2355-90950/ch06s02.html#mrflv


Pete

Pete
Torsten.
Acclaimed Contributor

Re: Suspect Ignite has "disappered" my LVM Mirrors

Does this apply only to the root disk or to all disks?

Mirroring is done at the LVOL level, so to be sure you need to inspect every single LVOL.

Example:

lvdisplay -v /dev/vg03/lvol3|more
...
Mirror copies 1


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Michael Khoury
New Member

Re: Suspect Ignite has "disappered" my LVM Mirrors

This applies to all my Logical Volumes.

My situation is/was that every logical volume on my system was mirrored and now they are all gone (I use Ignite to "backup" both the O/S and the data, since the data is stored on the tape in "pax" or tar format after the Ignite information is written on the beginning of the tape). So that being said, I have two volume groups, one with /stand / swap /var /usr etc. which is essentially my system and the other with my application/database on it.
Torsten.
Acclaimed Contributor

Re: Suspect Ignite has "disappered" my LVM Mirrors

The recommendation is to use ignite only for the OS - not the data.
Anyway, it could be done.

The problem is, ignite will not mirror the disks again during the restore by default.
Of course you can script this.

Now you have to re-mirror the disks again.

If you have more questions about the how-to please ask.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!