🎓 BookMCQ
← Back to 18. The Linux System

📝 The Linux ext3 file system (20 MCQs)

Ext3 as a Journaling Linux Filesystem

ext3 is a Linux filesystem developed as an extension of ext2 with journaling support. It retains the traditional inode and block-based storage model while recording selected filesystem changes in a journal before they are applied to their main locations. Journaling improves recovery after crashes by reducing the need for lengthy filesystem consistency checks.

Why Ext2 Required More Costly Crash Recovery

In a non-journaling filesystem, a crash during metadata updates may leave directory entries, allocation information, and inode structures inconsistent. A full filesystem check can take substantial time on large volumes. Ext3 addresses this problem by recording transactions in a journal, allowing recovery to identify committed changes after an unexpected shutdown.

Inodes, Block Mapping and Journal Transactions

Ext3 stores file metadata in inodes and maps file contents to data blocks using traditional direct and indirect block references. Before selected changes reach their normal filesystem locations, journal records describe the transaction. Once the journal commit is recorded, recovery can replay the transaction if a crash interrupts later updates.

Example of Recovering After a Sudden Power Loss

A system begins creating a file and records the required metadata updates in its journal. The power fails after the transaction commits but before all changes reach their final locations. During the next mount, journal recovery replays the committed transaction, restoring a consistent metadata state.

Faster Recovery and Journaling Trade-Offs

Ext3 generally reduces recovery time after crashes and maintains compatibility with much of the ext2 filesystem structure. Journaling adds write activity and consumes storage for the journal. It primarily protects filesystem consistency; ordinary metadata journaling does not automatically guarantee that every recently written file's contents survive a power failure.

Misconceptions About ext3

'Ext3 uses the ext4 extent-based mapping design' is false because ext3 retains ext2-style block mapping. 'Journaling prevents every form of data loss' ignores application data and write ordering. 'A journal stores a permanent second copy of every file' is incorrect because it records transactions for recovery.

Exam Focus: Inodes, Block Mapping and Journaling

Explain how ext3 extends ext2 with a journal while retaining inode-based storage. Trace a committed transaction and recovery after a crash. Questions may compare ext2 and ext3 or examine metadata consistency, direct and indirect block pointers, and the limits of journaling for user data protection.

Key Terms of ext3

  • ext3 - Journaling Linux filesystem.
  • Inode - Stores file metadata and block references.
  • Journal - Records transactions for recovery.
  • Direct pointer - References a data block directly.
  • Indirect pointer - References a block containing block addresses.
4
Easy
10
Medium
6
Hard

📝 All The Linux ext3 file system MCQs

Q1. What does the abbreviation ext3 stand for?

A.Extended Filesystem 3 ✅
B.Extended File System version 3
C.Extended File System 3
D.External File System 3
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The correct answer is A because ext3 is short for \Extended Filesystem 3

Q2. What is the typical default block size for an ext3 filesystem on a 2 TB partition?

A.1 KB ✅
B.4 KB
C.8 KB
D.16 KB
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Ext3 usually defaults to a 4 KB block size for partitions up to several terabytes, balancing space efficiency and performance. Option A (1 KB) is too small and rarely used for modern large partitions. Option C (8 KB) can be chosen manually but is not the default. Option D (16 KB) exceeds the maximum block size supported by ext3. Knowing the default block size is essential for estimating capacity and performance characteristics.

Q3. Why does the ext3 filesystem employ journaling?

A.To speed up file reads ✅
B.To reduce CPU usage
C.To protect metadata against corruption
D.To enable network sharing
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: Journaling in ext3 is primarily used to protect filesystem metadata from corruption after unexpected events like power loss. Option A describes a benefit of caching, not journaling. Option B is unrelated; journaling actually adds some CPU overhead. Option D refers to network features, which are handled by other mechanisms. Recognizing the purpose of journaling clarifies why ext3 can recover quickly without a full fsck.

Q4. How does ext3 guarantee metadata consistency after an abrupt power failure?

A.By writing data directly to disk without buffering ✅
B.By using a copy‑on‑write technique for all files
C.By replaying the journal during mount
D.By ignoring incomplete writes
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: When the system restarts, ext3 examines its journal and replays any recorded transactions, restoring metadata to a consistent state. Option A would increase risk of corruption. Option B describes a different approach used by copy‑on‑write filesystems, not ext3. Option D would leave the filesystem potentially inconsistent. The replay process is the core of ext3's reliability after crashes.

Q5. What role does the inode bitmap play in an ext3 filesystem?

A.It stores file contents ✅
B.It tracks which inodes are free or used
C.It records directory names
D.It manages block allocation for data
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The inode bitmap is a data structure that marks each inode as either allocated or free, enabling quick allocation of new inodes. Option A confuses the bitmap with the actual data blocks. Option C refers to directory entries, not inode management. Option D describes the block bitmap, a separate structure. Understanding the inode bitmap helps administrators diagnose inode exhaustion issues.

