I found a workaround which involves disabling Opportunistic Locking. This will have a small performance impact, but at least the thing wont hang up and use 100% CPU for no goddamn reason. Yes, this article has an angry tone, because this issue has eaten way too much of my time today.

To disable Opportunistic Locking, you have to set the contents of the file “/proc/fs/cifs/OplockEnabled” to 0. This file only exists after the cifs module has been loaded, and will be replaced if the module is unloaded and reloaded. Thus, I configured my /etc/rc.local script (use whatever equivalent your distro has to a startup script) to both load the cifs module and set the contents of said file:

# cifs client workaround
modprobe cifs
echo 0 > /proc/fs/cifs/OplockEnabled

[링크 : http://blog.dhampir.no/content/cifs-vfs-no-response-for-cmd-n-mid]

이 문서 앞부분에 나열한 Windows 운영 체제 중 하나를 실행하는 SMB(서버 메시지 블록) 클라이언트에서는 oplocks(Opportunistic Locking)가 기본적으로 설정됩니다. oplocks를 통해 클라이언트는 파일을 잠가 다른 사용자가 파일을 변경하는 위험 없이 로컬로 정보를 캐시할 수 있습니다. 이 경우 대부분의 파일 작업에서 성능이 향상되지만, 다른 사용자가 해당 파일에 대한 액세스를 요청할 때 oplocks를 부여하는 서버에서 해당 잠금의 위반을 관리해야 하기 때문에 일부 작업에서는 성능이 저하될 수도 있습니다.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MRXSmb\Parameters\
OplocksDisabled REG_DWORD 0 또는 1
기본값: 0(해제되지 않음)

참고 OplocksDisabled 레지스트리 값은 원격 파일에 대해 oplocks를 요청하거나 요청하지 않도록 Windows 클라이언트를 구성합니다.

[링크 : http://support.microsoft.com/kb/296264]



 CIFS VFS: No response to cmd 46 mid 21391
 CIFS VFS: Send error in read = -11
 CIFS VFS: No response to cmd 47 mid 21392
 CIFS VFS: Write2 ret -11, written = 0
 CIFS VFS: Write2 ret -9, written = 0   

CIFS로 samba 를 공유해서 사용할때 이러한 에러가 발생을 하면서 삼바서버에 파일을 장시간 쓰지 못하는 문제가 있다.
위의 방법으로 바꾸고 해봐도 그리 차이는 없어 보이는데 흐음..
Posted by 구차니