How many bytes per inodes?

前端 未结 3 976
醉话见心
醉话见心 2021-02-05 03:29

I need to create a very high number of files which are not very large (like 4kb,8kb). It\'s not possible on my computer cause it takes all inodes up to 100% and I cannot create

3条回答
  •  北海茫月
    2021-02-05 04:08

    You can find out the approximate inode ratio by dividing the size of available space by the number of available inodes. For example:

    $ sudo tune2fs -l /dev/sda1 | awk -F: ' \
        /^Block count:/ { blocks = $2 } \
        /^Inode count:/ { inodes = $2 } \
        /^Block size:/ { block_size = $2 } \
        END { blocks_per_inode = blocks/inodes; \
              print "blocks per inode:\t", blocks_per_inode, \
                    "\nbytes per inode:\t", blocks_per_inode * block_size }'
    
    blocks per inode:    3.99759 
    bytes per inode:     16374.1
    

提交回复
热议问题