1834009 Members
4366 Online
110063 Solutions
New Discussion

pvcreate error

 
SOLVED
Go to solution
Bakang Moatlhodi
Frequent Advisor

pvcreate error


Wehn I run pvcreate on a disk it comes with an error : pvcreate -f /dev/rdsk/c13t2d7
pvcreate: writing LVM record: I/O error

When i run the dd on the disk the output is okay.

Then ran vgreduce but it failed, then i went and deleted the vg but the disk is not released. It still recognised it as attached to vg.
what should I do?
6 REPLIES 6
Franky_1
Respected Contributor
Solution

Re: pvcreate error

Hi,

i think i was facing a similar problem some time ago. My solution was the following :
create a new vg
import the disk in the new vg
delete all the lv's
delete the vg
remove the disk from lvm (pvremove)

HTH

Franky
Don't worry be happy
Steve Steel
Honored Contributor

Re: pvcreate error

Hi

dd reading is ok but there still could be a disk hardware failure which can be checked by attempting writing to the disk.

NOTE: All data will be lost.

# dd if=/dev/rdsk/[other disk] of=/dev/rdsk/c13t2d7 bs=64k count=160

Should you get I/O error replace the disk .



Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Ravi_8
Honored Contributor

Re: pvcreate error

Hi

Look like disk problem

#dd if=/dev/rdsk/c13t2d7 of=/dev/null bs=1024k

check for any I/O errors

post the o/p
never give up
Dietmar Konermann
Honored Contributor

Re: pvcreate error

I use to say "an i/o error is an i/o error is an i/o error". :-) Please verify using tusc if indeed a write(2) to the rdsk device fails. Writing to the same area using dd(1) should show the same problem then.

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Bakang Moatlhodi
Frequent Advisor

Re: pvcreate error

Hi all
Thanks for your responses, I have tried everything you guys suggested. this the outcome :

Franky, I tried the steps but whae I getto the part where I have to remove the LV I fail, the delete of vg as well fails and the pvremove. I am still stuck

Steve and Ravi
I did dd and the output was:
dd if=/dev/rdsk/c13t2d7 of=/dev/null bs=1024k
209+0 records in
209+0 records out

So I'm still stuck

Thirumalaimurugan.V
Occasional Advisor

Re: pvcreate error

Bakang,
It looks like disk problem.Initial sectors of the disk might have problem.
Replacement of disk should be soultion.