mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
Require logical volume(s) to be explicitly named for lvconvert --merge.
This commit is contained in:
parent
b7c2a2b709
commit
e7773faa8d
@ -1,5 +1,6 @@
|
||||
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.
|
||||
Fix 'void*' arithmetic warnings in dbg_malloc.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
|
||||
$(dmsetup targets | grep -q snapshot-merge) || exit 200
|
||||
lvs -a
|
||||
# make sure lvconvert --merge requires explicit LV listing
|
||||
not lvconvert --merge 2>err
|
||||
lvconvert --merge $vg/$(snap_lv_name_ $lv1)
|
||||
lvremove -f $vg/$lv1
|
||||
|
||||
|
@ -1738,9 +1738,14 @@ int lvconvert(struct cmd_context * cmd, int argc, char **argv)
|
||||
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,
|
||||
&lvconvert_merge_single);
|
||||
}
|
||||
|
||||
return lvconvert_single(cmd, &lp);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user