Best way to copy 4Tb of data from one filesystem to another


 
Thread Tools Search this Thread
Operating Systems Solaris Best way to copy 4Tb of data from one filesystem to another
# 1  
Old 05-24-2017
Best way to copy 4Tb of data from one filesystem to another

User needs to copy a number of directories. Currently, they are using cp -pr which is taking way too long.

Wonder if its worth tarring and compressing first?

Any recommendations for what would be quickest way?
# 2  
Old 05-24-2017
Did you search the forums before posting?

For example:

The Fastest for copy huge data
# 3  
Old 05-24-2017
The answer will always be 'It depends.'
  • What is the data like (how much can it compress)?
  • Are the file attributes set to compress them? This will cause delays in itself.
  • Is the target on the same server?
    • For a local copy, there could be disk contention.
    • What is you disk infrastructure like? Do you have multiple controllers, SAN disk (how many paths etc.) or simple disks with logical volume mirrors?
    • How much data are you copying?
    • How many files are there? A file creation takes several IO operations beyond the volume of data so many small files can copy slower than few bigger ones.
    • How much memory do you have? For a copy to the same server with lots of free memory, you might be able to cache the files to reduce IO contention something like this:
      find /path/to/source -type f -exec cat {} \; /dev/null
  • For a remote copy, what is your network like - and that could be endless........

What can you tell us about the server(s) and data? It will probably be trial and error.

If this is a regular process, consider rsync which will only copy differences. It might still be slower if you have milliions over small files though. If there is lots of data change, perhaps you should consider snapshots, but then you haven't told us what OS you have, so i don't know if that's available to you in any useful way.





Robin
# 4  
Old 05-24-2017
First, a sanity check: 4 terabytes, divided by a good spinning-disk transfer rate of 100 megabytes per second, is ten hours at minimum. Easily 20 for more average disks. You'd need a fancy striped RAID array, or an implausibly large SSD, to beat that.

A great deal depends on your data of course, but knowing why trillions of teeny files are slower than fewer, larger files is not helpful in making the system access trillions of teeny files faster.

Generally speaking? cp does not have a "go faster" button, or else we'd be pushing it all the time anyway. cp is not slow, naive, or wasteful.
# 5  
Old 05-24-2017
Do it on a block level if you can.

Use zfs send / receive using netcat (the data stream is not encrypted over network).
It really versatile, poor man enterprise level file system replication, features matching expensive storage arrays.

For local stuff, mirror the pool and use zpool split.
If you are using SVM, mirror, remove from mirror, use the copy.

Using cp/rsync on large number of files is bound to take longer on same hardware.

Alternatively, you can use dd as well if you want entire disks, but it's a one time crude operation and long requires downtime on source.
This User Gave Thanks to Peasant For This Post:
# 6  
Old 05-24-2017
Personally I prefer rsync to cp. But for 4TB, it probably doesn't make enough of a difference. Are both volumes on the same server? Are you using a SAN? You might find that SAN snapshot and replication is the best way to move the data. But that depends on your storage system. You might want to provide more information on the type of disk storage that you use and check with your SAN vendor, if you use a SAN, to see what they think.
# 7  
Old 05-24-2017
Quote:
Originally Posted by Peasant
Do it on a block level if you can.
This sounds like a good idea, worth trying. How about this to "blockify" the I/O:

Code:
cd /source ; tar cf - * | (cd /target ; tar xf - )

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Errors received while restoring my data from ext3 filesystem

Hi All, I have dual boot on my laptop - Win8 And linuxMint. From linuxmint i had copied all my data found on the NTFS partitions (on my laptop) to an external hard drive (formatted with ext3). i used rsync for this. Now after my hard disk crashed, am restoring the data back from ext3... (2 Replies)
Discussion started by: coolatt
2 Replies

2. Solaris

Solaris Filesystem usage discrepancy after "copy"

I have a query someone may be able to shed some light on... We have a Solaris 10 OS Sun V490 server Sparc. I have a SAN attached EMC Clarrion LUN which we have app data stored on. Pseudo name=emcpower0a CLARiiON ID=CK200070300470 Due to storage requirements - I need to migrate this... (4 Replies)
Discussion started by: ru4n1
4 Replies

3. Shell Programming and Scripting

Copy and paste data

I need to copy from specified lines and paste the data into several other lines. XX123450008 xx.x xx.x xx.x xx.x xx.x xx.x xx.x xx.x xx.x xx.x xx.x xx.x xx.x XX123451895 xx.x xx.x xx.x xx.x xx.x xx.x xx.x xx.x xx.x xx.x xx.x xx.x xx.x ...... XX123452012 xx.x xx.x xx.x xx.x xx.x xx.x xx.x... (13 Replies)
Discussion started by: ncwxpanther
13 Replies

4. Solaris

Copy data over a TB

Hi All, We are not able to grow a UFS filesystem since its size will be going over a TB and it wasn't created using -T with newfs. Hence we have decided to take the backup of all the files on another filesystem and recreate it using -T with newfs. Please recommend the most reliable... (2 Replies)
Discussion started by: vishalaswani
2 Replies

5. Hardware

How to connect a 4TB G-Raid hard drive to a laptop?

I am having trouble connecting my 4TB G-Raid Hard drive to my Compaq Hp laptop can anyone tell me how or what I need in order to connect the 4T and getting it working. (10 Replies)
Discussion started by: Jake Wolf
10 Replies

6. Solaris

copy data from one old filesystem to newfilesystem

Hi gurus I configured raid 5 volume n ive created a filesystem and mounted it to a directory also...everythin is ready..the purpose of doing it is to move my data from an old filesystem pin02 to the newly created filesystem pin02_new...plz tel me the steps to move data without any... (10 Replies)
Discussion started by: madanmeer
10 Replies

7. Shell Programming and Scripting

Will moving data from one filesystem to another affect current software installation

Here we have concern. We have a IBM software installed in a server S1 in the location : /opt/IBM. In this server S1, we have /opt file system in local disk. We don't have any option to increase the file system there. We have created a separate /opt/IBM_NEW file system with 10GB in S1 server.... (1 Reply)
Discussion started by: mehimadri
1 Replies

8. UNIX for Dummies Questions & Answers

Copy unix filesystem to windows

Hi all Is there a way to copy a unix filesystem (folders, subfolder and files) to windows (AD) and at the same time maintaine the unix permission (user/group) when copied to windows (AD) filesystem? I want the same permission in windows as I had in unix in one copy job. Is this... (8 Replies)
Discussion started by: tomjen
8 Replies

9. UNIX for Dummies Questions & Answers

copy, clear and keep to new data only

I have an Ingres database logfile that grows constantly, iircp.log. It is always "attached" to the Ingres process that uses it, and I do not want to screw up the data. I have been copying it to another directory and then using vi on the original to reduce the size 34000 lines at a time. What I want... (1 Reply)
Discussion started by: sarge
1 Replies

10. Solaris

Filesystem Copy

Hi, Fairly new to the Unix worldand was wonderig without using tar and cp is there another way to copy files from one filesystem to a mount point but preserving all data, time stamp etc.. Cheers, :D (2 Replies)
Discussion started by: Monkey007
2 Replies
Login or Register to Ask a Question