mke2fs diferença entre as opções -i e -I

0
sudo mke2fs
Usage: mke2fs [-c|-l filename] [-b block-size] [-C cluster-size]
    [-i bytes-per-inode] [-I inode-size] [-J journal-options]
    [-G flex-group-size] [-N number-of-inodes]
    [-m reserved-blocks-percentage] [-o creator-os]
    [-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]
    [-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]
    [-t fs-type] [-T usage-type ] [-U UUID] [-jnqvDFKSV] device [blocks-count]

[-i bytes-per-inode] [-I inode-size] quais são as diferenças entre esses dois?

Para mim, "bytes por inode" e "inode size", não vejo diferença em tudo

    
por BufBills 16.02.2014 / 08:20

1 resposta

1

Você deve sempre tentar ver se a página man ( man mke2fs ) é mais informativa do que a ajuda:

   -i bytes-per-inode
          Specify the bytes/inode ratio.  mke2fs  creates  an  inode  for
          every  bytes-per-inode  bytes of space on the disk.  The larger
          the bytes-per-inode ratio, the fewer inodes  will  be  created.
          This value generally shouldn't be smaller than the blocksize of
          the filesystem, since in that case more inodes  would  be  made
          than  can  ever  be used.  Be warned that it is not possible to
          expand the number of inodes on a filesystem after  it  is  cre‐
          ated, so be careful deciding the correct value for this parame‐
          ter.

   -I inode-size
          Specify the size  of  each  inode  in  bytes.   mke2fs  creates
          256-byte  inodes  by default.  In kernels after 2.6.10 and some
          earlier vendor kernels it is possible to utilize inodes  larger
          than  128  bytes to store extended attributes for improved per‐
          formance.  The inode-size value must be a power of 2 larger  or
          equal  to  128.   The  larger the inode-size the more space the
          inode table will consume, and this reduces the usable space  in
          the  filesystem  and  can  also  negatively impact performance.
          Extended attributes stored in large inodes are not visible with
          older  kernels, and such filesystems will not be mountable with
          2.4 kernels at all.  It is not possible to  change  this  value
          after the filesystem is created.

Para mim, isso é como, com -I , você especifica um tamanho fixo que é independente do tamanho do disco (o que pode ser inadequado para o tamanho do seu disco). E com -i você define o número de inodes, o que leva em conta o tamanho do disco.

    
por 16.02.2014 / 08:26

Tags