Bug 1284128
Summary: | thin and cache pool create commands should be consistent | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Corey Marthaler <cmarthal> |
Component: | lvm2 | Assignee: | LVM and device-mapper development team <lvm-team> |
lvm2 sub component: | Cache Logical Volumes | QA Contact: | cluster-qe <cluster-qe> |
Status: | CLOSED NOTABUG | Docs Contact: | |
Severity: | low | ||
Priority: | unspecified | CC: | agk, heinzm, jbrassow, msnitzer, prajnoha, zkabelac |
Version: | 7.2 | ||
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-21 10:55:18 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Corey Marthaler
2015-11-20 23:01:00 UTC
(In reply to Corey Marthaler from comment #0) > Description of problem: > Shouldn't all these create commands behave the same whether it's a cache or > thin pool being created? So let's go one-by-one > > > # --[thin,cache]-pool > > [root@host-122 ~]# lvcreate --thin-pool POOL1 -L 100M vg > > Logical volume "POOL1" created. > > [root@host-122 ~]# lvcreate --cache-pool POOL2 -L 100M vg > > Ambiguous syntax, please create --type cache-pool POOL2 separately. --type thin-pool != --thin-pool|--thinpool --type cache-pool != --cache-pool|--cachepool For 'thin-pool' we have implemented 'cheat' support into command line, so if the tool 'guesses' you wanted to create POOL1 it will do it. However for cache - we cannot 'cheat' since it's not actually clear (ambigous) if you wanted to create 'cachedLV' or 'cachepool' With thin - case is simple - without -V you cannot create thin volume so the only thing you could create is pool. > # --type [thin,cache]-pool > [root@host-122 ~]# lvcreate --type thin-pool POOL3 -L 100M vg > Volume group "POOL3" not found > [root@host-122 ~]# lvcreate --type cache-pool POOL4 -L 100M vg > Volume group "POOL4" not found Correct - --type takes argument thin-pool,cache-pool So first 'free' arg is volume group name - in this case POOL3, POOL4 > > > # --type [thin,cache]-pool -n > [root@host-122 ~]# lvcreate --type thin-pool -n POOL5 -L 100M vg > Logical volume "POOL5" created. > [root@host-122 ~]# lvcreate --type cache-pool -n POOL6 -L 100M vg > Logical volume "POOL6" created. Correct - --name of pool is given and name of volume group is 'vg' (first free arg on line) > > > # --[thin,cache]pool > [root@host-122 ~]# lvcreate --thinpool POOL7 -L 100M vg > Logical volume "POOL7" created. > [root@host-122 ~]# lvcreate --cachepool POOL8 -L 100M vg > Ambiguous syntax, please create --type cache-pool POOL8 separately. Opposite case for the first case. Worth to note here - for a while lvm2 now support arbitrary amount of '-' in option name i.e. --thin-pool == --t-h-i-n-p-o-o-l and many other variants basically from any option name all '-' are dropped and this gives you the 'base' option name. So let's reapeat this case '--type thinpool' != --thinpool --thinpool takes argument poolname so lvcreate 'knows' pool name, knows size and knows VG name and can create. The cache case is 'ambiguous' - if POOL8 doesn't exists command doesn't know if you wanted to create cache-pool or cached LV. In future it's possible we will have some 'policy' to pick 'cachepool' size according to LV size (i.e. 10% of LV size), but until this happens, we report ambiguous syntax error... > > > # --[thin,cache]pool -n > [root@host-122 ~]# lvcreate --thinpool -n POOL9 -L 100M vg > Logical volume name "-n" is invalid. > Run `lvcreate --help' for more information. > [root@host-122 ~]# lvcreate --cachepool -n POOL10 -L 100M vg > Logical volume name "-n" is invalid. > Run `lvcreate --help' for more information. --thin != --thinpool --cache != --cachepool --thin takes no argument --cache takes no argument --thinpool <poolname> --cachepool <poolname> > # --type [thin,cache]pool -n > [root@host-122 ~]# lvcreate --type thinpool -n POOL11 -L 100M vg > WARNING: Unrecognised segment type thinpool > Invalid argument for --type: thinpool > Error during parsing of command line. > [root@host-122 ~]# lvcreate --type cachepool -n POOL12 -L 100M vg > WARNING: Unrecognised segment type cachepool > Invalid argument for --type: cachepool > Error during parsing of command line. Name of 'segment type' is cache-pool, thin-pool We may eventually add support for segment aliases so tool will make thin-pool == thinpool. Possibly RFE this separately. --- So overall no bug here - everything works as expected. (The situation is worse with 'lvconvert' - that command needs fixes) |