Operating System - HP-UX
1837132 Members
2402 Online
110112 Solutions
New Discussion

Re: Can't use replaced mirror disk

 
SOLVED
Go to solution
David Whitehead
Advisor

Can't use replaced mirror disk

Ok here's the scenario:

Mirrored volume group vg00 with one mirror disk. Mirror disk fails, is replaced with another, pvcreate the new disk and get:

'pvcreate: The physical volume already belongs to a volume group'

and so begine the long tale of every command I try results in 'this disk is already here' type errors, followed by stuff like:

'vgreduce: Couldn't query physical volume "/dev/dsk/c0t5d0":
The specified path does not correspond to physical volume attached to this volume group'

I also tried blitzing the /etc/lvmtab file and recreating with vgscan but still no go.

Anyone got any ideas?

Oh, BTW I am remote and the machine is live so single user mode is a no go.

Here's hoping :)

David Whitehea
3 REPLIES 3
Sridhar Bhaskarla
Honored Contributor

Re: Can't use replaced mirror disk

David,

1) Use pvcreate -f command to create the physical volume

2) About the failed volume in the volume group, you need to run vgcfgrestore. Follow this procedure.

#vgcfgrestore -n /dev/vg00 /dev/dsk/cxtydz
#vgchange -a y vg00
#mkboot /dev/rdsk/cxtydz
#mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/cxtydz

(if you have DIAGNOSTICS installed)
#cd /usr/sbin/diag/lif
#mkboot -vb updatediaglif2 -p ISL -p AUTO -p HPUX -p LABLE /dev/rdsk/cxtydz

#vgsync vg00

#lvlnboot -R

This should do the job.

Once the vgsync is done, verify if everything is ok by doing

#lvlnboot -v

(make sure both the disks are shown bootable)
and the boot,root,swap logical volumes showing up no both the disks)

This should work.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor
Solution

Re: Can't use replaced mirror disk

Hi (again) David,

I read your messsage again. To clarify a bit further.

Don't add the new disk to the volume group using vgextend command.
vgcfgrestore explained in the above procedure should replace the failed disk with the new disks by restoring the VG structure.

Ignore the messages you get while running vgcfgrestore. vgchange -a y will take care of it.

All the best.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
David Whitehead
Advisor

Re: Can't use replaced mirror disk

Excellent! thanks friend that was bang on the money.

I had seen the same procedure in other threads here but was a little freaked out by the messages returned from the vgcfgrestore bit and so didn't carry on with the whole solution. Thanks for making the vgchange part clear :)