diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2014-06-17 13:13:23 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2014-06-17 13:36:33 +0200 |
commit | cd6d6fc24e8093d437543613ddbcbdb0e9c5f8c8 (patch) | |
tree | 1e5c93fa531d914e760013ee0af810c893a91de2 | |
parent | 15e7066fe3ea7ca9129b68e3b39e9667348a02cc (diff) | |
download | lvm2-cd6d6fc24e8093d437543613ddbcbdb0e9c5f8c8.tar.gz |
snapshot: report proper error message
Expresing -lXX%LV is not valid for snapshot, but error message for
snapshost case was not complete and missed %ORIGIN.
Also document correct settings for in manpage properly where
it missed %PVS.
-rw-r--r-- | man/lvcreate.8.in | 2 | ||||
-rw-r--r-- | tools/lvcreate.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/man/lvcreate.8.in b/man/lvcreate.8.in index 9892c21b5..93010638f 100644 --- a/man/lvcreate.8.in +++ b/man/lvcreate.8.in @@ -90,7 +90,7 @@ lvcreate \- create a logical volume in an existing volume group .B lvcreate .RB [ \-l | \-\-extents -.IR LogicalExtentsNumber [ % { VG | FREE | ORIGIN }] +.IR LogicalExtentsNumber [ % { ORIGIN | VG | PVS | FREE }] | .BR \-L | \-\-size .IR LogicalVolumeSize [ bBsSkKmMgGtTpPeE ]] diff --git a/tools/lvcreate.c b/tools/lvcreate.c index 215626578..1fa5aef40 100644 --- a/tools/lvcreate.c +++ b/tools/lvcreate.c @@ -380,8 +380,8 @@ static int _update_extents_params(struct volume_group *vg, extents = percent_of_extents(lp->extents, vg->extent_count, 0); break; case PERCENT_LV: - log_error("Please express size as %%VG, %%PVS, or " - "%%FREE."); + log_error("Please express size as %s%%VG, %%PVS, " + "or %%FREE.", (lp->snapshot) ? "%ORIGIN, " : ""); return 0; case PERCENT_ORIGIN: if (lp->snapshot && lp->origin && |