Operating System - HP-UX
1835200 Members
2408 Online
110077 Solutions
New Discussion

dd fails with I/O error message

 
SOLVED
Go to solution
hp_user_1
Regular Advisor

dd fails with I/O error message

Hi,

I have created a new filesystem (fsnew) that is slightly smaller than (fsold) filesystem which is 80% full. I need to copy everything from fsold to fsnew. I am using:

dd if=/dev/vg01/rlvol1 of=/dev/vg02/rlvol1 bs=4096k

After a while the dd command fails and says I/O error.

Please help.
13 REPLIES 13
Charles McCary
Valued Contributor

Re: dd fails with I/O error message

Hmmm...usually this is indicative of a bad disk. Any particular reason you're trying to move this filesystem (bad h/w maybe?)
hp_user_1
Regular Advisor

Re: dd fails with I/O error message

Source is sitting on disk array 1 and the target is on disk array 2. We have to get rid of disk array 1 asap.

Charles McCary
Valued Contributor

Re: dd fails with I/O error message

Also, check this link, they had an lvextend issue:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=687357
hp_user_1
Regular Advisor

Re: dd fails with I/O error message

I don't have the lvextend issue.
Alex Lavrov.
Honored Contributor

Re: dd fails with I/O error message

run: dmesg

check /var/adm/syslog/syslog.log


any errors?


Alex.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
hp_user_1
Regular Advisor

Re: dd fails with I/O error message

I don't see any error messages that point to disks.

I actually need to copy from 15 filesystems. I have successfully completed 3 of them.
Ivan Ferreira
Honored Contributor
Solution

Re: dd fails with I/O error message

I don't like dd for copying entire filesystems. This is for several reasons:

You are copying also metadata and LVM information may differ because the sizes are differents.

You copy also empty blocks.

Use cp -Rp or cpio, tar or fbackup/frecover with a pipe to copy the filesystems .
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Alex Lavrov.
Honored Contributor

Re: dd fails with I/O error message

If there are no hardware messages, it means that your FS is corrupted or you don't use dd correctly.

Just copy it as it's stated in the post above me.

Alex.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
AwadheshPandey
Honored Contributor

Re: dd fails with I/O error message

just check ur disk with
dd if=/dev/dsk/cxtxdx of=/dev/null bs=1024k
and post the result

Awadhesh
It's kind of fun to do the impossible
Peter Nikitka
Honored Contributor

Re: dd fails with I/O error message

Hi,

you can use filesystem dump/restore utilities to duplicate filesystem. This will work form larger to smaller filesystems, if the size in the new filesystem is big enough to hold the data.
A dd will always try to copy ALL blocks of the device and you will never succeed in copying a larger to a smaller device.

VXFS: vxdump/vxrestore - see the man pages for details.

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
Andy Torres
Trusted Contributor

Re: dd fails with I/O error message

I've used vxdump/vxrestore to copy/move large amounts of data successfully, even over a network from one host to another.

/usr/sbin/vxdump 0f - /dev/vgXX/lvYY | remsh '(cd ;/usr/sbin/vxrestore -rf -)'

I'm sure the syntax for local copying is very similar, maybe something like:

/usr/sbin/vxdump 0f - /dev/vgXX/lvYY | '(cd ;/usr/sbin/vxrestore -rf -)'

or

/usr/sbin/vxdump 0f - /dev/vgXX/lvYY | cd ;/usr/sbin/vxrestore -rf -
Kent Ostby
Honored Contributor

Re: dd fails with I/O error message

Also, do an lvdisplay -v /dev/vg01/lvol1 | grep -i stale.

This may isolate the disk for you.

Or for each pv in the VG, do:

pvdisplay -v /dev/dsk/cXtYdZ | more and look for the ???????

Or

dd if=/dev/rdsk/CxtYdZ of=/dev/null bs=64k

and see which one gives you an I/O error.
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
hp_user_1
Regular Advisor

Re: dd fails with I/O error message

t