Operating System - HP-UX
1849835 Members
2435 Online
104044 Solutions
New Discussion

Mirroring system disk on L1000 (HP/UX B.11.11)

 
SOLVED
Go to solution
Alexander Yereshenko
Frequent Advisor

Mirroring system disk on L1000 (HP/UX B.11.11)

Hello!
I faced a problem: one of mirrored system disks has failed and I've already replaced it with a new one. So, I need to restore its mirroring now.
I used the "When_Good_Disks_Go_Bad.pdf" document:
1. ioscan -fnC disk
disk 1 0/0/2/0.2.0 sdisk CLAIMED DEVICE HP 18.2GST318406LC
/dev/dsk/c2t2d0 /dev/rdsk/c2t2d0
2. # pvcreate -B /dev/rdsk/c2t2d0
pvcreate: The physical volume already belongs to a volume group
3. # vgextend /dev/vg00 /dev/dsk/c2t2d0
vgextend: The physical volume "/dev/dsk/c2t2d0" is already recorded in the "/etc/lvmtab" file.
4. # mkboot /dev/rdsk/c2t2d0
5. # mkboot -a "hpux -lq" /dev/rdsk/c2t2d0
6. # pvdisplay -v /dev/dsk/c1t2d0 | grep 'current.*0000 $'
00000 current /dev/vg00/lvol1 00000
00021 current /dev/vg00/lvol2 00000
00533 current /dev/vg00/lvol3 00000
00568 current /dev/vg00/lvol4 00000
00584 current /dev/vg00/lvol5 00000
00589 current /dev/vg00/lvol6 00000
00725 current /dev/vg00/lvol7 00000
01033 current /dev/vg00/lvol8 00000
01321 current /dev/vg00/lvpatches 00000
02115 current /dev/vg00/lvol9 00000
03876 current /dev/vg00/lvol25 00000

And the next command returned an error:
# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t2d0
lvextend: "MirrorCopies" parameter "1" must be larger than existing number "1".

Could you help me, please, to mirror system disk?
12 REPLIES 12
Torsten.
Acclaimed Contributor

Re: Mirroring system disk on L1000 (HP/UX B.11.11)

Hi,

looks like you followed the "how to mirror ..." procedure, but your drive was already mirrored.
For this reason you get the messages.

after the commands

vgcfgrestore -n vg00 ...
(this will restore the LVOL config)
and
vgchange -a y vg00

you should perform this
"For a PA-RISC server, follow steps 4, 5, and 7 in Appendix A: How to mirror the root volume (PA-RISC servers)."

(device files are examples)

# mkboot /dev/rdsk/c2t15d0
# mkboot â a â hpuxâ /dev/rdsk/c2t15d0
# lvlnboot -R /dev/vg00

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!   
skt_skt
Honored Contributor
Solution

Re: Mirroring system disk on L1000 (HP/UX B.11.11)

This had worked for me always to replace a failed root disk.

[/root] vgcfgrestore -n /dev/vg00 -l
Volume Group Configuration information in "/etc/lvmconf/vg00.conf"
VG Name /dev/vg00
---- Physical volumes : 2 ----
/dev/rdsk/c0t0d0 (Bootable)
/dev/rdsk/c3t0d0 (Bootable)

mkboot /dev/rdsk/c0t0d0

mkboot -b /usr/lib/uxbootlf /dev/dsk/c0t0d0
Pvchange -a n /dev/dsk/c0t0d0
vgcfgrestore -F -n vg00 /dev/rdsk/c0t0d0
Pvchange -a y /dev/dsk/c0t0d0
vgchange -a y vg00
vgsync vg00

lvlnboot -R

for lif_comp in `lifls /dev/dsk/c3t0d0`
do
/usr/bin/lifcp /dev/dsk/c3t0d0:${lif_comp} /dev/dsk/c0t0d0:${lif_comp}
Mridul Shrivastava
Honored Contributor

Re: Mirroring system disk on L1000 (HP/UX B.11.11)

The above mentioned procedure you have to perform in lvm maintenance mode, the reason is that we should not execute vgcfgrestore when a volume group is active and it is not possible to deactivate the vg00 in multiuser mode...

The other thing you could check on the system is if there are LVM OLR patches installed.. If they are available then you don't have to reboot the box in lvm maintenance mode just execute the following command then follow the above mentioned procedure:
pvchange -a n /dev/dsk/c2t2d0

Then execute the above mentioned commands and once u r done with them execute the following :
pvchange -a y /dev/dsk/c2t2d0
and then vgchange -a y vg00

