mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
pools: after fail of vg_write no restore
Revert part of commit 51a29e60564d537, it's probably bad idea to continue with any recovery, when vg_write() or vg_commit() fail - so it's better to leave it as it is.
This commit is contained in:
parent
94e4d5fcf5
commit
138c2417c0
@ -6971,14 +6971,9 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,
|
||||
lp->activate = CHANGE_AN;
|
||||
|
||||
/* store vg on disk(s) */
|
||||
if (!vg_write(vg) || !vg_commit(vg)) {
|
||||
if (seg_is_pool(lp)) {
|
||||
/* Pool volumes have already created metadata LV */
|
||||
stack;
|
||||
goto revert_new_lv;
|
||||
}
|
||||
if (!vg_write(vg) || !vg_commit(vg))
|
||||
/* Pool created metadata LV, but better avoid recover when vg_write/commit fails */
|
||||
return_NULL;
|
||||
}
|
||||
|
||||
backup(vg);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user