LPIC-1 GNU and Unix Commands Practice Question
Exhibit
$ cat /proc/partitions major minor #blocks name 8 0 52428800 sda 8 1 524288 sda1 8 2 51873792 sda2 8 16 10485760 sdb 8 17 1048576 sdb1 8 18 9437184 sdb2 $ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda2 50G 20G 30G 40% / /dev/sda1 512M 100M 413M 20% /boot /dev/sdb2 9.0G 8.5G 500M 95% /var $ lsblk -f NAME FSTYPE LABEL UUID MOUNTPOINT sda ├─sda1 ext4 a1b2c3d4-... /boot └─sda2 ext4 e5f6g7h8-... / sdb ├─sdb1 swap 1234-5678-... [SWAP] └─sdb2 ext4 i9j0k1l2-... /var
Refer to the exhibit. The /var partition is nearly full. Which of the following is the most appropriate first step to free up space?
⚠ Common exam trap
The trap here is that candidates often jump to resizing the partition or adding a disk (options C and D) because they think the problem requires a hardware or filesystem-level solution, when in fact the simplest and most appropriate first step is to clean up temporary and log files that can be safely removed.
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
✓
Delete old log files in /var/log and clear package cache.
The most common cause of a full /var partition is accumulated log files in /var/log and cached package data. Deleting old logs (e.g., via logrotate or manual cleanup) and clearing the package manager cache (e.g., apt-get clean or yum clean all) directly reclaims space without requiring disk resizing or additional hardware. This is the safest and fastest first step before considering more invasive actions.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Move some files from /var to / and create a symbolic link.
Why it's wrong here
Moving system files could break services; not a best practice.
- ✓
Delete old log files in /var/log and clear package cache.
Why this is correct
Log files and cached packages often consume large space and can be safely removed.
- ✗
Increase the size of /dev/sdb2 using resize2fs.
Why it's wrong here
There is no unallocated space on sdb to expand sdb2.
- ✗
Add a new disk and mount it to /var.
Why it's wrong here
Adding a new disk mounted to `/var` does not free space on the existing `/var` partition; it merely provides additional storage capacity, leaving the original partition still full. This option is tempting because mounting a new volume is a standard method to expand storage when a filesystem runs out of inodes or blocks, and it would be correct if the goal were to increase total available space rather than reclaim space from the current partition.
Go deeper
Related to this question
About these practice questions
This LPIC-1 question is part of Courseiva's 527-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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-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.