FUN WITH LINUX

Opportunistic Locking

26 May 2015

Some Systems lock up the system while transferring large files via CIFS. I have a linux system which tries to backup to a NAS. Today it just hanged. The backup-file(very large) was not accessible anymore and I wasn’t able to delete the file. Therefore even the backup-service just hanged. In the syslog I found lines like:

May 26 13:04:41 tardis kernel: [442981.569372] CIFS VFS: No writable handles for inode
May 26 13:04:41 tardis kernel: [442981.569588] CIFS VFS: No writable handles for inode
May 26 13:04:41 tardis kernel: [442981.569794] CIFS VFS: No writable handles for inode
May 26 13:04:41 tardis kernel: [442981.570003] CIFS VFS: No writable handles for inode

I solved that aweful lock using the following lines:

echo 0 > /proc/fs/cifs/OplockEnabled
mount -o remount /mnt/myshare

After I remounted this share, everything seemed to work properly.

Attention : this works with kernel-versions < 3.4. After 3.4 you have to use a kernel-module-parameter: “enable_oplocks”

[ Linux  Sysadmin  ]
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution 3.0 Unported License.

Copyright 2015-present Hoti