Gooberlx2

Lifer
May 4, 2001
15,381
6
91
I need to rsync a directory on one workstation to another. In both computers these directories and their contents would be the only things on the mounted drives (100% usage).

However, I can't fully rsync because the source drive is apparently larger than my target, even though they're exactly the same make/model, size and, from what I can tell, in partitioning.

Here's the printouts from fdisk and df -h for each:

Source:
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000ebc05

Device Boot Start End Blocks Id System
/dev/sdb1 1 60801 488384001 83 Linux

/dev/sdb1 466G 466G 198M 100% /data1

Target:
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000b9e58

Device Boot Start End Blocks Id System
/dev/sdb1 1 60801 488384001 83 Linux

/dev/sdb1 459G 459G 0 100% /data

I figure there's got to be a difference with the filesystem block sizes...or something (though they print out with the same number of blocks, cylinders, etc...) I can certainly partition/format the target drive...but I want to know that I'm not just going to end up with the same sizes again. Any suggestions?
 

degibson

Golden Member
Mar 21, 2008
1,389
0
0
Rsync probably uses some temporary space (it compresses, doesn't it?). Anyway, if they're identical, you might as well use dd instead of rsync -- that will have the convenience of not caring about file system sizes, or even partition sizes.

E.g.
dd if=/dev/sdb1 | ssh other_machine "dd of=/dev/sdb1"
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
rsync doesn't do any compression on-disk that I know of although it does use a temp directory which can be changed with the -T option.
 

degibson

Golden Member
Mar 21, 2008
1,389
0
0
Originally posted by: Nothinman
rsync doesn't do any compression on-disk that I know of although it does use a temp directory which can be changed with the -T option.

Ah, sounds like a likely culprit.