LVM and VxVM

vgcfgrestore failed on new mirrored disk

 
SOLVED
Go to solution
JUP
Regular Advisor

vgcfgrestore failed on new mirrored disk

I am running HP 11.23 on Itanium 2.

I have just replaced the second hard disk of a three disk mirrored array (/dev/dsk/c4t1d0) with a new identical disk.

I typed in :

vgcfgrestore -n vg01 /dev/rdsk/c4t1d0

and got the following message:

Cannot restore Physical Volume "/dev/dsk/c4t1d0". Detach the PV or deactivate the VG before restoring the PV.


The new disk was used once (as VG02). However I have removed the VG from it and tried using it as the spare.

Any ideas what the system wants me to do ?

Thanks in advance
JUP
13 REPLIES 13
Ranjith_5
Honored Contributor

Re: vgcfgrestore failed on new mirrored disk

Hi Jup,

You have to deactivate the VG before doing vgcfgrestore.To achieve this do

#vgchange -an vg01

Else to Detach a path to a PV do

#pvchange -a n /dev/dsk/c2t0d2

can you try this. You can also see the steps to do the vgcfgrestore in the man page of the same.

Regards,
Syam
JUP
Regular Advisor

Re: vgcfgrestore failed on new mirrored disk

Does that meean I have to stop all programs running on the disk array before I de-activate it ?

I guess I'm asking if I'm inserting a new disk do I have to disable the volume group as I wish to have all programs continue to run ?

THanks in advance
JUP
Ranjith_5
Honored Contributor

Re: vgcfgrestore failed on new mirrored disk

All the processes related to this volume group needs to be stopped since the VG canno tbe accessed in a deactivated state. After vgcfgrestore you can again activate the vg by issuing.

#vgchange -ay vg01.

Regards,
Syam
Sunil Sharma_1
Honored Contributor

Re: vgcfgrestore failed on new mirrored disk

Jup,

steps should be like this.
make sure SCSI ID of new disk is same as old disk so the device file.

#pvcreate -f /dev/rdsk/c4t1d0
#vgcfgrestore -n vg01 /dev/rdsk/c4t1d0


if new disk device file is different then old disk then
#vgcfgrestore -n vg01 -o /dev/rdsk/c4t1d0

I don't think you need to deactivate volume group to run vgcfgrestore command.

Sunil


Is this disk is registered in /etc/lvmatb ?
*** Dream as if you'll live forever. Live as if you'll die today ***
Sunil Sharma_1
Honored Contributor

Re: vgcfgrestore failed on new mirrored disk

You have to use -R option with vgcfgrestore if you want to do it when vg is active.



Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
Robert-Jan Goossens
Honored Contributor

Re: vgcfgrestore failed on new mirrored disk

Jup,

Check this doc.

http://www4.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000072292441

Document description: Replace failed root and non-root LVM disks on Itanium.
Document id: KBRC00014036

Regards,
Robert-Jan
JUP
Regular Advisor

Re: vgcfgrestore failed on new mirrored disk

Robert - I could not log into that link. Is it on a different server ?

COuld you please attach the document for me.

THanks
JUP
Robert-Jan Goossens
Honored Contributor
Solution

Re: vgcfgrestore failed on new mirrored disk

Ranjith_5
Honored Contributor

Re: vgcfgrestore failed on new mirrored disk

Hi,

Your problem resolved?

Regards,
Syam