Home / Alt manpages / lvm-lvpoll(8)

  • lvm-lvpoll(8)
  • Admin command
  • linux

Recover an Interrupted Poll with lvm lvpoll

A pvmove that survived a reboot leaves an orphaned poll behind, and lvm lvpoll is the tool that hands it back to lvmpolld or stops it cleanly. It is a recovery tool, not a way to start a new operation: it does not replace pvmove or lvconvert.

  • Time: about 10 minutes for the command and checks, plus however long the underlying storage operation needs.
  • Needs: the lvm2 package and normally root privileges.
  • Examples use: vg00 and deliberately fictional LV names. Replace them only with names you have confirmed on the affected host.

1. Confirm the tool and the operation

Check the installed LVM version and the command interface:

lvm version
lvm lvpoll --help

On the system used for this guide, the installed package is lvm2 2.03.16-3ubuntu3.2, with LVM reporting version 2.03.16(2). The local lvm-lvpoll(8) page is from LVM tools 2.03.16, dated 18 May 2022. Treat the installed help as authoritative if another system reports a different version.

Then identify the logical volume representing the operation, before you change anything:

sudo lvs -a -S move_pv=/dev/REPLACE_WITH_SOURCE_PV

For a pvmove, the manpage recommends this selector for finding the pvmove LV created by the original pvmove /dev/name command. Check the output carefully: an LV such as vg00/pvmove0 is an example, not a universal name.

Checkpoint

Do not proceed until you know the volume group, LV and operation type. A typo in the LV name should fail safely, but guessing can put attention on the wrong storage operation.

2. Continue a pvmove

Run the poll continuation as root, using the pvmove LV you found above:

sudo lvm lvpoll --polloperation pvmove vg00/pvmove0

This asks lvmpolld to continue processing the existing poll. It does not copy data to a new destination, and it does not create a new pvmove.

Watch the operation with the normal LVM reporting tools:

sudo lvs -a -o lv_name,lv_attr,lv_size,devices vg00

The exact columns and progress details depend on your local LVM configuration and operation. A command error is more useful than an apparently quiet terminal: keep it, then inspect the LV and physical volumes before retrying.

Warning

Do not use --handlemissingpvs merely to suppress an error. That option allows polling to continue when physical volumes are missing, for example during a repair after a faulty device. Establish why a PV is missing, and whether continuing is acceptable for the data and redundancy level involved, before you touch it.

3. Continue other supported polls

The --polloperation value must describe the operation already represented by the LV. The installed command accepts four values:

Existing operationCommand shape
Mirror conversion or repairsudo lvm lvpoll --polloperation convert vg00/lvmirror
Snapshot mergesudo lvm lvpoll --polloperation merge vg00/snapshot_old
Thin snapshot mergesudo lvm lvpoll --polloperation merge_thin vg00/thin_snapshot

For a damaged mirror where the missing-PV condition is understood and authorised, the documented form is:

sudo lvm lvpoll --polloperation convert \
  --handlemissingpvs vg00/damaged_mirror

Keep the operation value and LV together when you copy a command. merge and merge_thin are not interchangeable, and convert covers mirror conversion or repair rather than a snapshot merge.

4. Abort a poll when continuation is not wanted

Warning

Aborting is a state-changing storage action. It can leave an operation incomplete and may affect redundancy, available space or the expected state of a snapshot. Confirm the incident record and backup position before using it.

Stop processing the existing poll with the documented abort form:

sudo lvm lvpoll --polloperation pvmove \
  --abort vg00/pvmove0

The manpage defines --abort as stopping processing of a poll operation in lvmpolld. It is not an undo command for data already moved. Afterwards, inspect the volume group and the affected devices:

sudo lvs -a -o lv_name,lv_attr,lv_size,devices vg00
sudo pvs -o pv_name,pv_attr,pv_size,pv_free

There is no general reverse command in lvpoll. Recovery after an abort depends on the operation and its resulting metadata. Use the appropriate higher-level LVM command only after checking the resulting state, and take a metadata backup where your normal change procedure requires one.

Options that need deliberate handling

  • --interval Number requests regular progress reporting. It does not change the operation's schedule or make a stalled device healthy.
  • --autobackup y or n controls automatic metadata backup after a change; enabling it is strongly advised by the manpage.
  • Extra diagnostics come from -v, repeated for more detail, but remember that -q suppresses output and overrides verbose and debug messages.
  • Avoid --nolocking on a live volume group. The command reference warns that concurrent commands can produce incorrect results.
  • Do not add --yes to a recovery command just to make automation pass. It removes interactive confirmation entirely.
  • --test disables metadata writing but can produce unusual results in multi-stage operations, so it is not a substitute for a real dry run of the poll.

Done means

  • Confirmed the LVM version and operation type on the host.
  • Identified the LV name from the actual volume group, not copied from an example.
  • Continued or aborted the poll with the matching --polloperation value.
  • Checked lvs output afterwards, and used missing-PV handling only with an understood repair plan.
  • Avoided starting a new pvmove or conversion by accident, and recorded any abort as an irreversible state change.