LinuxCommandLibrary

qm-rescan

Rescan storage for VMs and containers

TLDR

View documentation for the original command

$ tldr qm disk rescan
copy

SYNOPSIS

qm-rescan [OPTIONS]

PARAMETERS

--storage <id>
    Rescan a specific storage identified by its unique <id>.

--all
    Rescan all currently configured storage backends within the Proxmox VE environment.

--dry-run
    Perform a simulated run, showing what actions would be taken without actually making any modifications to the storage or its metadata.

--verbose
    Increase the verbosity of the output, providing more detailed information about the scanning process.

--force
    Force the rescan operation, potentially overriding certain internal locks or busy states. Use with extreme caution as it can interfere with ongoing operations if not understood properly.

--skip-locked
    When used with --all, this option instructs qm-rescan to skip any storages that are currently locked. This is the default behavior when --all is specified.

--fix-errors
    Attempt to automatically fix certain types of detected errors during the rescan process, such as missing physical devices for LVM-based storage groups.

DESCRIPTION

qm-rescan is a specialized internal utility within the Proxmox VE (Virtual Environment) ecosystem. Its primary function is to refresh and update the Proxmox cluster's view of configured storage backends. This involves scanning storage types such as LVM, ZFS, directory, iSCSI, and NFS to discover new volumes, verify the integrity of existing ones, and synchronize metadata.

It is particularly useful when manual changes have been made to the underlying storage outside of the Proxmox web interface or API, ensuring that Proxmox VE accurately recognizes and manages all available storage resources for virtual machines and containers. While it can be executed directly by an administrator, it is also frequently invoked internally by other Proxmox tools or system services to maintain storage consistency.

CAVEATS

Running qm-rescan, especially with the --all option, can be I/O intensive and may take a significant amount of time on systems with large or numerous storage configurations. Using the --force option should be done with extreme care, as it can potentially disrupt ongoing storage operations or data consistency if not used in appropriate scenarios.

INTEGRATION WITH PROXMOX VE

Although qm-rescan can be executed directly from the command line, it is often invoked internally by other Proxmox services or by administrator actions through the Proxmox web interface. For instance, creating or modifying storage in the GUI or via pvesm commands can trigger an internal rescan. Its primary role is to ensure the cluster's distributed storage view remains synchronized with the actual state of the underlying storage resources.

HISTORY

qm-rescan is an integral part of the Proxmox VE storage management framework, having been a core utility since the early versions of Proxmox VE. Its development has evolved alongside the expanding support for various storage technologies, ensuring consistent and reliable storage management within the Proxmox environment.

SEE ALSO

pvesm(8), qm(1), pve-cluster(7)

Copied to clipboard