Operating System - HP-UX
1833788 Members
2252 Online
110063 Solutions
New Discussion

Cannot pvremove on symmetrix disk that is exported

 
SOLVED
Go to solution
Ra Jose
Regular Advisor

Cannot pvremove on symmetrix disk that is exported

I have a HP-UX 11iv1 (11.11) with all current patches. There is one EMC symmetrix disk I am having problem with. Sometime ago (may be over a year), this disk belonged to some VG. This VG was exported (so no LVM entries). All this happened long time ago. Now we don't know which VG was that and no mapfiles either. However, I see this disk on the server which has LVM structures on it. When I tries to remove it,
# pvremove /dev/rdsk/c11t0d0
pvremove: The physical volume "/dev/rdsk/c11t0d0" belongs to an exported volume group.
pvremove: Couldn't remove physical volume "/dev/rdsk/c11t0d0".

# xd -An -j8200 -N16 -td /dev/dsk/c11t0d0
27637323 1174588932 27637323 1134569648

# xd -An -j8192 -N8 -tc /dev/dsk/c11t0d0
L V M R E C 0 1

As you can see, I can't pvremove to get rid of LVM structures not I have a way to bring it backinto VG. I tries creating a test VG and tried to add into it.
# vgcreate -f vgOT /dev/dsk/c11t0d0
vgcreate: Volume group "/dev/vgOT" could not be created:
Device busy
#
I tried vgcreate with and without -f option, with no change.
Is there anyway to get rid of LVM structures on this disk or anyway I can put this into some test VG.

Thanks you all for your replies.

Rajos
6 REPLIES 6
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Cannot pvremove on symmetrix disk that is exported

Rather than using vgcreate I would try pvcreate -f. In any event, you can overwrite the LVM metatdata like this:

dd if=/dev/zero bs=64k count=128 of=/dev/rdsk/c11t0d0

Be very careful using pvcreate -f or dd in this context because you may be clobbering an LVM disk on another box.
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: Cannot pvremove on symmetrix disk that is exported

Hi:

You can do one of two things to erase the LVM information:

# /sbin/pvremove /dev/dsk/c11t0d0

(or):

# dd if-/dev/zero of=/dev/rdsk/c11t0d0 bs=64k count=100

Regards!

...JRF...
Ra Jose
Regular Advisor

Re: Cannot pvremove on symmetrix disk that is exported

I ran dd command. It is running forever.
The /dev/zero file is there. This is a test server, so not much worry. The ps -aef|grep dd shows the pid and I tried kill pid and kill -9 pid. Both could not work. When I exited the shell, this was handed to init, so now it is zombie. I cannot kill it at all.
Any suggestions, how to get rid off it.

Thank you.

Rajos
A. Clay Stephenson
Acclaimed Contributor

Re: Cannot pvremove on symmetrix disk that is exported

This is a rather good indication that there is something wrong with this disk device. The dd should have finished in a few seconds. When a process is waiting on i/o, the kill command delivers the signal but the process isn't actually running at that moment so the process can't respond to the signal.
If it ain't broke, I can fix that.
Piotr Kirklewski
Super Advisor

Re: Cannot pvremove on symmetrix disk that is exported

If you have another disk, try to swap them,and then:

# /sbin/pvremove /dev/dsk/c11t0d0

(or):

# dd if-/dev/zero of=/dev/rdsk/c11t0d0 bs=64k count=100
Jesus is the King
Ra Jose
Regular Advisor

Re: Cannot pvremove on symmetrix disk that is exported

Thank you all. The solution given by all (dd command) worked.