Expand description
Helpers for interacting with mountpoints
Modules§
- tempmount
- Temporary mount management with automatic cleanup.
Structs§
- Filesystem
- Deserialized information about a mounted filesystem from
findmnt. - Findmnt
- Deserialized output of
findmnt --json.
Constants§
- PID1
- Well known identifier for pid 1
Functions§
- bind_
mount_ from_ pidns - Create a bind mount from the mount namespace of the target pid into our mount namespace.
- ensure_
mirrored_ host_ mount - If the target path is not already mirrored from the host (e.g. via
-v /dev:/dev) then recursively mount it. - findmnt_
filesystem 🔒 - inspect_
filesystem - Inspect a target which must be a mountpoint root - it is an error if the target is not the mount root.
- inspect_
filesystem_ by_ uuid - Inspect a filesystem by partition UUID
- inspect_
filesystem_ of_ dir - Inspect a target which must be a mountpoint root - it is an error if the target is not the mount root.
- is_
mounted_ in_ pid1_ mountns - Check if a specified device contains an already mounted filesystem in the root mount namespace.
- is_
same_ as_ host - If the fsid of the passed path matches the fsid of the same path rooted at /proc/1/root, it is assumed that these are indeed the same mounted filesystem between container and host. Path should be absolute.
- is_
source_ mounted - Recursively check a given filesystem to see if it contains an already mounted source.
- mount
- Mount a device to the target path.
- open_
tree_ from_ pidns - Given a pid, enter its mount namespace and acquire a file descriptor for a mount from that namespace.
- run_
findmnt - Run
findmntwith JSON output and parse the result.