i have created a btrfs filesystem on my Raspberry Pi with a simple subvolume Data01, to share for backup my Server i've created a samba share on raspberry
After that i mounted the samba share on my ubuntu 20.04 Server by fstab and tried to rsync some files from server to raspi
At first look it works fine, but on a second sync it looked like rsync copies all Files again I've never used rsync before, so i added a large file (3.2GB ISO) to my folder on server and it would copy only once but smaller files would be copied everytime
So my next thing was to check on which file size rsync stopps to copy files everytime And it looks like 26MB
So after that i looked with stats and i could see that smaller Files dosen't have correct time values
Datei: Zwergentrunk-1.pdf
Gr▒▒e: 740838 Bl▒cke: 1448 EA Block: 4096 regul▒re Datei
Ger▒t: 2eh/46d Inode: 4917 Verkn▒pfungen: 1
Zugriff: (0744/-rwxr--r--) Uid: ( 1001/srvbackup) Gid: ( 1001/srvbackup)
Zugriff : 2022-04-06 21:16:26.471913500 +0200
Modifiziert: 2022-04-06 21:16:26.563488588 +0200
Ge▒ndert : 2022-04-06 21:16:26.557414539 +0200
Geburt : -
But Larger File
Datei: ubuntu-20.04.4-desktop-amd64.iso
Gr▒▒e: 3379068928 Bl▒cke: 6599744 EA Block: 4096 regul▒re Datei
Ger▒t: 2eh/46d Inode: 4911 Verkn▒pfungen: 1
Zugriff: (0744/-rwxr--r--) Uid: ( 1001/srvbackup) Gid: ( 1001/srvbackup)
Zugriff : 2022-04-06 18:40:32.667789400 +0200
Modifiziert: 2022-03-20 23:29:45.304778200 +0100
Ge▒ndert : 2022-04-06 18:40:36.193852990 +0200
Geburt : -
I hope someone has any Idea, best regards
fstab on raspi (shortened)
UUID=1483d2ca-66f7-4fe4-9494-4802b078a30b /mnt/Backup01 btrfs defaults 0 1
smb.conf
[global]
workgroup = ESD
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
server role = standalone server
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
usershare allow guests = yes
[homes]
comment = Home Directories
browseable = no
read only = yes
create mask = 0700
directory mask = 0700
valid users = %S
[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = no
read only = yes
create mask = 0700
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
[Backup01-Data01]
path= /mnt/Backup01/Data01
browsable = yes
read only false
guest ok = no
inherit acls = no
inherit permissions = yes
ea support = no
store dos attributes = no
printable = no
#create mask = 0664
#force create mode 0664
#directory mask = 0775
#force directory mode = 0775
hide special files = yes
follow symlinks = yes
hide dot files = yes
valid users = srvbackup
invalid users =
read list = srvbackup
write list = srvbackup
force user=srvbackup
fstab on server (shortened)
//officebeere/Backup01-Data01 /mnt/Backup01-Data01 cifs _netdev,uid=1000,gid=1000,username=srvbackup,password=********** 0 0
rsync command
sudo rsync -avit --no-p --progress --delete Zwergentrunk/ /mnt/Backup01-Data01/
Update:
I've tested more and i'can say it's not an btrfs issue (tested with an other HDD and ext4 still same problem) It's not only with rsync, tried with cp -a or cp -preserver=timestamps --> same issue but with a small difference on copy i'can see the correct modify date first and then it will be changed
I tried from Windows with copy and paste --> Modify date is correct
But with touch -r sourefile destfile, i get correct dates, so a workaround would be possible
I hope someone has a better Solution, i think it's a Samba Server or Mount smb share issue
Mount says that's are my Mount options
//officebeere/Backup01-Data01 on /mnt/Backup01-Data01 type cifs (rw,relatime,vers=3.1.1,cache=strict,username=srvbackup,uid=1000,noforceuid,gid=1000,noforcegid,addr=192.168.1.5,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1,_netdev)
rsyncacross a Samba share if you can usersyncdirectly between client and server