mirror of
git://sourceware.org/git/lvm2.git
synced 2025-04-01 18:50:41 +03:00
Thin create normal (old) snapshot when size is specified
This commit is contained in:
parent
815f56fd90
commit
01da72eb3a
@ -204,7 +204,12 @@ static int _determine_snapshot_type(struct volume_group *vg,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (lv_is_thin_volume(lvl->lv)) {
|
||||
if (!arg_count(vg->cmd, extents_ARG) && !arg_count(vg->cmd, size_ARG)) {
|
||||
if (!lv_is_thin_volume(lvl->lv)) {
|
||||
log_error("Please specify either size or extents with snapshots.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
lp->thin = 1;
|
||||
if (!(lp->segtype = get_segtype_from_string(vg->cmd, "thin")))
|
||||
return_0;
|
||||
@ -212,11 +217,6 @@ static int _determine_snapshot_type(struct volume_group *vg,
|
||||
lp->pool = first_seg(lvl->lv)->pool_lv->name;
|
||||
}
|
||||
|
||||
if (!lp->thin && !arg_count(vg->cmd, extents_ARG) && !arg_count(vg->cmd, size_ARG)) {
|
||||
log_error("Please specify either size or extents with snapshots.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user