1849990 Members
3161 Online
104049 Solutions
New Discussion

vg00 mirror recreate

 
SOLVED
Go to solution
Sean Dale
Trusted Contributor

vg00 mirror recreate

8/0.6.0 and 8/4.6.0 are mirrors of each other.

8/4.6.0 failed miserably and HP engineer replaced it.

My question:
I need to break and recreate the mirror as soon as possible (vg00) but, I cannot determine which drive was the primary and which was the mirror. How can I determine this? OR, do I even need to know this? I have been able to find every other piece of info I could possibly want. Any insight would be greatly appreciated.
Live life everyday
22 REPLIES 22
Rodney Hills
Honored Contributor
Solution

Re: vg00 mirror recreate

As long as they were true mirrors of each (boot info and all), then it doesn't matter which was the primary.

As soon as you added the new disk drive (and gave it the same scsi address), then the mirroring software should have sync'd up the data.

My 2 cents.

-- Rod Hills
There be dragons...
S.K. Chan
Honored Contributor

Re: vg00 mirror recreate

The "setboot" command will show your which is the primary and secondary boot path.
# setboot
Not quite sure why you would want to break the mirror. As long as you know which disk failed, you would just shutdown and replaced the disk. After the disk is replaced you simply run ..(assuming c2t2d0 is the replaced disk).
# mkboot -l /dev/rdsk/c2t2d0
# mkboot -a "hpux -lq" /dev/rdsk/c2t2d0
# vgcfgrestore -n vg00 /dev/rdsk/c2t2d0
=> recovers LVM info to disk
# vgchange -a y vg00
=> enables new root disk
# vgsync vg00
=> configure LVs and copies data from primary disk
Sean Dale
Trusted Contributor

Re: vg00 mirror recreate

By doing so, do you mean removing the device file and recreating the node?

I haven't done anything yet except boot the system with the new drive installed.

When I do an ioscan-FCdisk, the new drive shows up as claimed.
Live life everyday
James R. Ferguson
Acclaimed Contributor

Re: vg00 mirror recreate

Hi:

It doesn't matter which disk was the primary and which was the mirror.

'vgsync' will synchronize the mirrors.

Regards!

...JRF...
steven Burgess_2
Honored Contributor

Re: vg00 mirror recreate

Hi

If it's vg00 , are you refering to your primary and alternate path

If so type

# setboot
Primary bootpath : 8/4.5.0
Alternate bootpath : 8/16/5.0.0

Autoboot is ON (enabled)
Autosearch is ON (enabled)

Are you using mirror disk UX ?

Also

lvlnboot -v

Will give you more with regard to your root disks etc

HTH

Steve




take your time and think things through
S.K. Chan
Honored Contributor

Re: vg00 mirror recreate

By doing so, do you mean removing the device file and recreating the node?
=> No the new disk that you've installed MUST be set to the same scsi id as the previous "failed" disk. We want to use the same device file.

When I do an ioscan-FCdisk, the new drive shows up as claimed.
=> Proceed with the steps that I provided.
Sean Dale
Trusted Contributor

Re: vg00 mirror recreate

This is the result I got:

Primary bootpath: 8/0.6.0
Alternate bootpath: 8/4.6.0

Autoboot is ON (enabled)
Autosearch is ON (enabled)
Live life everyday
Ashwani Kashyap
Honored Contributor

Re: vg00 mirror recreate

YOu don't have to break or recreate the mirrors. THe following steps should help :
1. Shutdown the system and replace the failed disk .

2. Boot the system form the alternate disk in single user mode ( if necessary over ride the quorum )

3. Assuming that the failed disk has the following device file c0t6d0 do
#pvcreate -B /dev/rdsk/c0t6d0

4.# vgcfgrestore -n /dev/vg00 /dev/rdsk/c0t6d0
5.# vgchange -a y /dev/vg00
6. #mount /usr
7. #mkboot /dev/rdsk/c0t6d0
8. # mkboot -a "hpux -lq(;0)/stand/vmunix" /dev/rdsk/c0t6d0
9.#lvlnboot -R
10. Verify BDRA
#lvlnboot -v
11. # vgsync /dev/vg00
12 . Recreate any LV's that were not mirrored on the failed sisks .
13. cd /
14. # shutdown -r

