Unix node I file system


#1


#2

Really simple question…

Ext2-inode

See the image above for clear understanding of the organisation.

First we need to calculate number of block address a single block can hold
= Block Size/ Block address size

= 4KB/4B

= 1K

= 1024

Now just calculate the total number if blocks in the system

= 8 direct pointers + 2 single indirect pointer + 4 double indirect pointer + 1 triple indirect pointer

= 8 + 2 * 1024 + 4 * 1024 * 1024 + 1 * 1024 * 1024 * 1024

Now we have total number of blocks. Just calculate total size by multiplying it with block size

= (8 + 2 * 1024 + 4 * 1024 * 1024 + 1 * 1024 * 1024 * 1024) * 4KB


#5

Yes 4TB to be approx. Rest factors wont be that significant. But if exact is asked then you have to evaluate it.


#6

i am confused when to use direct pointer or indirect pointer


#7

It will be mentioned in the question i guess.