Bug 1174505 - rsync and mv command fails: "File exists" on cifs mount on kernel >= 5.7.8 with SMB protocol version 1.0
rsync and mv command fails: "File exists" on cifs mount on kernel >= 5.7.8 wi...
Status: RESOLVED WONTFIX
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Kernel
Current
x86-64 Other
: P5 - None : Normal (vote)
: ---
Assigned To: openSUSE Kernel Bugs
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-07-27 00:44 UTC by Ian Mepham
Modified: 2020-11-19 14:44 UTC (History)
5 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Mepham 2020-07-27 00:44:23 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Build Identifier: 

I have two folders shared on an old Windows retro gaming PC. In Tumbleweed I have those shares mounted via /etc/fstab using cifs and the SMB protocol option vers=1.0.
With kernel versions up to 5.7.7-1.2 rsync and mv would rename files correctly.
Since upgrading to kernel 5.7.9 rsync and mv are failing to rename files.
If I downgrade to kernel 5.7.7-1.2 rsync and mv can rename files again.
I've read that this only affects kernels >=5.7.8 in combination with cifs SMB protocol 1.0.
I found this discussion on the samba mailing list where someone else has already reported the problem and it specifically mentions the kernel patch which introduced the regression:
https://lists.samba.org/archive/samba-technical/2020-July/135581.html


Reproducible: Always

Steps to Reproduce:
1.touch foo bar
2.mv -f foo bar

Actual Results:  
touch foo bar
mv -f foo bar
mv: cannot move 'foo' to 'bar': File exists

Expected Results:  
renamed 'foo' -> 'bar'

While I don't use an LTS kernel, I've noticed other users report the same problem:
https://www.raspberrypi.org/forums/viewtopic.php?t=280530
Comment 1 Aurelien Aptel 2020-07-28 16:04:26 UTC
This was reverted upstream but the patch did fix some wrong behaviour for smb2 which is the supported version of the protocol.

Is there any reason you have to keep on using smb version 1.0? Could you try 2.1 or 3.0?
Comment 2 Ian Mepham 2020-07-28 17:35:17 UTC
The legacy systems only support smb version 1.0 but I can work around it though.
To be honest, I wasn't sure if this was just another one of those things as the technology gap increases between old retro PCs and newer PCs.

I must confess that a lot (most actually) of the technical aspects where way over my head, but finding that it wasn't just an oddity at my end I thought I'd better report it and see what others think.

I understand that to properly fix the problem it will take a lot of time, especially for an old unsupported protocol, and for my simple needs I can easily work around it.

Thank you for your time.
Ian.
Comment 3 Miroslav Beneš 2020-11-19 14:44:45 UTC
Let me close then. I don't think anyone is interested in 1.0 protocol upstream and since there is a workaround for you, we can move on.