Q6. Which statement best describes the difference between the 'ordered' and 'data=journal' mount options in ext3?

A.'ordered' journals both metadata and data, while 'data=journal' journals only metadata ✅
B.'ordered' ensures data blocks are written before metadata, whereas 'data=journal' journals both data and metadata
C.'ordered' disables journaling entirely, and 'data=journal' enables it
D.'ordered' writes data directly to disk without caching, while 'data=journal' caches data only
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: The 'ordered' mode guarantees that file data is flushed to disk before its metadata is committed to the journal, providing a balance of performance and safety. In contrast, 'data=journal' records both data and metadata in the journal, offering higher integrity at the cost of speed. Option A reverses the definitions. Option C incorrectly claims 'ordered' disables journaling, which it does not. Option D misstates the caching behavior. Knowing these options lets administrators choose the appropriate trade‑off.

Q7. Why does ext3 impose a limit on the number of sub‑directories within a single directory?

A.Because the filesystem cannot store more than 10,000 entries ✅
B.Because the directory entry structure uses a linear list, making very large directories inefficient
C.Because each sub‑directory requires a separate partition
D.Because of a hard‑coded kernel limit of 256 sub‑directories
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Ext3 stores directory entries in a linked‑list style structure; as the number of entries grows, lookup time increases linearly, so a practical limit is enforced to keep performance acceptable. Option A gives an arbitrary number not tied to ext3's design. Option B correctly describes the efficiency issue but the limit is not a strict hard cap; ext3 can technically hold many entries. Option D mentions a non‑existent kernel limit. Understanding this limitation guides the design of directory hierarchies.

Q8. How does ext3 handle the deallocation of blocks when a file is deleted?

A.It immediately zeroes out the blocks on disk ✅
B.It marks the blocks as free in the block bitmap but does not erase the data
C.It moves the blocks to a hidden recycle bin
D.It compresses the freed blocks for later reuse
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: When a file is removed, ext3 updates the block bitmap to indicate the blocks are available for future allocation; the actual data remains until overwritten, which is why recovery tools can sometimes retrieve deleted files. Option A would incur unnecessary I/O. Option B is the correct behavior, making D the right answer. Option C describes a feature not present in ext3. Recognizing this process helps explain why deleted data may still be recoverable.

Q9. A system administrator wants to mount an ext3 filesystem with write‑back journaling to improve write performance. Which mount option should be used?

A.data=writeback
B.data=ordered ✅
C.data=journal
D.noatime
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The 'data=writeback' option tells ext3 to journal only metadata, allowing data blocks to be written directly to disk, which speeds up writes at the expense of some consistency guarantees. Option B (ordered) provides a safer default. Option C (journal) offers the highest integrity but slower performance. Option D (noatime) affects access‑time updates, not journaling. Selecting the correct option aligns the filesystem behavior with performance goals.

Q10. Given a 500 GB ext3 partition formatted with a 4 KB block size, what is the approximate maximum number of files it can contain?

A.~125 million
B.~500 million ✅
C.~1 billion
D.~2 billion
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: The total number of blocks equals 500GB4KB=125 million\frac{500\text{GB}}{4\text{KB}} = 125\text{ million} blocks. Each file requires at least one inode, and ext3 typically allocates one inode per block, so the maximum file count is roughly the same as the block count, about 125 million. However, the filesystem reserves some space for metadata, so a realistic upper bound is around 100 million files, which corresponds to answer B when rounded. Option A underestimates, while C and D exceed the possible range. Understanding the relationship between capacity and block size informs storage planning.

Q11. If a server experiences frequent power loss, which ext3 mount option provides the highest data integrity?

A.data=writeback ✅
B.data=ordered
C.data=journal
D.noexec
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The 'data=journal' option records both file data and metadata in the journal before writing to the main filesystem, ensuring that after an abrupt power loss the system can replay complete transactions and recover both metadata and file contents. Option A offers the least protection for data. Option B protects metadata but may leave data inconsistent. Option D disables execution of binaries and does not affect journaling. Choosing the most protective option is essential for environments with unstable power.

Q12. During a backup, you notice that ext3's journal is growing rapidly. Which action will most effectively reduce journal size?

A.Disable journaling entirely ✅
B.Increase the journal size
C.Switch to the 'data=ordered' mount option
D.Run a filesystem check to truncate the journal
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Switching to 'data=ordered' reduces the amount of data written to the journal because only metadata is journaled, while data blocks are written directly after being flushed. Option A removes journaling, which defeats ext3's purpose. Option B makes the journal larger, not smaller. Option D performs a consistency check but does not change journal growth behavior. Adjusting the mount option directly addresses the cause of excessive journal growth.

Q13. A user reports that after deleting large files, the disk space is not reclaimed. Which ext3 feature might be causing this behavior?

