mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
Require logical volume(s) to be explicitly named for lvconvert --merge.
This commit is contained in:
parent
14a9722185
commit
57d31c99cc
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.73 -
|
Version 2.02.73 -
|
||||||
================================
|
================================
|
||||||
|
Require logical volume(s) to be explicitly named for lvconvert --merge.
|
||||||
Avoid changing aligned pe_start as a side-effect of very verbose logging.
|
Avoid changing aligned pe_start as a side-effect of very verbose logging.
|
||||||
Fix 'void*' arithmetic warnings in dbg_malloc.c.
|
Fix 'void*' arithmetic warnings in dbg_malloc.c.
|
||||||
Fix 'void*' arithmetic warning in some functions from libdm-iface.c.
|
Fix 'void*' arithmetic warning in some functions from libdm-iface.c.
|
||||||
|
@ -49,6 +49,8 @@ setup_merge $vg $lv1
|
|||||||
# now that snapshot LV is created: test if snapshot-merge target is available
|
# now that snapshot LV is created: test if snapshot-merge target is available
|
||||||
$(dmsetup targets | grep -q snapshot-merge) || exit 200
|
$(dmsetup targets | grep -q snapshot-merge) || exit 200
|
||||||
lvs -a
|
lvs -a
|
||||||
|
# make sure lvconvert --merge requires explicit LV listing
|
||||||
|
not lvconvert --merge 2>err
|
||||||
lvconvert --merge $vg/$(snap_lv_name_ $lv1)
|
lvconvert --merge $vg/$(snap_lv_name_ $lv1)
|
||||||
lvremove -f $vg/$lv1
|
lvremove -f $vg/$lv1
|
||||||
|
|
||||||
|
@ -1738,9 +1738,14 @@ int lvconvert(struct cmd_context * cmd, int argc, char **argv)
|
|||||||
return EINVALID_CMD_LINE;
|
return EINVALID_CMD_LINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lp.merge)
|
if (lp.merge) {
|
||||||
|
if (!argc) {
|
||||||
|
log_error("Please provide logical volume path");
|
||||||
|
return EINVALID_CMD_LINE;
|
||||||
|
}
|
||||||
return process_each_lv(cmd, argc, argv, READ_FOR_UPDATE, &lp,
|
return process_each_lv(cmd, argc, argv, READ_FOR_UPDATE, &lp,
|
||||||
&lvconvert_merge_single);
|
&lvconvert_merge_single);
|
||||||
|
}
|
||||||
|
|
||||||
return lvconvert_single(cmd, &lp);
|
return lvconvert_single(cmd, &lp);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user