1820661 Members
2536 Online
109626 Solutions
New Discussion юеВ

IO Error using dd

 
SOLVED
Go to solution
Bugs_Bnny
Occasional Contributor

IO Error using dd

Hi ALL,

I am using dd to transfer data between two logical volumes in two diff VG's and I am getting the following error
"I/O Error"
20001+0 records in
20000+1 records out

why does this error occur , how can i fix this , the disks are fine as I do not see any scsi errors in my syslog or dmesg.
Thanks in adv,
Bugs_Bnny

Better ask and be a fool once than never to ask and be a fool forever
8 REPLIES 8
Pete Randall
Outstanding Contributor
Solution

Re: IO Error using dd

What's up doc?

Anyway, does vgdisplay show the two VG to be identical in number and size of PE's?

Pete

Pete
Pete Randall
Outstanding Contributor

Re: IO Error using dd

And what are you using for a block size on your dd command?

Pete

Pete
RAC_1
Honored Contributor

Re: IO Error using dd

dd does block by block copy.
if it is saying i/o error, then check with fsck on both lvols.
There is no substitute to HARDWORK
Paul Sperry
Honored Contributor

Re: IO Error using dd

Looks like the source or destination hard disk has bad blocks. Use the command
dd if=/dev/rdsk/c0t1d0 of=/dev/null bs=1024k, to check to see if the command gives the same I/O Error.
Once again it depends whether the HDD is used as a physcial volume or it is a raw disk. If it is a physical volume and is part of a volume group, the lvm subsystem will take care about bad block relocation.
A. Clay Stephenson
Acclaimed Contributor

Re: IO Error using dd

You need to do an echo ${?} immediately upon the exit of dd to indicate the errno BUT it appears that you have reached the end of the lvol on the destination. The '+ 0' means that no partial blocks were read but the '+ 1' indicates that a partial block was written. If you are going to do this kind of transfer, you need to make certain that the destination is at least as big as the source. I would also specify a rather large blocksize (e.g. bs=8000k) to speed the process.
If it ain't broke, I can fix that.
Marco Santerre
Honored Contributor

Re: IO Error using dd

I was just about to mention to make sure that your destination Logical Volume has the same number of extent as your Source Logical Volume.
Cooperation is doing with a smile what you have to do anyhow.
Eugeny Brychkov
Honored Contributor

Re: IO Error using dd

This error you receive is most probably means that source volume has more physical extents than destination can keep (Pete is right). So dd did not finish reading source volume, but destination volume appeared reached its end
Eugeny
Bugs_Bnny
Occasional Contributor

Re: IO Error using dd

Thanks ALL !

The destination lvol was smaller than the source lvol. Thank you for all your responses. I have assigned apporpriate points to everybody.

Reagrds,
Bugs_Bnny
Better ask and be a fool once than never to ask and be a fool forever