A.Delayed allocation ✅
B.Reserved block count
C.Filesystem quotas
D.Sparse file support
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Sparse file support allows files to contain unallocated blocks that appear as zeros; when such files are deleted, the filesystem may not immediately release the underlying blocks, leading to apparent space loss. Option A (delayed allocation) affects write timing, not deletion. Option B reserves space for privileged users, which would reduce available space but not prevent reclamation. Option C enforces limits but does not affect block freeing. Recognizing the impact of sparse files helps diagnose space‑management issues.

Q14. You need to convert an ext2 filesystem to ext3 without downtime while preserving all data. Which command sequence correctly accomplishes this?

A.mount -o remount,ro /dev/sda1 && tune2fs -j /dev/sda1 && mount -o remount,rw /dev/sda1
B.mkfs.ext3 /dev/sda1 && cp -a /old /new ✅
C.fsck -y /dev/sda1 && resize2fs /dev/sda1
D.tune2fs -U clear /dev/sda1 && mount -t ext3 /dev/sda1 /mnt
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: The correct procedure is to remount the filesystem read‑only, add a journal with 'tune2fs -j', then remount it read‑write. This adds journaling without reformatting, preserving data. Option B creates a new filesystem, losing existing data. Option C runs a filesystem check but does not add a journal. Option D clears the UUID, which is unrelated. Proper conversion ensures continuity of service.

Q15. When mounting ext3 with the 'noexec' option, what behavior will be observed for executable files?

A.They will run normally ✅
B.They will be prevented from executing
C.They will be copied to a temporary location before execution
D.They will be automatically compressed
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The 'noexec' mount flag tells the kernel to deny execution of binaries located on that filesystem, so attempts to run executables will fail with a permission error. Option A contradicts the flag's purpose. Option C describes a behavior not implemented by the kernel. Option D is unrelated to execution permissions. Knowing mount flags helps enforce security policies.

Q16. A kernel panic occurs after loading a module that accesses ext3's block bitmap directly. Which kernel mechanism should have been used to prevent this conflict?

A.Direct memory access (DMA)
B.Interrupt request (IRQ) handling
C.Device driver conflict‑resolution database ✅
D.User‑space I/O (UIO)
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: Linux provides a central conflict‑resolution mechanism where drivers must reserve hardware resources, such as block bitmaps, through the kernel's resource database before accessing them. Bypassing this system and accessing the bitmap directly can cause resource clashes, leading to a panic. Options A and B relate to hardware I/O, not filesystem resource management. Option C is close but the correct term for the mechanism is the conflict‑resolution database, which is accessed via kernel APIs, not directly from user space. Properly using the kernel's reservation system avoids such panics.

Q17. If the inode count reaches its limit on an ext3 filesystem, what is the most likely symptom?

A.Files become larger than expected ✅
B.New files cannot be created despite free space
C.Existing files become corrupted
D.Directory listings fail to display
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: When the inode pool is exhausted, the filesystem cannot allocate new inodes, preventing the creation of additional files even though there may be ample free blocks. Option A describes a size issue, not inode exhaustion. Option C (existing files corrupted) is not a direct result of inode shortage. Option D would affect directory reading but not specifically indicate inode depletion. Recognizing the symptom guides administrators to resize the inode table or clean up unused files.

Q18. During forensic analysis, you find that the ext3 journal contains incomplete transactions. Which journal recovery mode should be invoked to ensure consistency?

A.journal=writeback ✅
B.journal=ordered
C.journal=journal
D.journal=none
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: The 'journal=journal' mode (also known as data=journal) records both metadata and file data in the journal, allowing the recovery process to replay complete transactions and restore a fully consistent state. Option A (writeback) does not guarantee data integrity for incomplete entries. Option B (ordered) only guarantees metadata ordering, which may leave data inconsistent. Option D disables journaling, preventing recovery. Selecting the appropriate mode is crucial for accurate forensic reconstruction.

Q19. A performance benchmark shows slower writes on ext3 compared to ext4. Which ext3 attribute can be tuned to improve write speed?

A.Increasing the number of inodes ✅
B.Enabling the 'noatime' mount option
C.Reducing the journal size
D.Activating ext4's extents feature
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Reducing the journal size decreases the amount of data the filesystem must write sequentially, which can speed up write operations on ext3. Option A affects file count, not write speed. Option B (noatime) reduces metadata updates but has less impact than journal size. Option D refers to a feature unique to ext4, not tunable on ext3. Adjusting journal parameters aligns ext3 performance closer to ext4 under certain workloads.

Q20. To check the current journal mode of a mounted ext3 filesystem, which command should be used?

A.tune2fs -l /dev/sda1 ✅
B.dumpe2fs -h /dev/sda1
C.mount | grep ext3
D.cat /proc/filesystems
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The 'dumpe2fs -h' command displays superblock information, including the journal mode, for the specified device. Option A lists many filesystem parameters but does not explicitly show the journal mode. Option C shows mount options but may not reveal the underlying journal mode. Option D lists supported filesystem types, not specific attributes. Using the correct utility provides the needed detail for system diagnostics.

🔗 Related Topics (MCQs)