sync prob with big files

Voelker, Bernhard bernhard.voelker at siemens-enterprise.com
Fri Dec 9 05:27:45 MST 2011


fuzzy_4711 wrote:

> At the device to read from I have this file which should be synced to
> the target:
> -rwxrwxrwx 1 bacula pulse 128497545778 Nov  3 13:19 bkp-nas-0002
> 
> At the device where the file should have been written, I got this:
> -rwxrwxrwx 1 bacula pulse 128497545778 Dec  9 01:28 cifs664f
> 
> I can confirm, that bkp-nas-0002 was the file which has been synced.
> 
> Notice the same target file size, so the sync must have been complete.
> The file is just not renamed. Rsync must have failed in its last
> seconds, I guess. But why? FYI I included more detailed configs.

The fact that the file size is identical does not mean that the transfer
has finished, i.e. that the content is identical. You should check with
md5sum or alike.

> > 
> > 2.  --devices and --specials are both included within -a
> 
> I changed that, the script is syncing like that now:
> rsync -az --omit-dir-times --size-only --numeric-ids --delete
> --bwlimit=$KILOBYTES_PER_SECOND $BACULA_BACKUP_DIR $MOUNT_DIR/$SYNC_DIR
> 
> And yes, all variables are expanded correctly, I could verify this in
> the process list, while the task was running.

Another way to verify the actual variable expansion is
  echo rsync ... $BACULA_BACKUP_DIR ...
or using "set -x" before the rsync call.

> Just to make sure, here is how both NAS-Devices are mounted:
> 
> Device, where to write to:
> $MOUNT -t cifs -o soft,username=backup,password=xxxxxx,uid=107,gid=107
> //192.168.1.8/Volume_1 $MOUNT_DIR
> 
> Device, where to read from (fstab)
> //192.168.1.9/Volume_1 /nas01_backup    cifs
> soft,username=backup,password=xxxxxx,uid=107,gid=107   0 0

So your rsync call is running locally, no remote server is invoked
(apart from the underlying CIFS servers).
You should get an idea what's going on with "strace -f rsync ...".
With this, you would see the system call which is failing.
If the file content is correct, then it may be either the final
rename() or the setting of the timestamp.
On the other side, the output may be huge for a 128GB file ;-(

> Any further help would be highly appreciated.

Did you try other files?

Have a nice day,
Berny


More information about the rsync mailing list