mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
82d83a01ce
When autoactivating a VG, there could be an existing VG with exactly the same PV UUIDs. The PVs could be reappeared after previous loss/disconnect (for example disconnecting and reconnecting iscsi). Since there's no "autodeactivation" yet, the mappings for the LVs from the VG were left in the system even if the device was disconnected. These mappings also hold the major:minor of the underlying device. So if the device reappears, it is assigned a different major:minor pair (...and kernel name). We need to cope with this during autoactivation so any existing mappings are corrected for any changes. The VG refresh does that (the vgchange --refresh functionality) - call this before VG autoactivation. (If the VG does not exist yet, the VG refresh is NOP)