How to disable Oplocks

NethServer Version: NethServer release 7.6.1810 (final)
Module: File server

We have need to disable oplocks for our use-case. Can someone give me information on how to do that?

Thanks.

Ken

Nethserver uses templates for writing its configuration so to disable oplocks for any share you need to create a custom template for the default samba share profile:

Create custom template directory:

mkdir -p /etc/e-smith/templates-custom/etc/samba/smb.conf/ibay-default/

Create /etc/e-smith/templates-custom/etc/samba/smb.conf/ibay-default/91oplocks with following content:

# 91oplocks - disable oplocks
oplocks = no

Apply the config:

signal-event nethserver-samba-save

For disabling oplocks on specific shares you may use a custom samba share profile and set the SmbProfileType accordingly.

Source:

https://www.oreilly.com/openbook/samba/book/ch05_05.html

1 Like