XK0-005 · Question #154
Joe, a user, reports that he is no longer able to write files to his home directory. Upon inspection, the Linux administrator discovers that attempting to create a new file gives the following…
The correct answer is C. df -i. The user receives a 'No space left' error even though disk partitions are not full, suggesting an issue with inode exhaustion.
Question
Joe, a user, reports that he is no longer able to write files to his home directory. Upon inspection, the Linux administrator discovers that attempting to create a new file gives the following error: No space left on . However, the disk and partition are not full. Which of the following commands would be BEST for device the administrator to use to continue troubleshooting this problem?
Options
- Arm -Rf ~/.*
- Bfsck -y /dev/sda1
- Cdf -i
- Dfdisk /dev/sda
How the community answered
(32 responses)- A6% (2)
- B9% (3)
- C81% (26)
- D3% (1)
Why each option
The user receives a 'No space left' error even though disk partitions are not full, suggesting an issue with inode exhaustion.
`rm -Rf ~/.*` would recursively delete hidden files and directories, which is a destructive action and not a diagnostic step for determining the cause of the 'no space left' error.
`fsck -y /dev/sda1` is used to check and repair filesystem inconsistencies, which is not the primary diagnostic tool for an 'out of inodes' error, although filesystem issues could sometimes indirectly contribute.
When a 'No space left' error occurs without the disk being full, it often indicates that the filesystem has run out of available inodes, which store file metadata. The `df -i` command specifically displays inode usage statistics for mounted filesystems, making it the best tool to diagnose this problem.
`fdisk /dev/sda` is a utility for managing disk partitions (creating, deleting, resizing), and it does not provide information about filesystem space or inode usage.
Concept tested: Diagnosing inode exhaustion
Source: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/storage_administration_guide/sec-df-command
Topics
Community Discussion
No community discussion yet for this question.