Operating System - HP-UX
1753537 Members
5363 Online
108795 Solutions
New Discussion юеВ

How do you copy from one raw volume to another?

 
SOLVED
Go to solution
Stuart Abramson_2
Honored Contributor

How do you copy from one raw volume to another?

I haven't worked with raw volumes for years. I forget how.

Do we just:

..dd if=/dev/vg20/rlvol02 of=/dev/vg21/rlvol02 bs=4096k

Are there other commands for copying raw volumes? cp, cpio, etc..?

You use the "r"-lvol02 name, right? Not the "lvol02" name...
6 REPLIES 6
Simon Hargrave
Honored Contributor
Solution

Re: How do you copy from one raw volume to another?

If you are copying from raw -> raw then yes you have to use "dd". The cp, cpio etc are dependant on an underlying filesytem (HFS,VxFS etc). Since your are talking raw volumes (presumably raw database volumes) then there is no notion of filesystems/files here.

You should use the block device (ie lvol02) as this is buffered, and will be faster than the character (rlvol02) device.
Pete Randall
Outstanding Contributor

Re: How do you copy from one raw volume to another?

Actually, in my experiments, the raw device was always faster than the cooked.


Pete

Pete
Franky_1
Respected Contributor

Re: How do you copy from one raw volume to another?

Hi,

yes when copying from raw to raw you should use the "dd" command

Regards

Franky
Don't worry be happy
Olivier Decorse
Respected Contributor

Re: How do you copy from one raw volume to another?

Hi,
some months before, i just try the same action, and my conclusion is
1) dd is the best way,
2) on raw device,
3) but bs=1024k is for me the faster way.

It is also very useful to verify an complete disk, with something like :
dd if=/dev/rdsk/cxtydz of=/dev/null bs=1024k

Take a look at :
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=454369
for a complete thread on the block size argument.

Olivier.
They say "install windows 2k, xp or better", so i install unix !
Spike Burkhardt
Frequent Advisor

Re: How do you copy from one raw volume to another?

Raw devices should always be faster but as an adminstrator, you lose virtually all the tools to manage it. To me, a raw device isn't worth losing that functionality; but it's my opinion!

If the source device is being used by a filesystem, will the file system be accessible by the fs? I don't think so but want to confirm that.
Hey, I've got three teenage boys!
Mohanraj Ramasamy
New Member

Re: How do you copy from one raw volume to another?

When you are using DD or any disk copy methods , both the LV size needs to be same.

If LV sizes are same, then you have an easy option of using mirroring

lvextend -m 1
then split with

lvsplit /

Now you have identical copy of the LV in two places.

Hope it helps.

Mohan