Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Disk Space Issue on Linux Server.

    Hi ,

    One of the file system is showing used as 51GB ,But actually it has used only 11G . What could be the problem ?

    # df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/mapper/os-root 7.8G 5.0G 2.4G 69% /
    /dev/mapper/os-var 7.8G 588M 6.8G 8% /var
    59G 51G 4.2G 93% /export

    /dev/mapper/data-cdr 303G 2.2G 286G 1% /cdr
    /dev/sda1 99M 17M 78M 18% /boot
    tmpfs 12G 0 12G 0% /dev/shm

    What could be the problem ?

    How to resolve this issue ?

    Can anybody help me with the steps.

    /export is used by Application and showing 93% used.

    Actually space used by /export is :
    104K ./serverd1
    76K ./rep
    44K ./dills3e
    1.8G ./g2ir
    273M ./tmp_usb
    2.4G ./sw
    16K ./lost+found
    4.5G ./oracle
    1.8G ./MTI
    11G .

    Total 11G only used.


  2. #2
    df and du report on different things

    that is the difference between disk usage (du) and free blocks displayer (df)

    if a file makes use of 2KB of 1 MB block
    du will display that the file had used only 2KB

    but df would display that 1 MB had been used as its displaying only the free blocks available,
    even if 1 byte is used in 1MB free block, the free block is no more a free block and its used.
    from here

  3. #3
    Linux User
    Join Date
    Jun 2012
    SF Bay area
    In addition to what manyrootsofallevil noted, here's a couple other things to consider. If there were files that you (or someone else deleted) but some process still has them open, the disk blocks will still be in use. So if there was some application writing to a log file that was 10G and you deleted the file, the space will not be returned to the filesystem until the application process terminates. And I don't think "du" will include that 10G worth of space in it's summary. But "df" will definitely know the space it not in the free pool.

    To find out if something like that is going on, you can use "fuser" or "lsof" to check. I'm more familiar with "fuser" so I'll describe that. It's crude by comparison to "lsof" but it's sufficient to tell what's going on most of the time. Just run "fuser -v /export" and look for any process listed with the "f" or "F" in the "ACCESS" column. Those are processes with open files on the "/export" filesystem. If any of the ones with open files might be holding open large files, then you might have to end those processes before the space will be available (assuming someone deleted the files already).

    And the best way to make sure the filesystem isn't holding open but deleted files is to unmount it then remount it.

  4. $spacer_open
  5. #4
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    3rd rock from sun - Often seen near moon
    Are you sure only 11GB is used? Whats the output of
    du -ksh /export
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    FOSS India Award winning ext3fs Undelete tool Online Linux Terminal

Posting Permissions

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