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

I want to invest in learning things that will get me good jobs in future. But wondering if Unix knowledge is something that is a MUST have or is it better to do any Data-warehouse tool (cognos, Qclik view, ETL etc..). Please suggest me.

1876


What is the significance of the superuser?

533


What is necessary before running a shell script from the terminal?

467


What does pipe do in unix?

491


What is dev null in unix?

487






What does $? Mean in unix?

481


What is .profile unix?

515


What are the requirements for a swapper to work?

565


How would you explain a kernel to a non-technical person?

541


How do I show hidden files in unix?

472


Which language unix is written?

549


How to get the n-th field from a Unix command output?

561


Explain the importance of directories in a unix system

649


Is the Process before and after the swap are the same? Give reason.

726


Is unix cli or gui?

480