This should fix the issue..
Time has a wonderful way of weeding out the trivial
Patrick Wallek
Honored Contributor

Re: Mirroring system disk on L1000 (HP/UX B.11.11)

Not true at all. You most certainly can do a vgcfgrestore while a VG is active. It most definitely works. If the disk is hot swappable, there is absolutely no reason to shut down to replace disk, even a VG00 disk.
Mridul Shrivastava
Honored Contributor

Re: Mirroring system disk on L1000 (HP/UX B.11.11)

Patric,

I referred the man pages for vgcfgrestore and it clearly says:

vgcfgrestore cannot be performed on devices attached to activated volume groups. Prior to restoring a backup configuration to a disk,detach the PV from the volume group using the pvchange(1M) command, or
deactivate the volume group using the vgchange(1M) command.

Please correct me If I am worng.
Time has a wonderful way of weeding out the trivial
Mridul Shrivastava
Honored Contributor

Re: Mirroring system disk on L1000 (HP/UX B.11.11)

Going down to man pages it says:

Mismatch between the backup file and the running kernel: Kernel indicates X disks for /dev/vgname; /etc/lvmconf/vgname
indicates Y disks. Cannot proceed with the restoration. Deactivate the Volume Group and try again.

In this case, the user is advised to deactivate the volume group first, then use the vgcfgrestore command to restore configuration data when the volume group is unavailable. But if the volume group has to stay available and the user is absolutely sure the configuration file is correct, this option will restore data from the configuration file when the volume group stays available.

This is the reason it is not advisable to perform vgcfgrestore when vg is active.
Time has a wonderful way of weeding out the trivial
Alexander Yereshenko
Frequent Advisor

Re: Mirroring system disk on L1000 (HP/UX B.11.11)

2 Torsten-:
# lvlnboot -R /dev/vg00
lvlnboot: Logical Volume has no extents.
lvlnboot: Logical Volume has no extents.
lvlnboot: Logical Volume has no extents.
vgcfgbackup: Invalid LVMREC on Physical Volume /dev/rdsk/c2t2d0
Torsten.
Acclaimed Contributor

Re: Mirroring system disk on L1000 (HP/UX B.11.11)

Looks like you mismatched the steps.
Run
vgdisplay -v vg00
strings /etc/lvmtab
lvlnboot -v

now and post to let us see your current status.

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!   
Patrick Wallek
Honored Contributor

Re: Mirroring system disk on L1000 (HP/UX B.11.11)

Mridul,

Ahhh, but if a disk has gone bad and you replace it, at that point the disk is *NOT* actually active in the VG. That is why you are running vgcfgrestore on it. Once you run vgcfgrestore vgchange, *THEN* the new disk is active in the VG.

I have replaced disks and run vgcfgrestore **numberous** times and never had any problems and have never deactivated the VG.
Torsten.
Acclaimed Contributor

Re: Mirroring system disk on L1000 (HP/UX B.11.11)

Patrick is right, if the disk is replaced, the new disk *is* de-activated.

vgcfgrestore -n ...

vgchange -a y vg... (this will activate the disk again - so there is no problem with this.

(Without doing a vgcfgrestore you cannot activate the disk because of the missing LVM config on it).

Trying this on an active PV you will get

# vgcfgrestore -n vg00 /dev/rdsk/c0t6d0
vgcfgrestore: Cannot restore Physical Volume "/dev/dsk/c0t6d0",
Detach the PV or detactivate the VG, before restoring the PV.

(11.11)


Actually the wrong step was
"3. # vgextend /dev/vg00 /dev/dsk/c2t2d0
vgextend: The physical volume "/dev/dsk/c2t2d0" is already recorded in the "/etc/lvmtab" file."

@Alexander: proceed as mentioned above.

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!   
Alexander Yereshenko
Frequent Advisor

Re: Mirroring system disk on L1000 (HP/UX B.11.11)

2 Torsten:
I've attached information you've asked me for in L1000.txt.
Alexander Yereshenko
Frequent Advisor

Re: Mirroring system disk on L1000 (HP/UX B.11.11)

2 Santhosh Kumar Theyyan:
I made all actions as you've adviced and replaced disk began to blink as second one, but I didn't understand, how to proceed the next operation:
"for lif_comp in `lifls /dev/dsk/c3t0d0`
do
/usr/bin/lifcp /dev/dsk/c3t0d0:${lif_comp} /dev/dsk/c0t0d0:${lif_comp}".