1834020 Members
2799 Online
110063 Solutions
New Discussion

Copying data with DD

 
SOLVED
Go to solution
Narendra Uttekar
Regular Advisor

Copying data with DD

Hi,
To copy data from one storage EMC CX500 to another storage EMC CX4-240. I have created the logical volume on new storage and used DD to copy the logical volume data. The copy was successful with DD as below,

dd if=/dev/vgdb/rlvsapdata5 of=/dev/vgsiddb/rlvsapdata5 bs=1024k

But after completing copy with DD i tried mounting the logical volume it gives me an error to run fsck.

I run the fsck as below,
fsck /dev/vgsiddb/rlvsapdata5

After running fsck I was able to mount the logical volume. I know DD is the dirty copy and requires fsck to run, But I want to make sure doing this later on it will not corrupt the logical volume i.e. data.

As currently I have used DD to copy data on Development System. And I am planning to use same method i.e. DD to copy data on Production System.

Please let me know whether copying data with DD is safe and will not have any problem later?

And also does there is any third party tool or software to copy logical volume data?

Thanks,
Narendra
8 REPLIES 8
bullz
Super Advisor

Re: Copying data with DD

Yes, exactly i had also faced the same issue :)

But i did it on Solaris local disk to local disk.

Only few slices are thrown error for "fsck"
rest all i could able to mount as normal.

But after doinf FSCK, it works.

All the best for your production server.
Johnson Punniyalingam
Honored Contributor
Solution

Re: Copying data with DD

>>>>Please let me know whether copying data with DD is safe and will not have any problem later?<<<

Yes, You have to go through fsck.

because Your copy of the lvol will *ALWAYS* report corruption because you copied an active (mounted) filesystem


Please see below thread , especially >>Bill

http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1269944003598+28353475&threadId=1162623
Problems are common to all, but attitude makes the difference
Narendra Uttekar
Regular Advisor

Re: Copying data with DD

Hi,
If i unmount the filesystem on the LVOL which i want to copy. Will that still give me an error for fsck to run?

Thanks,
Narendra
Matti_Kurkela
Honored Contributor

Re: Copying data with DD

Both the source and destination LVs should be unmounted. If the source filesystem is cleanly unmounted, the resulting copy should not require a filesystem check.

MK
MK
Narendra Uttekar
Regular Advisor

Re: Copying data with DD

Thanks MK..after unmounting both the LVOl's before DD...it is not giving any error i.e. to run fsck.

I have one more question i have almost 1 TB of database each file system of 64GB. I want to know if i start all the database file system i.e. 16 file system of 64GB each dd copy running parallel in background will have any impact in terms or LVOL corrution. I don't mind any performance issue as i will start copying data during downtime window. And can someone please tell me how long approximate it will take to DD a 1 TB of database i.e. Raw Logical Volume copy.

Thanks,
Narendra
likid0
Honored Contributor

Re: Copying data with DD

But do you want to copy or migrate from cx500 to cx4-240 ?

if you want to migrate your data, it would be much better to use lvm mirroring, you don't have to stop running applications and it's very safe.You will need MirrorDisk-UX license.

And if you want to copy lots of data, can't you use some bmc array replication, like BC on XP arrays ?
Windows?, no thanks
likid0
Honored Contributor

Re: Copying data with DD

Sorry I meant, CA on XP arrays.

you also have tdmf, it's a replication tool IBM bought 3 or 4 years ago:

http://www-05.ibm.com/services/es/sds/0905050000.html
Windows?, no thanks
Johnson Punniyalingam
Honored Contributor

Re: Copying data with DD

"personally I feel backing up "raw device files" no point, you can recreate them
see comment from ->>> Hein van den Heuvel on the below thread.

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=183460


>>>> And can someone please tell me how long approximate it will take to DD a 1 TB of database i.e. Raw Logical Volume copy.<<<

Using blocksize of 1024k bytes should be faster.

bs=1024k

However, using dd to make a copy of an (raw) lvol may not be the fastest method. If you have say a 9Gb lvol but only 3Gb of data on it then using raw dd to make a copy will copy the entire 9Gb (which in this case is a waste). If you instead have say 6Gb of data on your 9Gb lvol then using raw dd to copy.
Problems are common to all, but attitude makes the difference