Courseiva
Essential CommandshardMultiple ChoiceObjective-mapped

LFCS Essential Commands Practice Question

A system administrator configures a new server with multiple disks. After partitioning and formatting, they mount a partition to /data. Several days later, they notice that the /data filesystem is full, but 'du -sh /data' reports only 2 GB used, while the partition is 100 GB. 'df -h' shows /data is 98% full. What is the most likely cause and the correct action?

⚠ Common exam trap

Watch out — candidates often confuse the 'du' vs 'df' discrepancy with hidden files or reserved blocks, but the key clue is that 'du' shows far less usage than 'df', which points to unlinked but still-open files.

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

There are deleted files still held open by processes. Use 'lsof /data' to find and restart those processes.

When a file is deleted but still held open by a running process, the filesystem does not release the disk blocks until the process closes the file descriptor. This causes 'df' to report the space as used, while 'du' cannot see the deleted file's data, leading to the discrepancy. Using 'lsof /data' identifies the processes holding the deleted files, and restarting them frees the space.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The filesystem is fragmented. Run 'e4defrag' to defragment.

    Why it's wrong here

    Fragmentation does not affect disk space reporting discrepancy.

  • The filesystem has reserved blocks for root. Reduce the reserved percentage with 'tune2fs -m 0'.

    Why it's wrong here

    Reserved blocks are typically only 5% of the filesystem, not enough to explain the discrepancy.

  • The 'du' command is not counting hidden files (dot files). Use 'du -sh .*' to include them.

    Why it's wrong here

    'du -sh /data' includes all files, including hidden ones.

  • There are deleted files still held open by processes. Use 'lsof /data' to find and restart those processes.

    Why this is correct

    Deleted open files consume space but are not counted by 'du'; 'lsof' can find them.

Visual reference

Client DHCP Server 1 Discover (broadcast) 2 Offer (IP: 192.168.1.10) 3 Request (I accept) 4 Acknowledge (lease confirmed) DORA — the four-step DHCP lease process

About these practice questions

One of 507 original LFCS practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.