You are not logged in.

#1 Today 10:48:03

archerixi
Member
From: Ge
Registered: 2026-07-21
Posts: 16

[solved] rsync still synchronises even after a `cp -a`

Hi,

I have a USB flash drive

$ inxi -Dxxx
Drives:
  Local [...]
 ID-3: /dev/sdc vendor: SMI (STMicroelectronics) model: USB DISK
    size: 3.73 GiB type: USB rev: 2.0 spd: 480 Mb/s lanes: 1 tech: N/A
    serial: 2011020500011597 fw-rev: 3000 scheme: MBR

were I changed the file system from 'exfat' to fat32 because my Xiaomi Pad 6 mit O/S version 2.0.14.0 wants to format this stick instead of reading from it. (with fat32 the stick works fine on my T400s, on the Pad 6, on a iPad and on my Xiaomi T14)
The strange behavior: when I

$ rsync -av KB77A /run/media/archerix/SICH_KB77A

the stick, data is still being transferred even after I’ve copied the directory using

$ cp -a /home/archerix/Akten/. /run/media/archerix/SICH_KB77A

followed by

sync

(Everything worked fine when the drive was still formatted with exFAT.)
Where is the hint?
Archerixi

Last edited by archerixi (Today 14:27:27)


If you ask the right question, you might get the right answer

Offline

#2 Today 13:40:04

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,538
Website

Re: [solved] rsync still synchronises even after a `cp -a`

FAT32 doesn't support linux file permissions - so they are effectively cleared / modified every time the content is synced or copied from a linux filesystem to your fat32 filesystem.  Rsync rightly sees these as differences between the source and destination and proceeds with the transfer.  I suspect there are options / flags to avoid this with rsync, but I don't know them off hand.

EDIT:

man rsync wrote:

BUGS
       times are transferred as *nix time_t values

       When transferring to FAT filesystems rsync may re-sync unmodified
       files.  See the comments on the --modify-window option.

So using the modify-window option may solve the problem, assuming the time-stamp is the only discrepancy triggering a new sync.

Last edited by Trilby (Today 13:42:27)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 Today 13:45:42

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 836

Re: [solved] rsync still synchronises even after a `cp -a`

archerixi wrote:

Where is the hint?

What are permissions of mounted FS and what mount flags?

$ stat /run/media/archerix/SICH_KB77A
$ mount | grep -F /run/media/archerix/SICH_KB77A
$ stat -c "%u:%g %a %y %n" KB77A/*
$ stat -c "%u:%g %a %y %n" /run/media/archerix/SICH_KB77A/*

Offline

#4 Today 13:47:33

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,773

Re: [solved] rsync still synchronises even after a `cp -a`

Is rsync still running at this time?
If yncing doesn't finalize the transactions there's either some ongoing transaction (ie. still source to be processed) or maybe the usb key has an internal cache (though probably not for a 4GB stick…)

Edit: F5ck…
so the "problem" is that rsync still updates supposedly matching data, "rsync --no-p …"

Last edited by seth (Today 13:50:13)

Offline

#5 Today 14:26:57

archerixi
Member
From: Ge
Registered: 2026-07-21
Posts: 16

Re: [solved] rsync still synchronises even after a `cp -a`

Hi,

it seems to be 'solved' with

 rsync ... -@1...

although I would have prefered a solution using exFAT.

But why the Pad 6 doesn’t work with exFAT (the 14 T does, after all) is probably a question I’ll have to ask on another forum.


If you ask the right question, you might get the right answer

Offline

Board footer

Powered by FluxBB