LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-14-2013, 09:35 AM   #1
dimitrio
LQ Newbie
 
Registered: May 2012
Location: UK
Distribution: RHEL - newbie
Posts: 18

Rep: Reputation: Disabled
rsync question. destination larger than source


Hi All

I'm using RHEL 5
I have a 50Gb logical volume (LVM) with 14Gb data on it.

I am moving this to another LV on a separate volume group.
The source and destination disks are the same size (50Gb)

I've tried rsync with -arv and with -arvl, -arvH, -arvS

No matter what the destination drive fills up. All 50Gb before the rsync completes. It only has 14Gb data.

What gives?

File system is ext3 on both.
 
Old 11-14-2013, 09:49 AM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
try the --delete option of rsync.
Example:
Code:
rsync -avz  /path/to/source /path/to/destination --delete
Edit: it could take awhile to run this as it will have to 'delete' files on the destination that do not exist any more in the source.

Last edited by Habitual; 11-14-2013 at 09:55 AM.
 
Old 11-14-2013, 10:02 AM   #3
dimitrio
LQ Newbie
 
Registered: May 2012
Location: UK
Distribution: RHEL - newbie
Posts: 18

Original Poster
Rep: Reputation: Disabled
So previously deleted files are still there on the source filesystem?
 
Old 11-14-2013, 10:09 AM   #4
dimitrio
LQ Newbie
 
Registered: May 2012
Location: UK
Distribution: RHEL - newbie
Posts: 18

Original Poster
Rep: Reputation: Disabled
Nope. Still the same result.
 
Old 11-14-2013, 10:47 AM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
show us the actual command you are using please.
 
Old 11-14-2013, 10:15 PM   #6
Beryllos
Member
 
Registered: Apr 2013
Location: Massachusetts
Distribution: Debian
Posts: 529

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
You might have a lot of hardlinked files in the source filesystem. You could try the following rsync option:
Quote:
-H, --hard-links
This tells rsync to look for hard-linked files in the source and link together the corresponding files on the destination. Without this option, hard-linked files in the source are treated as though they were separate files.
Read man rsync because there are many possible complications, depending on how things are linked in either the source or destination filesystem.

Edit: Oh, wait a second...
You already tried -arvH. That should transfer hardlinks...
Nevermind!

Last edited by Beryllos; 11-15-2013 at 08:37 AM.
 
Old 11-18-2013, 03:49 AM   #7
voleg
Member
 
Registered: Oct 2013
Distribution: RedHat CentOS Fedora SuSE
Posts: 354

Rep: Reputation: 51
rsync not required to move LV.
You can use LVM utilities for that.

Add physical volume to VG (man pvcreate, vgextend),
then pvmove (man pvmove) LV to new physical location.
Then umount it (LV) and close it (lvchange -a n); then use vgsplit (read man).
Activate new VG (probably not required) and mount /dev/newvg/LV where it was.
 
1 members found this post helpful.
Old 11-18-2013, 04:17 AM   #8
dimitrio
LQ Newbie
 
Registered: May 2012
Location: UK
Distribution: RHEL - newbie
Posts: 18

Original Poster
Rep: Reputation: Disabled
awesome. cheers voleg!
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] match source pattern in destination and substitute in destination usin AWK 123raajesh Linux - Software 7 11-13-2013 04:22 AM
[SOLVED] Dumb question. Copy files from iso9660 partition, destination bigger than source? simonspt Linux - Newbie 4 05-23-2012 11:36 AM
Rsync deleting files from destination directory Russell P Linux - Newbie 2 07-14-2011 11:07 AM
rsync - used incorrect multiple paths format, unsure of resulting source/destination codewaggle Linux - Newbie 6 03-24-2011 12:15 PM
Rsync set permissions destination Abstractt Linux - General 3 09-30-2010 02:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:52 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