Operating System - HP-UX
1833679 Members
4266 Online
110062 Solutions
New Discussion

pvcreate command gives unexpected reply

 
SOLVED
Go to solution
Frank de Vries
Respected Contributor

pvcreate command gives unexpected reply

We have HPUX 11.00 and we changed a disk,
hot swappable.
We see the disk with ioscan -fnC disk.
and with diskinfo .

But when we do
[root@orasrv1:]/etc<>>> pvcreate -f -B /dev/rdsk/c2t6d0
pvcreate: The physical volume "/dev/dsk/c2t6d0" is already recorded in the "/etc/lvmtab" file.
[root@orasrv1:]/etc<>>>

That is true , it is in the /etc/lvmtab,
why does that stop the command from doing its job. Especially when it is forced -f.

Look before you leap
6 REPLIES 6
Luk Vandenbussche
Honored Contributor

Re: pvcreate command gives unexpected reply

Frank,

Have you changed a mirrored disk, based on the precious threads?

What is the status of vgdisplay -v vgxx?
Torsten.
Acclaimed Contributor

Re: pvcreate command gives unexpected reply

for safety reasons I guess.

You should first vgreduce this disk, then pvcreate it and add it to a VG.

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!   
Luk Vandenbussche
Honored Contributor

Re: pvcreate command gives unexpected reply

reduce your mirror copies

lvreduce -m 0 -f /dev/vg00/lvolx /dev/dsk/c2t6d0

vgremove -f /dev/dsk/c2t6d0

Remirror your volumegroup vg00
Patrick Wallek
Honored Contributor
Solution

Re: pvcreate command gives unexpected reply

pvcreate is doing its job and preventing you from, potentially, completely disrupting an existing VG. You don't need to pvcreate a disk when it has been replaced like this.

Since you are attempting to do a pvcreate with the '-B' to create the boot area, I'll assume that this is a root / boot / VG00 disk.

Have a look at this document, specifically chapter 6 for replacing a disk:
http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf

whiteknight
Honored Contributor

Re: pvcreate command gives unexpected reply

Frank

Apparently this /dev/dskc2t6d0 belongs to one of the vgs
Did you try
#strings /etc/lvmtab to check ?
#mv /etc/lvmtab /etc/lvmtab.old
#vgscan -v


WK
Problem never ends, you must know how to fix it
Frank de Vries
Respected Contributor

Re: pvcreate command gives unexpected reply

Thanks Patrick,
the Step 3 of your doc in chapt 6 with vgcfgrestore and vgchange did the job.
(No need to do the other commands)

vgscan would have f***up my lvmtab.
(try vgscan -p -v first to view what will happen)
Look before you leap