pct-move-volume
Migrate LXC volume to different storage
TLDR
Move the root filesystem of a container to a different storage
Delete the filesystem association to the old volume once the move is complete
SYNOPSIS
pct move-volume <vmid> <disk> <target-storage> [OPTIONS]
PARAMETERS
<vmid>
The unique ID of the container (LXC) whose disk volume is to be moved.<disk>
The identifier of the disk to move (e.g., rootfs for the primary disk, or mp0, mp1 for additional mount points).<target-storage>
The name of the Proxmox storage pool where the volume should be moved to (e.g., local-lvm, nfs-storage).--format <format>
Specifies the target volume format (e.g., qcow2, raw, vmdk). Useful for converting disk types during migration.--force
Forces the operation, potentially overriding safety checks. Use with caution, especially on running containers.--dry-run
Performs a simulated run, showing what would happen without making any actual changes to the system or data.--sparse
Attempts to create a sparse image on the target storage if supported, which can save space for volumes that are not fully utilized.--target-volume <volume>
Allows specifying a custom name for the target volume. By default, it uses the format <vmid>/<diskid>.
DESCRIPTION
pct move-volume is a powerful Proxmox VE command-line utility designed to migrate a specific disk volume of an LXC container from one storage location to another on the same Proxmox node. Unlike pct migrate, which moves an entire container to a different node, pct move-volume focuses solely on re-locating a container's individual disk, such as its root filesystem (rootfs) or an attached mount point (mp0, mp1, etc.).
This functionality is crucial for administrators needing to optimize storage usage, change underlying storage types (e.g., from local LVM to shared NFS, or to a faster SSD-backed storage), or rebalance storage capacities without having to move the entire container. The command handles the complex steps of detaching the volume, copying the data, and reattaching it to the container's configuration, often with minimal or no downtime depending on the storage types and container state.
CAVEATS
This command is exclusive to Proxmox Virtual Environment (PVE) and is not a standard Linux utility.
It only moves a single disk volume on the same PVE node; it does not migrate the entire container to a different node.
For containers that are running, ensure the target storage supports live migration, or prepare for potential brief downtime. Using --force on a running container without proper precautions can lead to data corruption.
Always have a backup before performing disk migration operations.
USE CASES
- Migrating a container's root filesystem from a slower HDD to a faster SSD storage pool.
- Moving a data disk to shared storage (like NFS or CephFS) to enable high availability features for the container.
- Rebalancing storage usage on local disks by moving large volumes to less utilized storage.
- Converting disk formats (e.g., from
rawtoqcow2) while moving to a new storage.
DOWNTIME CONSIDERATIONS
While Proxmox strives for minimal downtime, the actual impact depends on the storage types involved and whether the container can remain running during the move. For critical production containers, it's often safer to perform the move during a maintenance window with the container gracefully shut down. Always verify the process with a test container first.
HISTORY
The pct move-volume command was introduced as part of the continuous development of Proxmox VE, specifically to enhance the flexibility and management of LXC container storage. As Proxmox VE evolved into a comprehensive virtualization platform, granular control over storage resources became critical. This command addresses the need to dynamically adjust container storage without full container migrations, reflecting a focus on operational efficiency and resource optimization within a single node.