After the reboot your system should be fully recovered .
James R. Ferguson
Acclaimed Contributor

Re: vg00 mirror recreate

Hi (again) Sean:

After you have physically replaced the disk and followed the instructions S.K. Chan provided, you can use 'setboot' to establish the primary and alternate boot paths according to your preference. Remember too, to use 'lvlnboot' commands to appropriately set root, swap, dump and boot.

A good overview of different disk recoveries (i.e. with/without mirroring) can be found in the Technical Knowledge Base document #KBAN00000347.

Regards!

...JRF...
Sean Dale
Trusted Contributor

Re: vg00 mirror recreate

Thanks to all who responded and thanks for responding quickly. If I am going to need a reboot, I will not be able to do anything until this evening or next scheduled downtime. I'll post with results of instructions from everyone. Again, thanks.
Live life everyday
Sean Dale
Trusted Contributor

Re: vg00 mirror recreate

I went through the commands and the mirror appears to be intact.
However, I did not run pvcreate or mkboot.

Question: When I run lvlnboot -v , it shows both drives as 'boot'. Can I assume that I do not need to create the device file or use lvlnboot to create and LIF file for the drive? Or, do I HAVE to run those 2 commands for the 2nd drive to be a true bootable mirror of the 1st?

Thanks
Live life everyday
S.K. Chan
Honored Contributor

Re: vg00 mirror recreate

Question: When I run lvlnboot -v , it shows both drives as 'boot'. Can I assume that I do not need to create the device file or use lvlnboot to create and LIF file for the drive? Or, do I HAVE to run those 2 commands for the 2nd drive to be a true bootable mirror of the 1st?

I'm not quite sure at what state is your vg00. Typically "lvlnboot -v" should show something like this .. for a properly mirrored vg00, ie all vg00's lvols are mirrored. Is this what you're seeing ?

