cancel
Showing results for 
Search instead for 
Did you mean: 

dd command

V. V. Ravi Kumar_1
Respected Contributor

dd command

hi all,
iam using dd command to copy some raw devices of size 500MB (not mounted file systems) on to a tape. it is finishing with in 5 min. But if i try to take the backup of raw device of same size, which is of a mounted file system, the dd command is taking a large time. i unmounted the file system and tried with raw device of that LV, still it is taking more time. is dd is slow on raw device which belongs to mounted file system? what could be the reason?
thanks in advance
ravi
Never Say No
3 REPLIES
harry d brown jr
Honored Contributor

Re: dd command

Ravi,

Let me see if I have this right:

(1) a dd of a raw DEVICE of 500MB written to a tape took 5 min

(2) a dd of a MOUNTED filesystem took a lot longer

(3) a dd of (2)'s UNMOUNTED filesystems's LOGICAL VOLUME took even longer than (2)

------------------------------
The (1) looks good! What was "dd" writing to in the above (2) and (3) ????????????????

live free or die
harry
Live Free or Die
Bill Hassell
Honored Contributor

Re: dd command

dd should always be run on the raw logical volume (/dev/vgXX/r-something). The 'r' says that this is raw data and will not go through the buffer cache. It doesn't matter if it is mounted EXCEPT:

1. the data may change during the dd process, thus rendering the copy useless or at least suspect

2. the lvol may be accessed by other processes, thus slowing down access by dd.


Bill Hassell, sysadmin
Pete Randall
Outstanding Contributor

Re: dd command

ravi,

That looks right to me. I was trying to do some manual mirroring of whole disk volumes a while back and forgot (until the experts here at the forums reminded me) that I should be using raw devices. It took forever until I switched to raw.

Pete

Pete