- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- fastest way to copy files ??
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 11:49 AM
05-29-2003 11:49 AM
fastest way to copy files ??
What is the fastest way to do this?
I normally do it one of two ways:
1. cd /dir
find . -depth -xdev -print | cpio -pdum /newdir
where: /newdir already exists!
2. cd /fromdir
tar cf - . | (cd /todir; tar xf - )
However, in this case I don't have any links or special files. I could use "cp".
So far I have copying using Method 1 above (find/cpio) and I'm getting about 1 GB/15 mins or 4 GB/hr, which will take me 17 hours. Too long.
Could I split it up into multiple streams and they won't interfere which each other?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 11:56 AM
05-29-2003 11:56 AM
Re: fastest way to copy files ??
However, you're getting REALLY SLOW speed, and were I you, I'd look into why that is. On my EMC systems, I can copy 700GB in 4 hours using tar.
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 12:04 PM
05-29-2003 12:04 PM
Re: fastest way to copy files ??
One small suggestion is remove the -p option from cpio.
# find . -depth -xdev -print | cpio -cmudv /newdir
Hope it helps,
Robert-Jan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 12:09 PM
05-29-2003 12:09 PM
Re: fastest way to copy files ??
Looking at your speed though, there is definately something wrong. I can copy GB/minute on a C3750 with ftp and rcp, so something is broken or... are these files in use?
If the files are not in use, then look hard at your network and make sure your settings are all as expected. lanadmin -x
The only time I see performance this bad, is on 100baseT full duplex networks where the HP keeps switching or is always running at 1/2 duplex.
If it's duplexing, then
lanadmin -S 100FD
will change the settings to full duplex. Make this permanent by editing /etc/rc.config.d/hpbase100conf
If the lan interface is okay, maybe a bad port on the switch.
Regards,
Shannon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 12:15 PM
05-29-2003 12:15 PM
Re: fastest way to copy files ??
FILELIST=`find . -depth -xdev -print`
for FILENAME in `echo $FILELIST`; do
cp $FILENAME /newdir/$FILENAME
done
If you do not have multiple HBA's on your system, then no matter what method you use in Unix, you are dragging the data over the fibre and through the single HBA twice, which is what well may be constricting your bandwidth. Splitting the copy process into streams is going to compound the issue.
To be thorough, you can check the fibre controller for errors. Look in the syslog to. You may have an iffy cable or HBA.
HTH
mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 12:17 PM
05-29-2003 12:17 PM
Re: fastest way to copy files ??
2. tar is SLOWER than cpio. I'm getting 6 GB/hr with both tar and cp.
3. I'm on the SAME system. there is no LAN involved.
4. 700 GB/4 hrs = 175 GB/hr. That's pretty fast.
5. It takes 2 hours to reload this SID from tape. 70 GB/2 hours = 35 GB/hr tape to disk.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 12:24 PM
05-29-2003 12:24 PM
Re: fastest way to copy files ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 12:42 PM
05-29-2003 12:42 PM
Re: fastest way to copy files ??
From 3:30 - 4:00 PM:
cpio: 4 GB/hr
cp: 8 GB/hr
tar: 6 GB/hr
At 4:00 PM:
two copies at same time:
cp: 60 GB/hr
So, I suspect that something was going on on my system, and I didn't know it, and it must have just stopped. So all my previous timings were completely "invalid", and I will proceed and just hope to finish in time.
Thanks for all your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 08:17 PM
05-29-2003 08:17 PM
Re: fastest way to copy files ??
i had a similar question a few months ago and got some great replies from the gurus here.
see
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xb20b5bd3782dd711abdc0090277a778c,00.html
hope this helps!
best regards
Yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 10:36 PM
05-29-2003 10:36 PM
Re: fastest way to copy files ??
I made a big mistake, sorry sorry.
The command you used for cpio is the fastest. I mixed the verbose and pass-through options.
Hope you accept my apologies,
Kind regards,
Robert-Jan.
0 point please for both answers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 11:08 PM
05-29-2003 11:08 PM
Re: fastest way to copy files ??
some notes:
- cp has problems with files bigger than 2G, better use dd
- if you use dd there are tweo differest ways:
SLOW:
write a script that for each file does a
dd if=/oracle/SID/infile1 of=/oracleNEW/SID/infile1 bs=1024k
and start them in parallel, at max 2* CPU#.
VERY FAST:
create a set of logical volumes in the destination exaclty of the same size of the sources you want to copy.
the name is of no matter.
and start them in parallel, at max 2 per CPU#
umount all the logical volumes you want to copy (and stop oracle :) )
for each lvol
dd if=/dev/yourvg/RlvolSOURCE of=/dev/yournewvg/RlvolDEST bs=1024k
HTH,
Massimo
things to pay attention to:
- use rlvol for better performances
- umount all lv
- exaclty same sizes.
Using this trick i copie a 350Gb DB in 150 minutes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2003 06:09 AM
05-30-2003 06:09 AM
Re: fastest way to copy files ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2003 06:14 AM
05-30-2003 06:14 AM
Re: fastest way to copy files ??
Few month ago, I had to move 6Tb from XP256 to XP512, and I had less than 12h to do that. The fastest way to copy has been to use dd, because it is possible to give the block size, and it is the same with EMC, this kind of system are really efficient with a block size of 256kor 512k
try to timex this:
dd if=/tmp/my_file of=/my_dest_dir bs=512k
It is the quickest way to do a copy. The only difficulty has been to write a script to do the copy by using dd recursivly and change the owner to matche the original one. But try it, it is really quicker than any other copy command.
cheers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2003 06:25 AM
05-30-2003 06:25 AM
Re: fastest way to copy files ??
Just to clarify a point made by Massimo, I have used 'cp' to copy files larger than 2 Gb on a system and it works fine. It will handle files larger than 2 Gb.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2003 07:59 AM
05-30-2003 07:59 AM
Re: fastest way to copy files ??
We had to compile GNU tar for these systems. It is a lot faster than the HP version, and is a true 64 bit application, so it can handle the larger file sizes.
Absolutely the fastest way to copy files is with dd on the raw filesystems. This is still a 32bit facility on HPux 10.2, 11.0, and 11.11. Use it with caution, and verify every byte. However, even the sum command trips up on 64 bit apps.
If you have EMC, PowerPath etc....see if you can make a BCV copy. T'is fastest of all, and uses no clock cycles. Just copy your standard to BCV, split it, then reverse the process against the new standard device.
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2003 08:25 AM
05-30-2003 08:25 AM
Re: fastest way to copy files ??
Create the file system on the destination disks, define the mirror and HPUX will replicate the data onto the other disks. Best part is you have no down time! Even updates to the original files will be updated to the mirror.
Another benefit of mirrored disks is that you can split the mirror off and have a copy of your data set that is not changing and you can get a clean backup. The live system can continue updating the one copy. Once the backup is complete, the mirror can be remerged into the system and it will be automatically updated with the changes from the original.
This only works on entire file systems though, not individual directories or files.
HTH
-- Rod Hills