Boot Definitions for Volume Group /dev/vg00:
Physical Volume belonging in Root Volume Group:
/dev/dsk/c1t2d0 (0/0/1/1.2.0) -- Boot Disk
/dev/dsk/c2t2d0 (0/0/2/0.2.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c1t2d0
/dev/dsk/c2t2d0
Root: lvol3 on: /dev/dsk/c1t2d0
/dev/dsk/c2t2d0
Swap: lvol2 on: /dev/dsk/c1t2d0
/dev/dsk/c2t2d0
Dump: lvol2 on: /dev/dsk/c1t2d0, 0

If yes you need to verify one more thing ..
# lifls /dev/rdsk/
to make sure the ISL,HPUX,AUTO and LABEL and possibly some other LIF files related to ODE exists.
James R. Ferguson
Acclaimed Contributor

Re: vg00 mirror recreate

Hi Sean:

If 'lvlnboot -v' shows both devices as bootable, and both devices are shown for 'boot', 'swap' and 'root' (assuming that you had mirrored these before [you should], then all should be OK.

Regards!

...JRF...
Sean Dale
Trusted Contributor

Re: vg00 mirror recreate

Boot definitions look great.

When I do lifls for the drive, I get no such file or directory. I'm thinking this is because I did NOT run mkboot or pvcreate. I didn't think I would need to do either since the node existed for the bad drive and the new drive is the same. I also thought the vgsync would restore all of the data from one drive to the other. Do I need to run pvcreate or mkboot? Why or why not?

I'm getting there...
Live life everyday
S.K. Chan
Honored Contributor

Re: vg00 mirror recreate

Are you sure you got the right device file ? For example .. (assuming c4t0d2 is the mirrored boot disk)
# lifls /dev/rdsk/c4t0d2
If c4t0d2 is not the boot disk it'll give you error like this ..
"lifls: Can't list /dev/rdsk/c4t0d2; not a LIF volume" instead of error "no such file or directory". The purpose of running "mkboot" is to place the boot utilities or program (ISL,HPUX,LABEL and AUTO) onto the disk if you want that disk to be bootable.
S.K. Chan
Honored Contributor

Re: vg00 mirror recreate

I forgot to mention .. check your primary root disk (the one that isn't failing/replaced)..
# lifls /dev/rdsk/cXtYdZ
Do you just see ISL,AUTO,LABEL,PAD and HPUX or some additional LIF files like ..
ODE,MAPFILE,SYSLIB,CONFIGDATA,SLMOD2,SLDEV2,SLDRV2,SLSCSI2,MAPPER2,IOTEST2,PERFVER2,PVCU and SSINFO ???
If you see a whole lot more LIF files you need to do this .. (ie install those additional ODE LIF files)..

Installing ODE (Offline Diagnostics)
------------------------------------
# ll /usr/sbin/diag/lif/updatediaglif
=> Make sure the file exist.
# lifls -l /dev/rdsk/cXtYdZ
=> List content of LIF dir (should have ISL,AUTO,HPUX,PAD,LABEL).
# mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c2t2d0
=> Install ODE LIF files while "preserving" the existing LIF files.
=> Use updatediaglif2 for 11.0 64-bit.
# lifls -l /dev/rdsk/cXtYdZ
=> Should now see the additional LIF files.
James R. Ferguson
Acclaimed Contributor

Re: vg00 mirror recreate

Hi (again) Sean:

Interesting. It won't hurt to run 'mkboot' and 'lvlnboot' on the replaced disk:

# mkboot /dev/rdsk/cXtYdZ
# mkboot -a "hpux -lq /stand/vmunix" /dev/rdsk/cXtYdZ
# lvlnboot -R

Regards!

...JRF...
Sean Dale
Trusted Contributor

Re: vg00 mirror recreate

Here is what I get for the 'good' drive:

#lifls /dev/rdsk/c0t6d0

ODE SLDEV PERFVER AUTO MAPFILE SLDRIVERS PVCU LABEL CONFIGDATA MAPPER HPUX SLMOD IOTEST ISL

---

Here's what I get on the replaced drive:

#lifls /dev/rdsk/c1t6d0

lifls: Can't list /dev/rdsk/c1t6d0;
not a LIF volume
Live life everyday
Sean Dale
Trusted Contributor

Re: vg00 mirror recreate

It looks like I just need to run mkboot with the appropriate parameters. I'll try that now, thank you everyone.
Live life everyday
Sean Dale
Trusted Contributor

Re: vg00 mirror recreate

I think everything is done now and ok. The other thing that concerns me (maybe it shouldn't) is this:

When I do a lifls on the new drive, I get all of the same files as the other drive with these exceptions- SYSLIB, SLSCSI and SSINFO appear only on the new drive. Does that matter?
Live life everyday
S.K. Chan
Honored Contributor

Re: vg00 mirror recreate

Mmm.. this has never happened to me before.. it does matters because you would essentially want the ODE files to be of the same on both your disks. First of all, are you using the correct file .. updatediaglif2 for 64bit and updatediaglif for 32bit ? To check if your system is running 32 or 64 .. run ..
# getconf KERNEL_BITS
If you have used the wrong file..for example you've used updatediaglif instead of updatediaglif2 on a 64 bit system, then you need to remove those LIF files again and re-run the mkboot. To remove LIF files..(example SLMOD2)
# lifrm /dev/rdsk/cXtYdZ:SLMOD2
One more thing you need to check .. can you give the output of this ..
# lifls -l /dev/rdsk/cXtYdZ
on both your disk .. I just want to make sure the file size of those LIF files are the same. The should be the same for the same version of ODE.
Sean Dale
Trusted Contributor

Re: vg00 mirror recreate

Everything is correct now. I screwed up and used updatediaglif instead of updatediaglif2 (I have 64bit v11). Thank you very much for helping me with this. I know resyncing a mirror shouldn't be a big deal, but, hey, that's how we learn. If I ever run into this again, I'll know just what to do. Thanks again.
Live life everyday