1755596 Members
3294 Online
108836 Solutions
New Discussion юеВ

dd over network

 
mohannad
Frequent Advisor

dd over network

Hi guys,

im facing a bizzar issue here im trying to clone an oracle 9i cluster data base bettwen two servers im using the dd command in the following manner

dd if=/dev/vg_x/rlvol_y | remsh target dd of=/dev/vg_x/rlvol_y

it keeps returning the error " /dev/vg_x/rlvol_y no such device file or address"

then the error " canot create device file address /dev/vg_x/rlvol_y"

when i excute it to the /dev/null, such as
dd if=/dev/vg_x/rlvol_y | remsh target dd of=/dev/null

the command works fine, any suggestions ??
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: dd over network

Shalom mohannad,

My suggestion is you use a target of a file on the destination system, because the lvm infrastructure on the destination system is not readily visible to the network.

Make it a two step process.

dd to a file on the destination system, then dd again to the appropriate logical volume.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
mohannad
Frequent Advisor

Re: dd over network

hi steve,

thanks for the reply, that hadnt cross my mind you mean to dd to an output file lets say of=/tmp/tmplv then from the if=/tmp/tmplv to of=/dev/vg/rlv, one thing though would that work since the rlv is a device special char file and the temp output file in the first dd command "/tmp/tmplv" would be a standard ascii ??

im not sure of your procedure and at the same time im not sure if what i said is true about the output being a standard ascii!!

another issue if and if it works its still puzzling why it couldnt write to the /dev/vg/rlv while it wrote to the /dev/null i mean there just files on the file system regardless of them being refrences to devices or not since its probing the /dev/null it should be able to probe the target system to which every file system it has

that was alot of questions i think, anyways appreciate ur help on this issue because im not really undersatnding that much


Cheers
Laurent Menase
Honored Contributor

Re: dd over network

Hi,
first it is always better to specify ibs and obs when dding to a disk over the network
because the read could return truncated packets
so use
dd of=/dev/vg_x/rlvol_y ibs=8k obs=64k

second, test to read and write from the device on the target system itself
with a
dd if=/dev/vg_x/rlvol_y bs=64k count=10 of=/tmp/afile
then rewrite them to the disk
dd if=/tmp/afile of=/dev/vg_x/rlvol_y bs=64k

If it is ok, what user are you using with remsh?
you can try a
remsh target "id;ls -ld /dev/vg_x"
and check access rights.



Raj D.
Honored Contributor

Re: dd over network

mohannad,

Why not try dd over ssh :

1. Make sure remsh working:
2. Generate ssh-key for transparent login:
3. Run dd over ssh:


Example:

To execute from source server:

# dd if=/dev/vgsapXX/rXA_a11m1 ibs=1024k | ssh target dd of=/dev/vgsapXX_new/rXA_a11m1 obs=1024k > 1.out 2>&1
# dd if=/dev/vgsapXX/rXA_a11m2 ibs=1024k | ssh target dd of=/dev/vgsapXX_new/rXA_a11m2 obs=1024k > 2.out 2>&1


On successful completion of dd will produce record in /out output:
2048+0 records out
2048+0 records in

[ Rare case: read i/o error happens for any network problem ]




It works well, I have done few TB of data sync over wan.

Cheers,
Have fun!,

Raj.
" If u think u can , If u think u cannot , - You are always Right . "
mohannad
Frequent Advisor

Re: dd over network

hi laurent, raj

Thanks for your reply i should have mentioned this before remsh target ls /dev/vg_x/lv_y dose return an output and ive tried changing the access to 777 ill try the ibs and ob parameters and I'll post back to you laurent and ill definitly try dd over ssh and post to back to you raj, actually guys i can solve the issue easily using the data protector its just puzzling me,and im trying to understand why its not working like its supposed to, any help in the issue will be appreciated, thanks
Laurent Menase
Honored Contributor

Re: dd over network

change right to 777 should not help. I think raw devices are restricted to root user.