Linux Administration
medium

Pregunta de Linux Administration #019e3987

Enunciado de la Pregunta
Linux Administration
#inode-allocation
#ext2
#ext3
#mkfs
#filesystem-creation
Medio

Which of the following Linux filesystems preallocates a fixed number of inodes at the filesystem's make/creation time and does NOT generate them as needed?

(Choose TWO correct answers.)

A

ext3

Correcto
B

JFS

C

ext2

Correcto
D

XFS

E

procfs

Explicación Oficial / Explicaciones de la Comunidad

The question asks which Linux filesystems preallocate a fixed number of inodes at creation time and do not generate them dynamically. The correct answers are ext2 and ext3.

How It Works

Inodes are data structures that store metadata about files (permissions, ownership, timestamps, pointers to data blocks). Traditional Unix filesystems like ext2 and ext3 allocate a fixed number of inodes when the filesystem is created (via mkfs). The number is determined by the filesystem size and the bytes-per-inode ratio (e.g., -i option in mkfs.ext2). Once created, the inode count is static; if all inodes are used, no new files can be created even if free data blocks exist. This can lead to "disk full" errors despite available space.

Why ext2 and ext3 are correct

  • ext2: The second extended filesystem, a classic Linux filesystem, uses a fixed inode table created at mkfs time. Inodes are not generated on demand.
  • ext3: Essentially ext2 with journaling added. It inherits the same inode allocation strategy: a fixed number of inodes preallocated at creation.

Why the other options are incorrect

  • JFS: IBM's Journaled File System uses dynamic inode allocation. Inodes are allocated as needed from a pool, not preallocated.
  • XFS: A high-performance 64-bit journaling filesystem that allocates inodes dynamically from allocation groups. It does not preallocate a fixed number of inodes.
  • procfs: A pseudo-filesystem that provides an interface to kernel data structures. It does not have a fixed inode table; inodes are generated on the fly by the kernel.

Key Takeaway

When studying filesystems, remember that traditional Linux filesystems (ext family) preallocate inodes, while modern filesystems like XFS and JFS use dynamic allocation. This distinction affects filesystem planning: with ext2/ext3, you must estimate the maximum number of files to avoid inode exhaustion.