---
title: "File system layout, i-node, backup"
subject: "Operating System"
chapter: 5
key: "semester_6/operating_system:fs-layout-inode-backup"
source: https://www.bctengineer.com/q/semester_6/operating_system/fs-layout-inode-backup
site: BCT Engineering
---

# File system layout, i-node, backup

Operating System · Chapter 5: File Systems

- Asked in: 2068 Bhadra, 3+5 marks
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/operating_system/fs-layout-inode-backup
- Whole chapter: https://www.bctengineer.com/md/semester_6/operating_system/chapter-5

## Question

What is a file system layout? Explain about I-Node and file system backup.

## Short answer

A file system layout contains boot block, superblock, free-space management, i-node array, root directory, and data area. An i-node stores file attributes and block addresses (direct, indirect). Backups include full, incremental, physical, and logical dumps to recover from loss.

## Answer

#### File system layout
A **file system layout** is the way the disk is organised to store the file system. A disk is divided into partitions; each partition holds an independent file system.

```text
 Sector 0                      whole disk
 +-----+-----------+-------------+-------------+
 | MBR | Partition | Partition 1 | Partition 2 |
 |     |   table   |             |   ...       |
 +-----+-----------+-------------+-------------+

 One partition:
 +------+-------+----------+---------+------+----------------+
 | Boot | Super | Free-    | I-nodes | Root | Files and      |
 | block| block | space    |         | dir  | directories    |
 |      |       | mgmt     |         |      |                |
 +------+-------+----------+---------+------+----------------+
```
- **MBR (Master Boot Record):** sector 0; contains boot code and the partition table with start and end of each partition and the active one. The BIOS reads and runs it, which loads the boot block of the active partition.
- **Boot block:** first block of a partition; program that loads the operating system.
- **Superblock:** key information about the file system: type (magic number), number of blocks, block size, number of i-nodes, free-block counts.
- **Free space management:** bit map or list of free blocks.
- **I-nodes:** an array of i-nodes, one per file (attributes and block addresses).
- **Root directory:** top of the directory tree.
- **Data area:** all the other files and directories.

#### I-node
An **i-node (index node)** is a data structure in UNIX that holds the attributes of one file (owner, permissions, size, timestamps, link count, type) and the **disk addresses of its blocks**. The i-node number identifies a file; a directory entry is just (file name, i-node number). Only the i-nodes of open files are kept in memory, so memory use depends on the number of open files, not on the disk size.

```text
 i-node
 +------------------+
 | attributes       |
 | direct block 1   |--> data
 |   ...  (10)      |
 | direct block 10  |--> data
 | single indirect  |--> [addr][addr]... --> data
 | double indirect  |--> [ptr] --> [addr].. --> data
 | triple indirect  |--> ...
 +------------------+
```
With 1 KB blocks and 4-byte addresses, 10 direct blocks give 10 KB; single indirect (256 addresses) adds 256 KB; double indirect adds 64 MB; triple adds 16 GB.

#### File system backup
Backups protect against disasters (hardware failure, fire, theft) and against accidental deletion or corruption. Issues and techniques:
- **Full (complete) dump:** copy the entire file system; slow and large.
- **Incremental dump:** copy only files changed since the last dump (full or incremental). Quick, but restore needs the full dump plus all increments; a bit is kept per file (archive bit) or a modification time is compared.
- **Physical dump:** copy disk block by block from block 0; simple and fast, but copies unused blocks and bad blocks need care.
- **Logical dump:** starts at one or more directories and copies all files and directories changed since a given date, along with the path to them (as UNIX *dump* does with four phases: mark all directories and the changed files, unmark unneeded directories, dump directories, dump files). It allows restoring individual files.
- **Compression and encryption** can be applied; backups are kept at a different physical location.
- Other approaches: snapshots, mirroring/RAID (not a backup but protects against hardware failure).

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What does the MBR hold?
   A. The superblock
   B. Boot code and the partition table, with the active partition
   C. I-nodes
   D. Free block list
   Answer: B. The MBR is in sector 0 and loads the boot block of the active partition. (Key point: MBR role)

2. A directory entry in UNIX contains what?
   A. The whole file attributes
   B. File name and i-node number
   C. Disk addresses of all blocks
   D. Only the file size
   Answer: B. The i-node holds attributes and block addresses; the entry is just (name, i-node number). (Key point: I-node contents)

3. With 1 KB blocks and 4-byte addresses, what does the single indirect block add beyond 10 direct blocks?
   A. 256 KB
   B. 64 MB
   C. 10 KB
   D. 16 GB
   Answer: A. 256 addresses x 1 KB = 256 KB. (Key point: I-node capacity)

4. What is needed to restore from incremental dumps?
   A. Only the latest incremental
   B. The full dump plus all increments
   C. Only the full dump
   D. Nothing
   Answer: B. Each increment holds changes since the last dump, so all are needed after the full dump. (Key point: Incremental dump)

## Related in Operating System

- [File system layout; i-node vs linked list](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afs-layout-inode-vs-linked-list) — Operating System, chapter 5
- [File system layout; interface vs implementation](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afs-layout-interface-vs-implementation) — Operating System, chapter 5
- [File system layout; free block management](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afs-layout-free-blocks) — Operating System, chapter 5
- [Linked list file system; block size impact](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afs-linked-list-block-size) — Operating System, chapter 5
- [File system layers; linked list vs index](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afs-layers-linked-list-vs-index) — Operating System, chapter 5
- [File system vs virtual memory; contiguous allocation](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afs-vs-virtual-memory-contiguous-tape) — Operating System, chapter 5

## Related in other subjects

- [Layout planning of surface drainage system](https://www.bctengineer.com/question.md?key=semester_6%2Firrigation_and_drainage_engineering%3Asurface-drainage-layout-planning) — Irrigation and Drainage Engineering, chapter 9
- [Google File System architecture](https://www.bctengineer.com/question.md?key=semester_8%2Fbig_data_technologies%3Agfs-architecture) — Big Data Technologies, chapter 2, asked 2×
- [File system handling of kernel](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Akernel-file-system-handling) — Embedded System, chapter 6
