File-System Mounting
Mounting 是把含有 valid file system 的 device / volume 接到既有 namespace。它不複製資料,而是把該 file system 的 root directory 接到某個 D-OS-Ch15ba-Mount_Point。
Kernel 做什麼
- 收到 device / volume、mount point、可能的 file-system type 與 options。
- 讀取並驗證 metadata(如 superblock / device directory)。
- 必要時要求 consistency check / repair。
- 在 D-OS-Ch15bb-Mount_Table 記錄 mount point、FS type、superblock / root vnode、options。
- Path traversal 遇到 mount point 時,切到 mounted file system 的 root。
結果:多個 file systems 可組成一棵看似連續的 directory tree。
Policy 重點
OS 必須定義是否允許 mount over non-empty directory、same file system repeated mounts、哪些 volumes boot 時自動 mount、invalid metadata 要自動修復或拒絕。彈性越高,namespace 越容易混淆;限制越多,管理較安全但較不方便。