Operating System - HP-UX
1754915 Members
3789 Online
108827 Solutions
New Discussion юеВ

pvcreate error: damaged disk?

 
SOLVED
Go to solution
Mihails Nikitins
Super Advisor

pvcreate error: damaged disk?

Hello,

I got the following error trying to create physical volume

# pvcreate /dev/rdsk/c0t4d0
pvcreate: clearing the bad block directory: I/O error

iocsan and diskinfo recognize the disk (c0t4d0)

# ioscan -fn -C disk

============================
disk 0 56/52.1.0 disc3 CLAIMED DEVICE SEAGATE ST34520N
/dev/dsk/c0t1d0 /dev/rdsk/c0t1d0
/dev/floppy/c0t1d0 /dev/rfloppy/c0t1d0
disk 2 56/52.4.0 disc3 CLAIMED DEVICE FUJITSU M2909S-512
/dev/dsk/c0t4d0 /dev/rdsk/c0t4d0
/dev/floppy/c0t4d0 /dev/rfloppy/c0t4d0


# diskinfo -v /dev/rdsk/c0t4d0
SCSI describe of /dev/rdsk/c0t4d0:
vendor: FUJITSU
product id: M2909S-512
type: direct access
size: 3027417 Kbytes
bytes per sector: 512
rev level: 0127
blocks per disk: 6054834
ISO version: 0
ECMA version: 0
ANSI version: 2
removable media: no
response format: 2

How it is possible to get to know if the disk is physically damaged? The disk allows to copy something by dd, however, sometimes claims I/O errors

# dd if=/etc/ntp.conf of=/dev/dsk/c0t4d0
9+1 records in
9+1 records out

# dd if=/etc/ntp.conf of=/dev/rdsk/c0t4d0
I/O error
9+1 records in
9+1 records out

Thanks in advance! Any ideas will be highly appreciated!

Best regards,
Mihails
KISS - Keep It Simple Stupid
9 REPLIES 9
Pedro Sousa
Honored Contributor

Re: pvcreate error: damaged disk?

perform the following:
dd if=/dev/rdsk/c0t5d0 of=/dev/null bs=xxxx
(bs is the block size)
it should give something like this:
184436+0 records in
184436+0 records out

if it doesn't, then maybe you have an hw error.
good luck.
Wieslaw Krajewski
Honored Contributor

Re: pvcreate error: damaged disk?

Hi,

Try the mediainit command that reinitialize disk.
Takes some time but helps.
Permanent training makes master
melvyn burnard
Honored Contributor

Re: pvcreate error: damaged disk?

From your posting it seems that dd is sometimes failing with an I/O error. That is a fairly certain sign that the disk is not good, if all other discs on the same interface are not experiencing problems.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Edward Sedgemore
Trusted Contributor
Solution

Re: pvcreate error: damaged disk?


DD reporting an error means there is a problem with the filesystem on the disk, not necessarily the disk itself. May only be a bad block which needs to be remapped in order for it to be usable.

On a PC you would run a low-level formatter to remap all the bad blocks and make it useable. On HP-UX use the mediainit command to do the low level format. Only if mediainit fails then the disk is no good.
Vincenzo Restuccia
Honored Contributor

Re: pvcreate error: damaged disk?

Try with pvcreate -f /dev/rdsk/c0t4d0
Cheryl Griffin
Honored Contributor

Re: pvcreate error: damaged disk?

I agree with a few statements here.
Use dd to wipe out the disk, overwrite the disk header. Also the pvcreate -f to force the writing of the header are good.

One thing to note about mediainit, it works for HP disks. If your disk is a 3rd party disk it may/maynot work. Simply put, there is no guarantee it will work. Check with your vendor, they may have some formatter to use instead.
"Downtime is a Crime."
Celso Medina Kern
Trusted Contributor

Re: pvcreate error: damaged disk?

Hi,

If dd fails with i/o error reading from or writing to the disk it means your it is damaged. You can confirm it if you have Support Tool Manager installed in this system. Run `mstm` - Menu tools, run, utility, select logtool with spacebar, ok.
In logtool, select view menu, formatted log, choose dir to write it, ok. After formatting it, you can check if there are hardware errors logged from your disk. It is identified by its hardware path. Issue an `lssf /dev/dsk/` to find it.
If you have an HP hardware support agreement, You can ask a Customer Engineer to do that for you.
God bless pessimists, they did the backup!
Jim Moffitt_1
Valued Contributor

Re: pvcreate error: damaged disk?

I agree with Vincenzo, the -f option should force the creation of this disk.
Massimo_20
Frequent Advisor

Re: pvcreate error: damaged disk?

I'm not agree with Vincenzo because if you have a disk damage the -f option doesn't work.
For me, is best to check the disk with the dd command.