You are not logged in.

#1 2021-07-24 20:51:11

newsboost
Member
Registered: 2016-07-24
Posts: 157

SMB cifs problems: "Input/output error" / "Broken pipe": found a fix?

Hi all,

I'm on Arch linux and mounting/connecting to Alpine Linux, which is setup as CIFS-server. So on Arch Linux I tried to use "rsync" and failed a lot of times:

mount -t cifs -o user=alpine,password=1234,uid=1000,gid=1000 //alpine/myShare myMountPoint
...
...
.thunderbird/cd9h4phk.default/ImapMail/imap.gmail.com/INBOX
.thunderbird/cd9h4phk.default/ImapMail/imap.gmail.com/INBOX.msf
rsync: [receiver] close failed on "/mnt/myMountPoint/.thunderbird/cd9h4phk.default/ImapMail/imap.gmail.com/.INBOX.suJHFj": Input/output error (5)
rsync error: error in file IO (code 11) at receiver.c(868) [receiver=v3.2.3]
rsync: [sender] write error: Broken pipe (32)
rsync error: error in socket IO (code 10) at io.c(823) [sender=v3.2.3]
rsync: [generator] write error: Broken pipe (32)

What I'm trying to say is that I tried to copy many files. In this case the ".INBOX.suJHFj" is relatively large, it's 12 MB. Really often both copying via "midnight commander", normal copy and rsync failed. I was struggling for some hours and googling for this problem - tried many things, among these: First I tried changing the options to use "vers=2.0" as someone wrote that helped him. Then I tried upgrading alpine. I probably tried other things, but forgot. Almost too tired, then I tried "cache=strict" - and finally I used "cache=none", which actually seems to work!!!

mount -t cifs -o user=alpine,password=1234,uid=1000,gid=1000,cache=none //alpine/myShare myMountPoint

All should be fine by now! But then I don't understand: Why is this really necessary, why isn't the "cache"-option set to a sane default value which works for most people and/or is my problem actually really solved (I think, at least it copied a lot after this without problems). It is not at all obvious that one has to use "cache=none" - why is this so? Am I really the only person with this problem? Is my setup wrong? I'm connecting via 2 switches with 1 GB ports, so maximum speed is probably around 111 MB/sec. Is this a typical problem or is it just me?

# cat /proc/fs/cifs/DebugData
Display Internal CIFS Data Structures for Debugging
---------------------------------------------------
CIFS Version 2.31
Features: DFS,FSCACHE,STATS,DEBUG,ALLOW_INSECURE_LEGACY,CIFS_POSIX,UPCALL(SPNEGO),XATTR,ACL,WITNESS
CIFSMaxBufSize: 16384
Active VFS Requests: 0

Servers: 
1) ConnectionId: 0x8 Hostname: alpine 
Number of credits: 443 Dialect 0x311
TCP status: 1 Instance: 1
Local Users To Server: 1 SecMode: 0x1 Req On Wire: 0
In Send: 0 In MaxReq Wait: 0

	Sessions: 
	1) Address: 192.168.1.70 Uses: 1 Capability: 0x300047	Session Status: 1 
	Security type: RawNTLMSSP  SessionId: 0x84d17bac
	User: 1000 Cred User: 0

	Shares: 
	0) IPC: \\alpine\IPC$ Mounts: 1 DevInfo: 0x0 Attributes: 0x0
	PathComponentMax: 0 Status: 1 type: 0 Serial Number: 0x0
	Share Capabilities: None	Share Flags: 0x0
	tid: 0xbcbeee4d	Maximal Access: 0x1f00a9

	1) \\alpine\myShare Mounts: 1 DevInfo: 0x20 Attributes: 0x1002f
	PathComponentMax: 255 Status: 1 type: DISK Serial Number: 0x1e6782e3
	Share Capabilities: None Aligned, Partition Aligned,	Share Flags: 0x0
	tid: 0xff520732	Optimal sector size: 0x200	Maximal Access: 0x1f01ff


	MIDs: 
--

Witness registrations:

While googling I also learned I could get some debug-info from Arch Linux (attached/shown above, in case someone understands it and is willing to explain if I have a problem in my setup). I really don't understand why the default isn't "cache=none", when this seems to cause so many problems - at least on my side/system!?! Am I right - or not?

Please help me understand if I'm the only one who thinks this is confusing/strange and/or let me know if there could be problems in my setup, thanks!

Offline

Board footer

Powered by FluxBB