LFCS Service Configuration Practice Question
A service requires read-write access to a specific directory that is mounted from an NFS share. The directory is mounted via fstab with the option 'noauto'. The service starts before the mount is available. Which configuration change should be made in the service unit file to ensure the service only starts after the mount is mounted?
⚠ Common exam trap
Many candidates confuse `Wants` with `Requires` or forget that `After` alone does not activate the mount unit, leading them to choose option C or D, which either provide weak dependencies or incorrect ordering.
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
✓
Add After=mnt-nfs.mount and Requires=mnt-nfs.mount
The service requires the NFS mount to be available before it starts. The `After=mnt-nfs.mount` directive ensures the service unit is ordered after the mount unit, and `Requires=mnt-nfs.mount` makes the mount a hard dependency: if the mount fails or is not active, the service will not start. This combination is necessary because the mount is defined with `noauto` in fstab, meaning it is not automatically mounted at boot; the mount unit must be explicitly started (e.g., by a dependency or another unit) before the service.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Add After=mnt-nfs.mount and Requires=mnt-nfs.mount
Why this is correct
This ensures the service starts after the mount and fails if the mount fails.
- ✗
Add Before=mnt-nfs.mount and Requires=mnt-nfs.mount
Why it's wrong here
Before would cause the service to start before the mount, which is the opposite of what is needed.
- ✗
Add Wants=mnt-nfs.mount and After=mnt-nfs.mount
Why it's wrong here
Wants is a soft dependency; the service can still start even if the mount fails.
- ✗
Add After=mnt-nfs.mount and BindsTo=mnt-nfs.mount
Why it's wrong here
BindsTo makes the service tightly bound; if the mount stops, the service stops, which may be undesirable.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LFCS 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 LFCS practice question is part of Courseiva's free Linux Foundation 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 LFCS exam.