mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
metadata: fix regression causing PVs not in VGs to be marked as allocatable
If the PV is not yet in a VG, it's not allocatable. A regression introduced by commit0283c439ec
(_pv_create) and later commita7ca101517
(pv_read).
This commit is contained in:
parent
7021c8f1a4
commit
6dc7b783c8
@ -1,5 +1,6 @@
|
||||
Version 2.02.108 -
|
||||
=================================
|
||||
Fix regression causing PVs not in VGs to be marked as allocatable (2.02.59).
|
||||
Fix VG component of lvid in vgsplit/vgmerge and check in vg_validate.
|
||||
Add lv_full_name, lv_parent and lv_dm_path fields to reports.
|
||||
Change lv_path field to suppress devices that never appear in /dev/vg.
|
||||
|
@ -1599,7 +1599,6 @@ static struct physical_volume *_alloc_pv(struct dm_pool *mem, struct device *dev
|
||||
}
|
||||
|
||||
pv->dev = dev;
|
||||
pv->status = ALLOCATABLE_PV;
|
||||
|
||||
dm_list_init(&pv->tags);
|
||||
dm_list_init(&pv->segments);
|
||||
|
@ -19,6 +19,17 @@ check_changed_uuid_() {
|
||||
|
||||
aux prepare_pvs 4
|
||||
|
||||
# check 'allocatable' pv attribute
|
||||
pvcreate $dev1
|
||||
check pv_field "$dev1" pv_attr ---
|
||||
vgcreate $vg1 "$dev1"
|
||||
check pv_field "$dev1" pv_attr a--
|
||||
pvchange --allocatable n "$dev1"
|
||||
check pv_field "$dev1" pv_attr ---
|
||||
vgremove -ff $vg1
|
||||
not pvchange --allocatable y "$dev1"
|
||||
pvremove -ff "$dev1"
|
||||
|
||||
for mda in 0 1 2
|
||||
do
|
||||
# "setup pv with metadatacopies = $mda"
|
||||
|
Loading…
Reference in New Issue
Block a user