LPIC-2 File Sharing and Samba Practice Question
A Samba server experiences slow file transfers for large files. The administrator suspects oplock issues. Which set of parameters should be adjusted to disable opportunistic locking?
⚠ Common exam trap
Watch out — candidates often assume setting 'oplocks = no' alone is sufficient, overlooking that Samba's default behavior enables level2 oplocks separately, requiring both parameters to be explicitly disabled.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
oplocks = no and level2 oplocks = no
Disabling opportunistic locking (oplocks) in Samba requires setting both 'oplocks = no' and 'level2 oplocks = no'. The 'oplocks = no' directive disables exclusive oplocks, but Samba's default behavior still allows level2 oplocks (read-only caching). To fully disable all forms of oplock caching, both parameters must be set to 'no', preventing client-side caching that can cause conflicts and slow transfers for large files.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
oplocks = false alone is sufficient
Why it's wrong here
While oplocks = no disables oplocks, level2 oplocks may still be enabled; both should be disabled.
- ✗
strict locking = yes
Why it's wrong here
strict locking enforces byte-range locks, unrelated to oplocks.
- ✗
kernel oplocks = no
Why it's wrong here
kernel oplocks affects NFS interaction, not SMB oplocks.
- ✓
oplocks = no and level2 oplocks = no
Why this is correct
Setting both disables all oplocks, improving performance for some workloads.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LPIC-2 question from scratch — 507 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LPIC-2 practice question is part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LPIC-2 exam.