Operating System - HP-UX
1753726 Members
4803 Online
108799 Solutions
New Discussion юеВ

Re: replaced alt root drive, but vg indicates drive unavailable

 
SOLVED
Go to solution
Jerry_109
Super Advisor

replaced alt root drive, but vg indicates drive unavailable

root@hohp120[/root]
# uname -a ; model
HP-UX hohp120 B.11.11 U 9000/800 877940666 unlimited-user license
9000/800/A500-7X
################################

replaced alt root drive, but vg indicates drive unavailable. Tried vgcfgrestore also

################################

--- Physical volumes ---
PV Name /dev/dsk/c1t15d0
PV Status available
Total PE 4340
Free PE 12
Autoswitch On

PV Name /dev/dsk/c3t15d0
PV Status unavailable
Total PE 4340
Free PE 588
Autoswitch On


root@hohp120[/root]
root@hohp120[/root]
# vgcfgrestore -n /dev/vg00 /dev/rdsk/c3t15d0
vgcfgrestore: Cannot restore Physical Volume "/dev/dsk/c3t15d0",
Detach the PV or detactivate the VG, before restoring the PV.
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: replaced alt root drive, but vg indicates drive unavailable

It appears that you have the LVM data in a confused state perhaps as a result of a flawed replacement procedure. You will probably have to run vgreduce -f /dev/vg00 which will remove any missing PV's from lvmtab. You should then be able to create an alternate boot disk from scratch. You should first make sure that you can read the disk by using dd because you just might have a bad replacement disk. I assume that ioscan -C disk -fn display the disk as CLAIMED.
If it ain't broke, I can fix that.
Prashanth.D.S
Honored Contributor

Re: replaced alt root drive, but vg indicates drive unavailable

Hi,

If the disk is shown as claimed and try doing the following steps

#pvchange -a n /dev/rdsk/c3t15d0
#vgcfgrestore /dev/vgxx /dev/rdsk/c3t15d0
#pvchange -a y /dev/dsk/c3t15d0
#vgchange -a y -s -q n /dev/vgxx
#vgdisplay -v vgxx

Note: replace xx with the volume name accordingly.

Best Regards,
Prashanth
Prashanth.D.S
Honored Contributor

Re: replaced alt root drive, but vg indicates drive unavailable

Also would recommed you to upgrade the LVM OLR patch level to

[PHKL_31216/PACHRDME/English] s700_800 11.11 LVM Cumulative Patch; LVM OLR; SLVM 16 Node
[PHCO_30698/PACHRDME/English] s700_800 11.11 LVM commands cumulative patch; LVM OLR

I suspect the current patch level on your system should be PHCO_30698

Best Regards,
Prashanth
Jerry_109
Super Advisor

Re: replaced alt root drive, but vg indicates drive unavailable

Thanks, it works fine :

#pvchange -a n /dev/rdsk/c3t15d0
#vgcfgrestore /dev/vg00 /dev/rdsk/c3t15d0
#pvchange -a y /dev/dsk/c3t15d0
#vgchange -a y /dev/vg00
#vgdisplay -v vg00

#####################################

# swlist -l product | grep -i lvm
LVM B.11.11 LVM
PHCO_34196 1.0 LVM commands cumulative patch
PHKL_30607 1.0 VxVM,EMC,PM,vPar,slpq,KRS,DUMP,LVM,VM,DaS,IF
PHKL_34518 1.0 LVM Cumulative Patch; LVM OLR; SLVM 16 Node
skt_skt
Honored Contributor

Re: replaced alt root drive, but vg indicates drive unavailable

here is what i use to replace the failed disk or replacing pro-actively.

To list and verify the config file

adedd11n:root [/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)

Pvchange -a n /dev/dsk/c0t0d0
Replace the disk
Ioscan -fnH path
Diskinfo /dev/rdsk/c0t0d0

mkboot /dev/rdsk/c0t0d0

mkboot -b /usr/lib/uxbootlf /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}