Partitions and Volumes
Partition / volume 是 physical storage 與 file system 之間的 logical storage units。
區分
- Partition:disk 上切出的一段範圍,由 partition table 描述。
- Volume:OS / file system 使用的 logical block object;可等於一個 partition,也可跨多個 partitions / disks。
- File system:建立在 volume 上的 format,提供 directories、files、metadata、free-space tracking。
Raw vs cooked
- Raw partition:沒有 general-purpose FS,直接給 swap、database、RAID metadata 等 subsystem 使用。
- Cooked partition:已 format 成 file system,可被 mount 到 namespace。
Mounting 與 boot
Cooked volume 被使用前通常要 mount;OS 會驗證 metadata,不一致時可能要求 fsck / repair。Root partition 是特例:kernel boot 後會自動 mount root file system,因為後續 programs、configuration、libraries、其他 mounts 都從 / 開始。
D-OS-Ch15cb-Bootable_Partition_and_Root_File_System 補充 bootable partition:boot loader 必須能找到 kernel,且通常只支援特定 file-system formats。