mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
snapshots: check for active state
Fix testing if the snapshot could be resized and use lv_is_active() to get correct answer in cluster.
This commit is contained in:
parent
1cdb6ca2b2
commit
272f5ae208
@ -1,5 +1,6 @@
|
||||
Version 2.02.99 -
|
||||
===================================
|
||||
Fix test for active snapshot in cluster before resizing it.
|
||||
Report backtrace from dump filter error path.
|
||||
Do not use persistent filter with lvmetad.
|
||||
Composable persistent filter functionality for global filter.
|
||||
|
@ -362,7 +362,6 @@ static int _lvresize(struct cmd_context *cmd, struct volume_group *vg,
|
||||
struct lvresize_params *lp)
|
||||
{
|
||||
struct logical_volume *lv;
|
||||
struct lvinfo info;
|
||||
uint32_t stripesize_extents;
|
||||
uint32_t seg_stripes = 0, seg_stripesize = 0, seg_size;
|
||||
uint32_t seg_mirrors = 0;
|
||||
@ -762,7 +761,7 @@ static int _lvresize(struct cmd_context *cmd, struct volume_group *vg,
|
||||
return ECMD_FAILED;
|
||||
}
|
||||
|
||||
if (lv_info(cmd, lv, 0, &info, 0, 0) && info.exists) {
|
||||
if (lv_is_active(lv)) {
|
||||
log_error("Snapshot origin volumes can be resized "
|
||||
"only while inactive: try lvchange -an");
|
||||
return ECMD_FAILED;
|
||||
|
Loading…
Reference in New Issue
Block a user