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

What is positional parameters in unix?

480


Elucidate on the different ids used in the unix process?

508


What does unix .profile contains?

599


What is c shell in unix?

477


List a few significant features of unix?

508






What are links and symbolic links in UNIX file system?

545


What are data structures that are used for Demand Paging?

579


What is pipe in unix example?

528


What is difference between ssh v1 and ssh v2?

541


Can you tell me something about wildcard interpretation?

504


How do I search for a grep file in unix?

492


How do you make programs portable on unix and dos under such circumstances?

483


How do we change file access permissions?

544


Does windows 10 have unix?

508


What are the main features of unix?

497