community.general.lvm_pv_move_data module – Move data between LVM Physical Volumes (PVs)
Note
This module is part of the community.general collection (version 12.6.1).
You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install community.general. You need further requirements to be able to use this module, see Requirements for details.
To use it in a playbook, specify: community.general.lvm_pv_move_data.
New in community.general 11.2.0
Synopsis
- Moves data from one LVM Physical Volume (PV) to another.
Requirements
The below requirements are needed on the host that executes this module.
- LVM2 utilities
- Both
sourceanddestinationdevices must exist, and the PVs must be in the same volume group. - The
destinationPV must have enough free space to accommodate thesourcePV’s allocated extents. - Verbosity is automatically controlled by Ansible’s verbosity level (using multiple
-vflags).
Parameters
Parameter | Comments |
|---|---|
atomic boolean | Makes the Choices:
|
auto_answer boolean | Answer yes to all prompts automatically. Choices:
|
autobackup boolean | Automatically backup metadata before changes (strongly advised!). Choices:
|
destination path / required | Path to the destination block device to move data to. Must be an existing PV with enough free space. |
source path / required | Path to the source block device to move data from. Must be an existing PV. |
Examples
- name: Moving data from /dev/sdb to /dev/sdc
community.general.lvm_pv_move_data:
source: /dev/sdb
destination: /dev/sdc
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
|---|---|
actions list / elements=string | List of actions performed during module execution. Returned: success Sample: |
Collection links
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/projects/ansible/latest/collections/community/general/lvm_pv_move_data_module.html