NAME¶ 名称
podman-unmount - Unmount a working container’s root filesystem
podman-unmount - 卸载工作容器的根文件系统
SYNOPSIS¶ 概要
podman unmount [options] container […]
podman unmount [选项] 容器 […]
podman umount [options] container […]
podman umount [选项] 容器 […]
podman container unmount [options] container […]
podman 容器卸载[选项]容器[...]
podman container umount [options] container […]
podman 容器卸载[选项]容器[...]
DESCRIPTION¶ 描述
Unmounts the specified containers’ root file system, if no other processes
are using it.
如果没有其他进程在使用,卸载指定容器的根文件系统。
Container storage increments a mount counter each time a container is mounted.
When a container is unmounted, the mount counter is decremented, and the
container’s root filesystem is physically unmounted only when the mount
counter reaches zero indicating no other processes are using the mount.
An unmount can be forced with the --force flag.
容器存储在每次挂载容器时递增挂载计数器。当容器被卸载时,挂载计数器递减,并且只有在挂载计数器达到零时,表示没有其他进程在使用挂载时,容器的根文件系统才会被物理卸载。可以使用 --force 标志强制卸载。
Note: Podman can be used to unmount Podman containers as well as external containers.
External containers are containers created in container/storage by other tools like
Buildah and CRI-O.
注意:Podman 可用于卸载 Podman 容器以及外部容器。外部容器是由其他工具(如 Buildah 和 CRI-O)在 container/storage 中创建的容器。
OPTIONS¶ 选项
--all, -a¶
All of the currently mounted containers are unmounted.
所有当前已挂载的容器都将被卸载。
--force, -f¶
Force the unmounting of specified containers’ root file system, even if other
processes have mounted it.
强制卸载指定容器的根文件系统,即使其他进程已经挂载了它。
Note: Other processes can fail if the mount point they are using is removed without their knowledge.
注意:如果其他进程在不知情的情况下删除了它们正在使用的挂载点,可能会导致其他进程失败。
--latest, -l¶
Instead of providing the container name or ID, use the last created container.
Note: the last started container can be from other users of Podman on the host machine.
(This option is not available with the remote Podman client, including Mac and Windows
(excluding WSL2) machines)
不要提供容器名称或 ID,而是使用最后创建的容器。注意:最后启动的容器可能来自主机上其他 Podman 用户。(此选项在远程 Podman 客户端中不可用,包括 Mac 和 Windows(不包括 WSL2)主机)
EXAMPLE¶ 例子 ¶
Unmount container with a given ID:
使用给定的 ID 卸载容器:
podman container unmount containerID
Unmount multiple containers with given IDs:
使用给定的 ID 卸载多个容器:
podman unmount containerID1 containerID2 containerID3
Unmount all containers: 卸载所有容器:
podman unmount --all
SEE ALSO¶ 参见 ¶
podman(1), podman-mount(1), podman-image-mount(1)
podman(1),podman-mount(1),podman-image-mount(1)