nerdexam
CompTIA

XK0-005 · 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…

The correct answer is A. Run the df -i command and notice the inode exhaustion. When a 'No space left on device' error occurs despite free disk space shown by df -m, the next step is to check for inode exhaustion using df -i.

Troubleshooting

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

(18 responses)
  • A
    78% (14)
  • B
    6% (1)
  • C
    6% (1)
  • D
    11% (2)

Why each option

When a 'No space left on device' error occurs despite free disk space shown by `df -m`, the next step is to check for inode exhaustion using `df -i`.

ARun the df -i command and notice the inode exhaustionCorrect

The `df -i` command reports information about inode usage on mounted filesystems. Inodes are data structures that store metadata about files and directories; if a filesystem runs out of available inodes, no new files can be created, even if there is still plenty of free data block space, leading to the 'No space left on device' error.

BRun the df -h command and notice the space exhaustion

`df -h` shows disk space usage in human-readable format, similar to `df -m` (megabytes), so it would not reveal the cause if `df -m` already showed free space.

CRun the df -B command and notice the block size

`df -B` displays disk usage in a specified block size, which is not relevant to diagnosing the 'no space' error when free space is already confirmed.

DRun the df -k command and notice the storage exhaustion

`df -k` shows disk space usage in kilobytes, which again is similar to `df -m` and would not explain the observed discrepancy.

Concept tested: Linux filesystem inode exhaustion troubleshooting

Source: https://man7.org/linux/manpages/man1/df.1.html

Topics

#Linux Filesystems#Troubleshooting#df command#Inodes

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice