Operating System - HP-UX
1831337 Members
3097 Online
110024 Solutions
New Discussion

Re: Can not pvcreate disk

 
SOLVED
Go to solution
simon peter
Occasional Contributor

Can not pvcreate disk

Hi
I have a test box which was 11i using VxVm and now has been configured to 11.The problem I am experiencing is that when I try and pvcreate the spare disk I get the following message :

# pvcreate -f /dev/rdsk/c0t6d0
pvcreate: Could not perform LVM operation on VxVM disk "/dev/rdsk/c0t6d0".

I have tried to a # /usr/bin/dd if=/dev/zero of=/dev/dsk/c0t6d0 bs=64kbut get the following message :

/dev/zero: No such file or directory
dd: cannot open /dev/zero

Can anyone please advise.

Regards
Simon
8 REPLIES 8
James R. Ferguson
Acclaimed Contributor
Solution

Re: Can not pvcreate disk

Hi Simon:

'pvremove' is intended just for this situation:

# pvremove /dev/rdsk/cXtYdZ

Regards!

...JRF...


Dietmar Konermann
Honored Contributor

Re: Can not pvcreate disk

Hi, Simon!

If you are 100% sure that this disk is no longer active for VxVM you can use pvremove to get rid of the header. Pls note that pvremove is only available on >=11.11.

If /dev/zero is missing, you can create it using:

# mknod /dev/zero c 3 3

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
James R. Ferguson
Acclaimed Contributor

Re: Can not pvcreate disk

Hi (again) Simon:

BTW, to recreate '/dev/zero' (assuming someone removed it):

# mknod /dev/zero c 3 0x000004 #...on 11.x

# chown bin:bin /dev/zero
# chmod 666 /dev/zero

On 11.0 you can create '/dev/zero' too, but use:

# mknod /dev/zero c 3 0x000003 #...on 11.0

Regards!

...JRF...
melvyn burnard
Honored Contributor

Re: Can not pvcreate disk

or simply do
dd if=/stand/vmunix of=/dev/rdsk/c0t6d0 bs=1024k

My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Dietmar Konermann
Honored Contributor

Re: Can not pvcreate disk

James,

thanks for pointing out the minor number 4 for /dev/zero.

Just had a closer look... /dev/zero was introduced with 11.00 with minor 4. Yes, it's 4 for 11.00 also!

The minor 3 is some legacy thing that also returns "something"... usually zeros, so it was often abused as /dev/zero e.g. with 10.20.

Beginning with 11.00 one should really use the 4. I just tested with a 11.00 box that returned non-zero contents on minor 3! So take care.

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
James R. Ferguson
Acclaimed Contributor

Re: Can not pvcreate disk

Hi Dietmar:

Thank you, for the information. I can always count on you to really dig!

I meant to note that you can create a '/dev/zero' on *10.20* with a minor number of <3> but wrote "11.x" for some dumb reason.

I was vaguely aware that the 10.20 device was "usually zeros" and glad to know that it can't be relied upon for fidelity.

With warmest regards!

...JRF...
simon peter
Occasional Contributor

Re: Can not pvcreate disk

Thanks guys for the help after following Dietmar Konermann i ran the dd again which took several hours all works ok.
James R. Ferguson
Acclaimed Contributor

Re: Can not pvcreate disk

Hi (again) Simon:

Since you goal is to erase the VxVM information, 'pvremove' would be preferred since this is for what it is designed.

If you choose to use 'dd' with '/dev/zero', you would only need to do something like:

# dd if=/dev/zero of=/dev/rdsk/cXtYdZ bs=256k count=10

...should suffice nicely.

Regards!

...JRF...