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?

Answers were Sorted based on User's Feedback



Interviewer: Lets say there is a partition of 100GB. When i tried to create a file using touch com..

Answer / 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

Interviewer: Lets say there is a partition of 100GB. When i tried to create a file using touch com..

Answer / kenji

I guess "inode checking" part I posted was extraneous and not really true for today's large disk.

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More Unix General Interview Questions

Describe the concept of “region”.

0 Answers  


What scheme does the Kernel in Unix System V follow while choosing a swap device among the multiple swap devices?

0 Answers  


What do you mean by unix?

0 Answers  


What is unix and shell scripting?

0 Answers  


You have a file called tonky in the directory honky. Later you add new material to tonky. What changes take place in the directory, inode, and file?

0 Answers  






What language is unix written?

0 Answers  


What is a unix shell?

0 Answers  


What are hidden files in unix?

0 Answers  


Differentiate relative path from an absolute path?

0 Answers  


How do you determine and set the path in unix?

0 Answers  


how do you move a backgrounnd job to forward?

3 Answers   Cap Gemini,


How to change the directory in unix?

0 Answers  


Categories