1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-11 20:58:50 +03:00
David Teigland cc843151b4 lvmcache: ignore incorrect PV claim from old metadata
Outdated VG metadata that appears when an old device is attached
to the system can result in PVs appearing to belong to the
old/wrong VG, and commands are allowed to use (corrupt) the PVs.

- vgcreate old /dev/sda /dev/sdb /dev/sdc
- offline /dev/sda
- vgreduce --removemissing old
- vgremove old
- vgcreate new /dev/sdb /dev/sdc
- online /dev/sda

When sda is reattached, sdb and sdc will appear to be
in VG old again.  An attempt to correct the problem,
e.g. with vgremove old or vgreduce old, would modify
sdb and sdc, removing them from the new VG.

To fix this, check that sdb and sdc contain metadata for
VG old before allowing VG old to claim ownership of them.
With the fix, sdb and sdc are not displayed as part of
VG old, and commands to change VG old will fail as long
as it references incorrect PVs.

To fix VG old (sda), remove the incorrect PVs from VG old
while limiting the command to see only the correct PVs:
vgreduce --removemissing --devices /dev/sda old
2025-03-05 14:16:46 -06:00
..
2024-08-30 16:51:15 +02:00
2024-08-30 16:51:15 +02:00
2024-08-30 16:51:15 +02:00
2021-03-22 22:46:21 +01:00
2022-01-13 10:01:24 -06:00
2023-07-15 11:05:35 +02:00
2024-10-30 12:57:34 +01:00
2023-02-10 17:50:27 +01:00
2024-08-30 16:51:15 +02:00
2023-04-21 14:52:43 +02:00
2023-04-21 14:52:43 +02:00
2023-07-15 11:05:35 +02:00
2019-08-09 12:57:21 +02:00
2017-07-10 14:23:53 +02:00
2017-07-10 14:23:53 +02:00
2022-09-21 14:58:34 +02:00
2017-07-10 14:23:53 +02:00
2017-07-10 14:23:53 +02:00
2023-07-15 11:05:35 +02:00
2023-07-15 11:05:35 +02:00
2025-01-09 00:20:19 +01:00
2021-03-28 11:39:58 +02:00
2023-07-15 11:05:35 +02:00
2023-07-14 16:52:51 +02:00
2023-07-15 11:05:35 +02:00
2020-09-19 17:30:51 +02:00
2018-09-10 11:49:11 -05:00
2023-07-10 17:13:32 +02:00
2024-04-24 13:54:05 +02:00
2023-02-23 16:01:50 +01:00
2023-10-15 19:51:43 +02:00
2024-10-28 20:07:37 +01:00
2023-01-16 12:37:40 +01:00
2023-02-10 17:50:27 +01:00
2023-03-08 16:31:28 -06:00
2019-11-15 12:37:44 +01:00
2021-09-21 21:03:47 +02:00
2018-09-10 11:49:11 -05:00
2018-09-10 11:49:11 -05:00
2017-07-10 14:23:53 +02:00
2017-07-10 14:23:53 +02:00
2018-09-10 11:49:11 -05:00
2024-08-30 16:51:15 +02:00
2023-07-13 21:31:18 +02:00
2023-02-10 17:50:27 +01:00
2017-07-10 14:23:53 +02:00
2024-04-07 20:47:28 +02:00
2017-07-10 14:23:53 +02:00
2025-02-24 18:59:58 +01:00
2023-07-15 11:05:35 +02:00
2020-01-13 17:42:31 +01:00
2024-05-27 21:34:25 +02:00
2021-03-30 13:08:14 +02:00
2024-08-30 16:51:15 +02:00
2020-09-25 22:59:35 +02:00
2024-08-30 16:51:15 +02:00
2018-06-25 15:07:55 +02:00
2024-08-30 16:51:15 +02:00
2018-09-10 11:49:11 -05:00
2023-07-14 16:52:51 +02:00
2017-07-10 14:23:53 +02:00
2017-07-10 14:23:53 +02:00
2017-07-10 14:23:53 +02:00
2020-09-25 22:59:35 +02:00
2022-09-09 15:50:00 -05:00
2017-07-10 14:23:53 +02:00
2017-07-10 14:23:53 +02:00