Home>

I have this question for my internship test:

The server has run out of free space, no new files are being created, the output of df -h shows that there is free space. Describe the reasons for who could have done this?

I answered like this

By default, the ext4 file system reserves 5% for housekeeping free space on the partition. On large disks, this happens a lot. You can change this behavior by saying in the terminal to the mounted partition: tune2fs -m 1 /dev/sda1 where 1 is the amount of reserved places as a percentage (0% is also possible), and /dev /sda1 is the partition to which is to apply the effect is immediate and without reboots. Also after this you can slightly defragment this mounted partition: e4defrag /dev/sda1

They answered like this:

there are 2 more cases when this is possible, they are not opened and removed the reserve from the root does not make sense, since the conditions of the task indicate that "the sit is here"

What are the other two cases?

ran out of inodes

andreymal2022-02-12 20:57:14

I don’t understand very well the context in which the question is asked, but how do you like this scenario: let the program mount a disk partition, for example, in /MyData/The program writes to this partition, and it has exhausted it. At the same time, there is space on the disk outside this partition.

S.H.2022-02-12 20:57:14

Here they also write that the maximum size of the metadata for the catalog is limited (I did not personally check it)

andreymal2022-02-12 20:57:14

in the order of conspiracy theories: someone could replace df or the FS module so that it returns an error that there is no space ... in order of human stupidity: you are looking at df on the wrong partition /host ... from more reasonable options: inodes are exhausted, the partition is enabled and quotas are exhausted...

Fat-Zer2022-02-12 20:57:14

it turns out two cases -inodes are exhausted and quotas are exhausted turns out?

Iskandar Xolboyev2022-02-12 20:57:14