1

I moved about 12G files from Linux / partition (to a NFS directory), however it seems that the available size hasn't increased. Here is df result:

Filesystem                   1K-blocks        Used  Available Use% Mounted on
udev                           8170624           0    8170624   0% /dev
tmpfs                          1637540      153776    1483764  10% /run
/dev/sda5                    230964348   215736848    3472084  99% /
xxx.xx.xxx.xx:/volume1/apk 23329711936 16875907896 6453685256  73% /media/storage

For "/dev/sda5", the size of used+available is about 11G (230964348-215736848-3472084) less than the logical partition size.

Which result should I rely on?

  • did you simply mv the files? Or did you use some graphical or other tool? Asking this because there are tools that instead of removing the files put them on a "wastebasket" area... – Rmano Jan 31 '16 at 9:58
  • @Rmano i'm simply using mv. since the moved folder is large (12G) and contains many files, the mv procedure last several hours. i suspected that something (internally) was wrong during the move, but not sure. – Hongxu Chen Jan 31 '16 at 11:17
1

The difference is due to Linux reserving 5% of the space (by default) on the file system for the root user. You can tell that in your case, the missing amount is 5% of the total amount. This reserved space is not considered available, nor is it in use. Thus, all the figures are correct.

Linux does this for various reasons. For one, if something were to fill up the disk completely, it would actually only fill up 95%. That way, there is still some maneuvering room for the system processes and the root user to fix the problem without the whole system crashing. Second, some file systems (ext2/3 in particular) will start to suffer from fragmentation when operating at near capacity for an extended time, degrading performance.

  • 1
    but the fact is that i've moved about 12G size files from / to other disks, which means that it had already occupies the reerving 5% space before (and i remember that the available space at that time has already become 99% or even 100%, with little space available). – Hongxu Chen Jan 31 '16 at 4:23
0

Did the move complete? Are there any open file handles to the files?

I ask because you can delete an open file and it will be removed from the directory listing but the disk space won't be freed until the last open file handle is closed.

  • yes, the move is complete. – Hongxu Chen Jan 31 '16 at 5:26
  • 2
    lsof could show you any that you may have overlooked. Likewise, rebooting tends to clear out processes. – Thomas Dickey Jan 31 '16 at 11:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.