Find the answer to your Linux question:
Results 1 to 8 of 8
Hello, What could possibly cause df to output the wrong output? I have an OpenVZ virtual environment that hosts large data files, however, there is a huge mismatch between du ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! stukov's Avatar
    Join Date
    Feb 2007
    Posts
    44

    df showing wrong output


    Hello,

    What could possibly cause df to output the wrong output? I have an OpenVZ virtual environment that hosts large data files, however, there is a huge mismatch between du and df output:
    Code:
    $ du -sh /miroir/
    90G	/miroir/
    $ df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/simfs            191G  8.0G  183G   5% /
    none                  3.9G  4.0K  3.9G   1% /dev
    Any ideas?

    Thanks for your help.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,459
    The du and df commands do not show the same thing. du -sh /dir/ shows the amount of space that the files under /dir/ take up, even those that are on a remote system, whereas df shows the size, used space, and available space on each file system that is currently mounted. However, the remote file systems that are mounted should show up with the df command. So, I have to ask if what you showed is the full output of df. ??
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined! stukov's Avatar
    Join Date
    Feb 2007
    Posts
    44
    Thanks for your reply,
    Quote Originally Posted by Rubberman View Post
    So, I have to ask if what you showed is the full output of df. ??
    Yes, it is the full output. Remember, it is running in a virtuel environment.

    I understand that df and du do not show the same result. However, I do not understand why the size of one folder exceeds by 1125% the size of everything in the VE. There is nothing mounted on a remote partition.

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,459
    Quote Originally Posted by stukov View Post
    Thanks for your reply,Yes, it is the full output. Remember, it is running in a virtuel environment.

    I understand that df and du do not show the same result. However, I do not understand why the size of one folder exceeds by 1125% the size of everything in the VE. There is nothing mounted on a remote partition.
    Sorry. I have to think it's some interaction with the virtual machine environment. What is the aggregate size of the files in the folder you showed? Is it possible that the VM is reporting the wrong sector size for the virtual disc?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Just Joined! stukov's Avatar
    Join Date
    Feb 2007
    Posts
    44
    Quote Originally Posted by Rubberman View Post
    Is it possible that the VM is reporting the wrong sector size for the virtual disc?
    How can I verify that?

    Thanks!

  6. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,459
    I know that VirtualBox can create a disc for a VM that can grow as needed up to some maximum size, taking little space when installed. If it is something like that, then perhaps the virtual machine is reporting incorrectly. Honestly, I do not know. You say you are using the OpenVZ VMM. I see that it is related to the Parallels Virtuozzo Containers, which I'm not familiar with. I did try Parallels on my 64-bit system a year or so ago, but it wouldn't run because they weren't supporting 64-bit Linux hosts at that time. Again, I am assuming it is something in the VMM that is causing this problem. Have you gone to the OpenVZ web site for help?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  7. #7
    Just Joined! stukov's Avatar
    Join Date
    Feb 2007
    Posts
    44
    Thanks for your reply rubberman,

    No I haven't. I'll ask them what they think and post back my answer here too. In the meanwhile, if someone has an idea, it would be greatly appreciated.

    Thanks!

  8. #8
    Just Joined! stukov's Avatar
    Join Date
    Feb 2007
    Posts
    44
    Thanks to Kir Kolyshkin from the OpenVZ forums. The answer to my problem was found in this article: Disk quota, df and stat weird behav - OpenVZ Wiki iour

    Thanks for your help Rubberman.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •