pct-unmount
Unmount container's configured mount points
TLDR
Unmount the filesystem of a specific container
SYNOPSIS
pct unmount <vmid> <mp>
PARAMETERS
<vmid>
The unique identifier (integer) of the Proxmox LXC container.
<mp>
The mount point path (e.g., /mnt/data) inside the container that was previously mounted.
DESCRIPTION
pct unmount is a subcommand of the Proxmox Container Toolkit (pct) utility, specifically designed for managing Linux Container (LXC) instances within a Proxmox Virtual Environment. This command facilitates the detachment of a previously mounted disk or filesystem from an LXC container. It is typically used after a pct mount operation or when removing a persistent storage configuration from a container. By providing the container's ID (VMID) and the mount point path inside the container, pct unmount safely disconnects the specified storage, releasing the associated resources and helping to prevent data corruption. It ensures that any bind mounts or specific device pass-throughs are properly undone, maintaining the integrity of both the host and the guest container environments. This command is crucial for proper storage management in Proxmox-managed LXC containers.
CAVEATS
- The container specified by <vmid> must exist on the Proxmox host.
- The mount point <mp> must correspond to a currently active mount inside the container, typically created via pct mount or configured in the container's configuration file.
- The command requires root privileges or appropriate Proxmox user permissions to execute successfully.
- Unmounting may fail if the filesystem at the specified mount point is actively in use by processes within the container. In such cases, processes might need to be stopped or the container restarted for a clean unmount.
<B>USAGE EXAMPLE</B>
To unmount a disk mounted at /mnt/mydisk inside container ID 101:pct unmount 101 /mnt/mydisk
This command will detach the associated host resource from the container's filesystem.
<B>PROXMOX VE INTEGRATION</B>
This command is specifically designed for use within a Proxmox Virtual Environment host. It leverages Proxmox's internal mechanisms for managing LXC containers, including their configuration files and cgroup setups, to ensure proper resource handling and isolation.
HISTORY
The pct unmount command is an integral part of the Proxmox Container Toolkit (pct), which was developed by Proxmox Server Solutions GmbH. It emerged as Proxmox Virtual Environment adopted LXC (Linux Containers) as a lightweight virtualization solution. As Proxmox VE evolved to manage LXC containers effectively, tools like pct were created to provide a consistent and powerful command-line interface for tasks such as creating, starting, stopping, and managing storage for containers. pct unmount has been a core subcommand since the early versions of pct, enabling robust storage management for LXC containers.
SEE ALSO
pct(1), pct mount(1), lxc-attach(1), umount(8)


