XK0-004 · Question #91
While creating a file on a volume, the Linux administrator receives the following message: No space left on device. Running the df -m command, the administrator notes there is still 50% of usage left.
The correct answer is A. Run the df -i command and notice the inode exhaustion. When 'df -m' shows available block space but file creation still fails with 'No space left on device', the file system has most likely exhausted its inode pool, which only 'df -i' will expose.
Question
While creating a file on a volume, the Linux administrator receives the following message: No space left on device. Running the df –m command, the administrator notes there is still 50% of usage left. Which of the following is the NEXT step the administrator should take to analyze the issue without losing data?
Options
- ARun the df -i command and notice the inode exhaustion
- BRun the df -h command and notice the space exhaustion
- CRun the df -B command and notice the block size
- DRun the df -k command and notice the storage exhaustion
How the community answered
(42 responses)- A81% (34)
- B2% (1)
- C10% (4)
- D7% (3)
Why each option
When 'df -m' shows available block space but file creation still fails with 'No space left on device', the file system has most likely exhausted its inode pool, which only 'df -i' will expose.
Every file on a Linux file system consumes one inode to store its metadata, and the total inode count is fixed at format time regardless of remaining data blocks. Running 'df -i' displays the inode usage percentage for each mounted file system, making it immediately visible when 100% of inodes are allocated. This diagnosis reveals the root cause without removing or altering any existing data, satisfying the constraint to avoid data loss.
The 'df -h' flag simply reformats the same block-space data in human-readable units, providing no new information beyond what 'df -m' already confirmed as partially available.
The 'df -B' flag adjusts the display unit for block size output only and does not indicate whether inodes or data blocks are the exhausted resource.
The 'df -k' flag shows usage in kilobyte units, which is still a view of block-level space already shown to be available, offering no diagnostic insight into the actual problem.
Concept tested: Diagnosing inode exhaustion using df -i
Source: https://man7.org/linux/man-pages/man1/df.1.html
Topics
Community Discussion
No community discussion yet for this question.