DF output inconsistency












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?










share|improve this question
















bumped to the homepage by Community 3 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • 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















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?










share|improve this question
















bumped to the homepage by Community 3 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • 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












1








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?










share|improve this question
















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?







hard-disk disk-usage






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 31 '16 at 2:17







Hongxu Chen

















asked Jan 31 '16 at 2:09









Hongxu ChenHongxu Chen

2,05951624




2,05951624





bumped to the homepage by Community 3 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 3 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • 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



















  • 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

















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





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





@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










2 Answers
2






active

oldest

votes


















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.






share|improve this answer



















  • 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.






share|improve this answer
























  • 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








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f258809%2fdf-output-inconsistency%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









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.






share|improve this answer



















  • 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


















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.






share|improve this answer



















  • 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
















1












1








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.






share|improve this answer













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.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 31 '16 at 2:54









marinusmarinus

1,6661110




1,6661110








  • 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
















  • 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










1




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







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.






share|improve this answer
























  • 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


















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.






share|improve this answer
























  • 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
















0












0








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.






share|improve this answer













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.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 31 '16 at 4:37









Chad ClarkChad Clark

26614




26614













  • 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





















  • 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



















yes, the move is complete.

– Hongxu Chen
Jan 31 '16 at 5:26





yes, the move is complete.

– Hongxu Chen
Jan 31 '16 at 5:26




2




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







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




















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f258809%2fdf-output-inconsistency%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Loup dans la culture

How to solve the problem of ntp “Unable to contact time server” from KDE?

ASUS Zenbook UX433/UX333 — Configure Touchpad-embedded numpad on Linux