A Mount Point Within a Path Hierarchy

A mounted filesystem can provide the contents visible at a directory location in an operating system's path hierarchy.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace two locations
  2. Check whether operations cross boundaries
  3. Follow a path across an attached filesystem boundary
  4. Test operations that require one filesystem

Trace two locations

A report destination may be under a mounted persistent volume even when a neighboring code folder lives elsewhere. Both paths use the same directory syntax. See path resolution.

Check whether operations cross boundaries

A move across filesystems may need different handling from replacement within one filesystem. Preserve a complete old result until the new one is ready. Atomic file replacement states why that boundary matters.[1]

Follow a path across an attached filesystem boundary

A directory named /work/data can be a mount point. Resolving a name beneath it may access another filesystem with different capacity or behavior even though the path begins under /work. Check which filesystem owns the final destination. See filesystem path resolution.

/work/project.txt → first filesystem
/work/data/table.txt → mounted filesystem in this example
Shared textual prefix does not imply one storage device

Test operations that require one filesystem

Rename-based publication can fail or have different semantics across a filesystem boundary. Keep temporary and final files on the target filesystem when the operation requires it. Check mount state separately from the existence of the directory name.

References

  1. Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau, Operating Systems: Three Easy Pieces ↩