Available Disk Space always 0%
Solution 1
Default for linux file-systems is that 5% is reserved for root access only - that's why you don't see it. You can see this number when comparing "size" and "used"
You can change this to 1% by going sudo tune2fs -m 1 /dev/hda2
Obviously you can change the -m parameter to any number of percent.
Note! It may seem like a good idea to set this parameter to 0 for all drives, but your system may lock you out altogether if the hard-drive fills up. (not an issue on non-root disks)
Solution 2
There is no "lost space". By default 5% of the space on a filesystem is reserved for root, so that users don't fill it up completely and kill the system. Keep removing files until there is more than 5% free space left in the filesystem. You have at least another 5GB or so to go.
Related videos on Youtube
Nelson
Updated on September 18, 2022Comments
-
Nelson almost 2 years
I am running centos 5. So far, it gives no problem but just yesterday, when it reported "no free space" for file writing, I try to remove some file as usual. Unfortunately this time no matter how much files I had deleted, it just keep showing no available space for doing so.
Result from df:
[root@LSMSVR ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 1.2G 269M 879M 24% / /dev/hda6 4.8G 138M 4.4G 4% /tmp /dev/hda5 19G 2.4G 16G 14% /usr /dev/hda3 48G 12G 34G 25% /var /dev/hda2 379G 365G 0 100% /home /dev/hda1 99M 15M 80M 16% /boot tmpfs 180M 0 180M 0% /dev/shm
Any idea how to recover the lost space in /home? Thank you.
-
bbaja42 about 13 yearsIs default of 5% specific to the filesystem?
-
Ignacio Vazquez-Abrams about 13 yearsIt's specific to the program used to create the filesystem. Of course, some filesystems don't support it at all.
-
bbaja42 about 13 yearsHow did you detect in the question which filesystem is used in this case?
-
Ignacio Vazquez-Abrams about 13 yearsCentOS 5 means ext3. But ext2/3/4 all support it.
-
Nelson about 13 yearsThanks for the good guest. Yes, it is ext3. What I am not understand is, I had been removed over 10GB data from the folder, but yet it still showing 0% available... Now I remove another 1GB, then it shows 500+MB... Anyway I can do to claim back those 10GB for use by users?
-
Ignacio Vazquez-Abrams about 13 years
tune2fs
can be used to modify the parameters of a ext2/3/4 filesystem, but I recommend that you don't set the reserved percentage all the way down to 0.