You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What happened: I tested this manually from the smb-csi driver pod. The CIFS client is unable to mount the SMB share without the 'nosharesock' mount option. It attempts to reuse an established connection to the Samba share. However, if this connection is dead, the CIFS client fails to mount the SMB share. Adding the 'nosharesock' mount option creates a new TCP connection, allowing the SMB share to be mounted successfully
I tested it from csi-node pod
We have 5 TCP connections to SAMBA server
sh-4.4# ss -na| grep 10.81.X.X
tcp TIME-WAIT 0 0 10.82.72.60:55422 10.81.X.X:445
tcp ESTAB 0 0 10.82.72.60:963 10.81.X.X:2049
tcp ESTAB 0 0 10.82.72.60:52514 10.81.X.X:445
tcp ESTAB 0 0 10.82.72.60:43158 10.81.X.X:445
tcp ESTAB 0 0 10.82.72.60:59186 10.81.X.X:445
Mount without nosharesock option failed because current TCP connectios are dead ( for some reason, for example network firewall ).
sh-4.4# mount --verbose -t cifs -o file_mode=0770,dir_mode=0770,username=user,vers=3.0,password="XXXXXXXX" //10.81.X.X/share /var/mnt1
mount error(5): Input/output error
Refer to the mount.cifs(8) manual page (e.g. man mount.cif
mount CIFS share with nosharesock option. It works because new connection was created
sh-4.4# mount --verbose -t cifs -o nosharesock,file_mode=0770,dir_mode=0770,username=user,vers=3.0,password="XXXXXXXX" //10.81.X.X/share /var/mnt1
mount.cifs kernel mount options: ip=10.81.X.X,unc=//10.81.X.X/share,nosharesock,file_mode=0770,dir_mode=0770,vers=3.0,user=user,pass=********
we have new TCP connection ( source port 51776)
sh-4.4# ss -na| grep 10.81.X.X
tcp TIME-WAIT 0 0 10.82.72.60:55422 10.81.X.X:445
tcp ESTAB 0 0 10.82.72.60:963 10.81.X.X:2049
tcp ESTAB 0 0 10.82.72.60:52514 10.81.X.X:445
tcp ESTAB 0 0 10.82.72.60:43158 10.81.X.X:445
tcp ESTAB 0 0 10.82.72.60:51776 10.81.X.X:445
tcp ESTAB 0 0 10.82.72.60:59186 10.81.X.X:445
What you expected to happen:
cifs.client creates additional TCP connection if the current conection is dead.
How to reproduce it:
This can be reproduced manually with the CIFS.Client package and a Samba server. Create two shares in the SMB server. Mount the first share, check TCP connection state from the client, then block this connection (using a firewall, for example). Afterward, try to mount the second share.
Anything else we need to know?:
This is behavior cifs.client.
What happened: I tested this manually from the smb-csi driver pod. The CIFS client is unable to mount the SMB share without the 'nosharesock' mount option. It attempts to reuse an established connection to the Samba share. However, if this connection is dead, the CIFS client fails to mount the SMB share. Adding the 'nosharesock' mount option creates a new TCP connection, allowing the SMB share to be mounted successfully
I tested it from csi-node pod
sh-4.4# ss -na| grep 10.81.X.X
tcp TIME-WAIT 0 0 10.82.72.60:55422 10.81.X.X:445
tcp ESTAB 0 0 10.82.72.60:963 10.81.X.X:2049
tcp ESTAB 0 0 10.82.72.60:52514 10.81.X.X:445
tcp ESTAB 0 0 10.82.72.60:43158 10.81.X.X:445
tcp ESTAB 0 0 10.82.72.60:59186 10.81.X.X:445
sh-4.4# mount --verbose -t cifs -o file_mode=0770,dir_mode=0770,username=user,vers=3.0,password="XXXXXXXX" //10.81.X.X/share /var/mnt1
mount error(5): Input/output error
Refer to the mount.cifs(8) manual page (e.g. man mount.cif
sh-4.4# mount --verbose -t cifs -o nosharesock,file_mode=0770,dir_mode=0770,username=user,vers=3.0,password="XXXXXXXX" //10.81.X.X/share /var/mnt1
mount.cifs kernel mount options: ip=10.81.X.X,unc=//10.81.X.X/share,nosharesock,file_mode=0770,dir_mode=0770,vers=3.0,user=user,pass=********
sh-4.4# ss -na| grep 10.81.X.X
tcp TIME-WAIT 0 0 10.82.72.60:55422 10.81.X.X:445
tcp ESTAB 0 0 10.82.72.60:963 10.81.X.X:2049
tcp ESTAB 0 0 10.82.72.60:52514 10.81.X.X:445
tcp ESTAB 0 0 10.82.72.60:43158 10.81.X.X:445
tcp ESTAB 0 0 10.82.72.60:51776 10.81.X.X:445
tcp ESTAB 0 0 10.82.72.60:59186 10.81.X.X:445
What you expected to happen:
cifs.client creates additional TCP connection if the current conection is dead.
How to reproduce it:
This can be reproduced manually with the CIFS.Client package and a Samba server. Create two shares in the SMB server. Mount the first share, check TCP connection state from the client, then block this connection (using a firewall, for example). Afterward, try to mount the second share.
Anything else we need to know?:
This is behavior cifs.client.
Environment:
kubectl version
): 1.25uname -a
): 4.14.0-372.76.1.el8_6.x86_64The text was updated successfully, but these errors were encountered: