df -h shows incorrect free space
Here is my df-h
output. In here /media/Songs
is using almost 100% disk space.
root@LAB:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 19G 8.7G 9.2G 49% /
udev 1.5G 4.0K 1.5G 1% /dev
tmpfs 596M 960K 595M 1% /run
none 1.5G 1.5M 1.5G 1% /run/shm
/dev/sda7 99G 32G 63G 34% /media/Softs
/dev/sda6 99G 90G 3.6G 97% /media/Films
/dev/sda8 106G 61G 40G 61% /media/Misc
/dev/sda5 99G 94G 4.9M 100% /media/Songs
Here are the detailed overview of /media/Songs
.
root@LAB:~# du -sch /media/Songs/*
39G /media/Songs/AUDIO
16K /media/Songs/lost+found
55G /media/Songs/Video
93G total
root@LAB:~#
My question is where is the 5GB free space?
In G-parted as well as nautilus it's showing 5GB free space but available space is only 4.9Mb. Why?
Here are my system details.
root@LAB:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.10
Release: 11.10
Codename: oneiric
root@LAB:~# uname -a
Linux LAB 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
root@LAB:~# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda1 1250928 182541 1068387 15% /
udev 378633 606 378027 1% /dev
tmpfs 381366 563 380803 1% /run
none 381366 9 381357 1% /run/shm
/dev/sda7 6553600 16148 6537452 1% /media/Softs
/dev/sda6 6553600 484 6553116 1% /media/Films
/dev/sda8 6995968 4287 6991681 1% /media/Misc
/dev/sda5 6553600 10857 6542743 1% /media/Songs
root@LAB:~# tune2fs -l /dev/sda5
tune2fs 1.41.14 (22-Dec-2010)
Filesystem volume name: Songs
Last mounted on: /media/Songs
Filesystem UUID: 191fe922-ed45-431f-9ae6-4ab1247701d9
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Filesystem flags: signed_directory_hash
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 6553600
Block count: 26214400
Reserved block count: 1310720
Free blocks: 1311973
Free inodes: 6542744
First block: 0
Block size: 4096
Fragment size: 4096
Reserved GDT blocks: 1017
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 8192
Inode blocks per group: 512
Flex block group size: 16
Filesystem created: Sun Jul 17 16:06:42 2011
Last mount time: Thu Nov 17 02:36:00 2011
Last write time: Thu Nov 17 02:36:00 2011
Mount count: 1
Maximum mount count: 35
Last checked: Thu Nov 17 02:35:20 2011
Check interval: 15552000 (6 months)
Next check after: Tue May 15 02:35:20 2012
Lifetime writes: 98 GB
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 256
Required extra isize: 28
Desired extra isize: 28
Journal inode: 8
Default directory hash: half_md4
Directory Hash Seed: dc98c454-9826-4f42-ad66-3fb7a1941526
Journal backup: inode blocks
Solution 1:
Reserved block count: 1310720
Free blocks: 1311973
When a file system is created, 5% of all blocks are reserved for the super user (for writing logs etc.)
If this disk is only for storing files (and e.g. doesn't contain /var/) you can set this to 0% (or you may keep 1% just in case):
$ tune2fs -m 0 /dev/sda5