LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-11-2022, 01:13 PM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,593

Rep: Reputation: 180Reputation: 180
rsync "temp" files bigger than original


Before I kill an rsync I've got running, I'll ask first ... I'm running the following rsync on host A:
Code:
rsync -rtv --partial /mnt/hd/QBK/* HOSTB:/mnt/2022Q2
It's been working; that is it has been copying files, but it appears to be "stuck" on one file. On the local (HOSTA) it is:
Code:
ls -lh /mnt/hd/QBK/
-rw-r--r--  1 root root  145G 2022-07-08 03:17 commonW10VM.zip
But on HOSTB I have:
Code:
ls -lah /mnt/2022Q2/
-rw-------  1 ohprs ohprs 105G 2022-07-11 14:08 .commonW10VM.zip.kcLR6M
-rw-------  1 ohprs ohprs 128G 2022-07-11 14:08 .commonW10VM.zip.oKzHFc
-rw-------  1 ohprs ohprs 126G 2022-07-11 14:08 .commonW10VM.zip.wjZQoH
As you can see, the temp destination files are a total of 359G whereas the source files is only 145G.

All three files on the target keep growing, so the rsync hasn't stopped, but it seems like it should have finished copying long ago. It's been running for 3+ days (although not on just this one file).

Is this normal? I'm considering killing the rsync and starting over with this file.
 
Old 07-11-2022, 04:31 PM   #2
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,619

Rep: Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555
Quote:
Originally Posted by mfoley View Post
As you can see, the temp destination files are a total of 359G whereas the source files is only 145G.
Might be a sparse file?

Rsync has a --sparse option for handling them.


Quote:
Originally Posted by mfoley View Post
Before I kill an rsync I've got running
This is why I always run rsync with --partial option.

 
Old 07-11-2022, 05:01 PM   #3
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,593

Original Poster
Rep: Reputation: 180Reputation: 180
Actually, it shouldn't be that sparse. It's a ZIP of a bz2 file, so it should be pretty compressed.
 
Old 07-12-2022, 08:15 AM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,783

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
It looks like you have 3 instances of the same rsync running concurrently and competing for CPU time and I/O bandwidth.
 
Old 07-13-2022, 12:21 AM   #5
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,593

Original Poster
Rep: Reputation: 180Reputation: 180
Quote:
Originally Posted by rknichols View Post
It looks like you have 3 instances of the same rsync running concurrently and competing for CPU time and I/O bandwidth.
Yes, it does look like that, but I don't really. I only ran one rsync command. It finally finished that file, then the next one started, and it too showed 3 destination work files. Not sure what's up with that. Maybe it's an rsync thing to copy parts of the file in parallel.

In any case, the all eventually finished. Maybe there was just that much stuff to copy!
 
Old 07-13-2022, 03:58 PM   #6
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,783

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Quote:
Originally Posted by rknichols View Post
It looks like you have 3 instances of the same rsync running concurrently and competing for CPU time and I/O bandwidth.
Quote:
Originally Posted by mfoley View Post
Yes, it does look like that, but I don't really. I only ran one rsync command. It finally finished that file, then the next one started, and it too showed 3 destination work files. Not sure what's up with that. Maybe it's an rsync thing to copy parts of the file in parallel.
That's strange. I just tried an rsync with a ~140GB file and only saw a single temporary file being used. I tried it both with and without the "--partial" option to see if there was any difference. None. Now my destination "network" was "localhost:", so the transfer went fairly quickly (under 90 minutes). Perhaps you were having some network interruptions that forced rsync to resume an in-progress transfer.
 
Old 07-13-2022, 05:17 PM   #7
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,619

Rep: Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555

A bit annoyed I didn't twig the three temp files before.

A single rsync with multiple growing temp files that total more the twice the target file size seems an unlikely bug - far more likely is three instances of rsync running.

If it occurs again see what "ps all | grep '[r]sync'" says.

 
  


Reply

Tags
rsync



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Question about restoring cloned disks into bigger disks than original? cyno77 Linux - Newbie 15 04-12-2021 01:02 AM
LXer: 'This was bigger than GNOME and bigger than just this case.' GNOME Foundation exec director talks patent trolls and much, much more LXer Syndicated Linux News 0 10-24-2020 04:21 AM
Custom ISO 4x bigger than the original? littlebigman Linux - Software 9 09-20-2010 03:13 AM
why is my backup file bigger than the original? joseph2020 Ubuntu 9 06-07-2009 01:50 AM
Sampling bits of information in bigger and bigger pieces lugoteehalt General 0 10-29-2003 05:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration