Interviewer: Lets say there is a partition of 100GB. When i
tried to create a file using touch command, under any
directory, it was unable to create the file- '100% full
disk space'. I calculated the size of each and every
directory on that partition mannually by adding each file
size & in came out to be total size 50GB. Then where is the
remaining 50GB ? why it is showing disk space 100% full
in 'df -h' command?

Answer Posted / kenji

One possibility is that there are many small size files. "Small" is relative to block size. For example the block size of ext3 file system is 4096. A file size of 4097 uses 2 blocks resulting 50% efficiency. This can explain why 100G partition gets disk full at 50G usage.

Another possibility is there are processes having large open files which are not linked. Such files are not visible by 'ls' commands but their usage still shows up by df -h.

At the event of 'disk full' I would check inode usage as well. Normally max inodes were allocated as "partition size / block size" so insufficient inodes rarely happens. typing 'df -i' doesn't cost you much :-)
I initially thought of "inode full" which you can check by df -i

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which file system is used in unix?

496


Is windows unix based?

497


Is mac a unix system?

508


Can you explain the method of changing file access permission?

520


What are the phases of swapping a page from the memory?

545






What is the procedure to configure MC/SG Cluster services in HP-UX 11i v3 OS Environment?

5489


What is af_unix?

461


What are the entities that are swapped out of the main memory while swapping the process out of the main memory?

530


Suppose I have one column with data smithjohnmichale the o/p should be smith,john, michale how we do in unix?

452


What is a superuser?

548


What are special characters in unix?

464


How to move files from one directory to other in unix?

481


Is unix the first operating system?

495


Is learning unix useful?

484


Describe a link in unix.

481