LPIC-1 Devices, Filesystems and FHS Practice Question
You are the system administrator for a small business running a Red Hat Enterprise Linux 8 server that hosts a MySQL database and a web server. The server has two physical disks: a 240GB SSD (sda) with partitions sda1 (boot), sda2 (root), sda3 (swap), and a 1TB HDD (sdb) with a single partition sdb1 mounted at /var/lib/mysql. The server has been running for months without issues. However, this morning you receive alerts that the MySQL database is not accepting new connections. You log in and find that the /var filesystem is 100% full. You check the disk usage and see that /var/lib/mysql uses 90% of the space, but there are also large log files in /var/log/httpd. To free up space immediately and restore database service while planning a permanent solution, you decide to compress old log files and move some database archives to a backup server. After compressing several log files with gzip, the available space increases by only a few MB. You then delete some old database backups from /var/lib/mysql/backup, but the space usage shown by df remains unchanged. What is the most likely cause of this behavior?
⚠ Common exam trap
Test-takers frequently assume deleting files immediately frees space on disk, overlooking the fact that open file handles by running processes can retain the data blocks until the handles are closed.
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
✓
Some processes have open file handles to the deleted files, preventing the space from being released.
When a file is deleted but still held open by a running process (e.g., the MySQL daemon or httpd), the filesystem does not release the disk space until all file handles are closed. In this scenario, the large log files in /var/log/httpd were compressed with gzip, but the original uncompressed files may still be open by the web server process, so deleting them (or the old database backups) does not free space until the process is restarted or the handles are released. This explains why df still shows 100% usage despite the deletions.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Some processes have open file handles to the deleted files, preventing the space from being released.
Why this is correct
When a file is deleted but still open, the space is not freed until the file handle is closed. Use lsof to identify the processes.
- ✗
The disk quota for the mysql user is exceeded, so deletions do not reduce usage.
Why it's wrong here
Disk quotas limit usage but do not cause deletions to not free space; after deletion, quota usage decreases.
- ✗
The SSD is not TRIM-enabled, so deleted blocks are not reclaimed.
Why it's wrong here
TRIM is an optimization for SSDs; lack of TRIM does not prevent space from being freed when files are deleted; the space becomes available immediately.
- ✗
The filesystem was remounted read-only due to errors, so deletions are not permanent.
Why it's wrong here
If the filesystem were remounted read-only, df would still reflect the usage before remount, and deletions would fail. But the administrator said deletions succeeded (df unchanged).
Visual reference
Go deeper
Related to this question
About these practice questions
One of 527 original LPIC-1 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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LPIC-1 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-1 exam.