Skip to content

Restore call to clean_method and call commit_changes to write partition tables

Pascal Hambourg requested to merge pham/partman-auto-lvm:clean_method into master

Two short fixes:

  1. Restore call to clean_method

The call to clean_method() was lost with commit cfc6797f (Factor out the creation of Physical Volume partitions).

Without this call, partitions on other disks may be used in addition to the partitions created by the recipe. As a result,

  • such filesystem partitions will keep their mount points and may conflict with the mount points created by the recipe;
  • such swap partitions will be used;
  • any such EFI partition may be used instead of the EFI partition created by the recipe.

So restore the call to clean_method() to prevent this, like in partman-auto and partman-auto-crypto.

Closes: #1092129

Note: Undesired use of other EFI partitions may also be caused by another bug in partman-efi (see #1034208 #1034812 #1041168 for details).

  1. Call commit_changes to write partition tables

auto_lvm_prepare() calls confirm_changes() to show and confirm pending changes before creating logical volumes, but then it only sends COMMIT commands to parted_server for disks used by the recipe, and later stops parted_server, causing pending changes on other disks to be lost.

So call commit_changes() instead of COMMIT commands, like manual configuration of LVM or RAID does. This is also consistent with automatic partitioning without LVM.

Edited by Pascal Hambourg

Merge request reports

Loading