0

I have a hard drive

enter image description here

when i execute "mkfs.ext3 /dev/sdb" filesystem makes

enter image description here

if i have a file and it takes full of capacity of that hard drive

1-only one Inode i use for this file?

2-other Inodes waste capacity? and is this the reason some filesystems are good for large files?

1 Answer 1

1

Yes. If you have 1 file then you are using 1 inode (well, there's also a couple of extra inodes used by default for other purposes just because of the way the filesystem works; e.g. the base directory and lost+found need inodes).

The other inodes are wasted... but they don't necessarily use that much space. You may be able to gain a few Mbyte...

When you make a filesystem you should consider what type of usage you're going to put on there. If it's a lot of small files then you might want to increase the number of inodes. If it's a small number of large files then you might want to decrease the number of inodes. This can be specified, for example, with the -i flag.

4
  • there is not limitation for how many sectors allocate for an Inode,right?
    – Sinoosh
    Jul 4, 2016 at 13:12
  • Maximum filesize is a limitation of block size. With a 2K block size (default value) you can create a file up to 256Gbyte :-) Jul 4, 2016 at 13:16
  • thank you so much but without thinking about wasted inodes in this case 80 MB , what are other reasons?
    – Sinoosh
    Jul 4, 2016 at 13:23
  • oh,can we say the main different between filesystems is block size?
    – Sinoosh
    Jul 4, 2016 at 13:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .