]> git.proxmox.com Git - pve-storage.git/commit
LVM: Add '--refresh' when activating volumes
authorStoiko Ivanov <s.ivanov@proxmox.com>
Fri, 4 Jan 2019 13:06:25 +0000 (14:06 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 15 Jan 2019 08:43:07 +0000 (09:43 +0100)
commit628a921a94803e2bf45e7a834a200cdfa11b520b
treecfa3a9e91a28d99a39c1456f14644545b2b9769d
parent955c1f2cf7e358c03e9ee8e5245195010223172a
LVM: Add '--refresh' when activating volumes

From `man 8 lvchange`:
  --refresh
      If the logical volume is active, reload its metadata. This is not
      necessary in normal operation, but may be useful ... if you're doing
      clustering manually without a clustered lock manager.

Fixes migration in a shared LVM (iscsi) setup, where a disk gets resized on one
node A and the guest is afterwards migrated to another node B: B still presents
the old size to the guest, leading to data corruption.

It is necessary to run `lvchange` twice because the options `-ay` and
`--refresh` are mutually exclusive.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
PVE/Storage/LVMPlugin.pm