1751835 Members
5845 Online
108782 Solutions
New Discussion юеВ

Re: copy raw devices

 
Herr Schertel
New Member

copy raw devices

hi all,

does anybody know how i can copy raw devices. we have hp-ux 11. i want to copy the data of oracle raw devices to another server with raw devices. is this possible?

thanks for your help,
andy
4 REPLIES 4
Stefan Farrelly
Honored Contributor

Re: copy raw devices


Yes, easy to copy raw devices. Use the dd comand. Source and destination logical volumes must be the same size then;

dd if=/dev/vgXX/rlvolYY of=/dev/vgXX/rlvolYY bs=64k

And it will make an image copy of one to the other. We use it all the time, never had a problem.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Santosh Nair_1
Honored Contributor

Re: copy raw devices

Also, if the two machines don't share disk, then you'd dd the LV from one machine, copy the file over to the second machine and dd it back to the LV on the second machine, i.e.:

dd if=/dev/vgXX/lvYY of=lvYY.img bs=64k

copy lvYY.img to the second machine, then on the second machine

dd if=lyYY.img of=/dev/vgXX/lvYY bs=64k

make sure the LVs on the two systems are of the same size.

-Santosh
Life is what's happening while you're busy making other plans
Stefan Farrelly
Honored Contributor

Re: copy raw devices


If you have remsh to a remote system setup to work without requiring a password then you can dd from one raw lvol to one on a remote system in one go;

dd if=/dev/vgXX/rlvolYY bs=64k | remsh -l dd of=/dev/vgZZ/rlvolYY bs=64k

This will copy it across the network and make an image copy on the destination VG/LV.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Volker Borowski
Honored Contributor

Re: copy raw devices

Hi Andy,

keep in mind, that you might need to adjust the Oracle-controlfiles, if it is not possible to use raw devices with the same name on the target machine.

Volker