}
segtype->cmd = cmd;
- segtype->name = "cache_pool";
+ segtype->name = "cache-pool";
segtype->flags = SEG_CACHE_POOL;
segtype->ops = &_cache_pool_ops;
segtype->private = NULL;
}
if (lp->extents > org->le_count) {
- log_error("Cache_Pool size cannot be larger than"
+ log_error("cache-pool size cannot be larger than"
" the origin");
return NULL;
}
- if (!(lp->segtype = get_segtype_from_string(vg->cmd, "cache_pool")))
+ if (!(lp->segtype = get_segtype_from_string(vg->cmd,
+ "cache-pool")))
return_0;
} else if (seg_is_thin(lp) && lp->snapshot) {
if (!(org = find_lv(vg, lp->origin))) {
.RB [ \-v | \-\-verbose ]
.RB [ \-\-version ]
.sp
-.B lvconvert \-\-type cache_pool
+.B lvconvert \-\-type cache-pool
.RB [ \-c | \-\-chunksize
.IR ChunkSize [ bBsSkKmMgG ]]
.RB [ \-\-cachemode
uses this granularity to track which regions are in sync.
.TP
.B \-\-type \fISegmentType
-Used to convert a logical volume to another segment type, like cache_pool,
+Used to convert a logical volume to another segment type, like cache-pool,
cache, raid1, mirror. When converting a logical volume to a cached logical
volume, the \-\-cachepool argument is required.
.TP
Convert an existing logical volume to a cache pool logical volume using the
given pool metadata LV.
.sp
-.B lvconvert --type cache_pool vg00/my_lv_data \-\-poolmetadata vg00/my_lv_meta
+.B lvconvert --type cache-pool vg00/my_lv_data \-\-poolmetadata vg00/my_lv_meta
.B lvrename vg00/my_lv_data vg00/my_lv_cachepool
Convert an existing logical volume to a cached logical volume using the given
Create a cache pool logical volume that can later be used to cache one
logical volume.
.sp
-.B lvcreate --type cache_pool -L 1G -n my_lv_cachepool vg /dev/fast1
+.B lvcreate --type cache-pool -L 1G -n my_lv_cachepool vg /dev/fast1
If there is an existing cache pool logical volume, create the large slow
device (i.e. the origin) and link it to the supplied cache pool LV,
Step-2> lvcreate -L 8M -n meta my_vg /dev/fast_dev
# Combine cache pool sub-LVs into a cache pool.
-Step-3> lvconvert --type cache_pool vg/cachepool --poolmetadata vg/meta
+Step-3> lvconvert --type cache-pool vg/cachepool --poolmetadata vg/meta
# Combine the cache pool and origin to create a cached LV
Step-4> lvconvert --type cache my_vg/my_lv --cachepool vg/cachepool
Step-2> lvcreate --type raid1 -L 8M -n meta my_vg /dev/fast1 /dev/fast2
# Combine cache pool sub-LVs into a cache pool.
-Step-3> lvconvert --type cache_pool vg/cachepool --poolmetadata vg/meta
+Step-3> lvconvert --type cache-pool vg/cachepool --poolmetadata vg/meta
# Combine the cache pool and origin to create a cached LV
Step-4> lvconvert --type cache my_vg/my_lv --cachepool vg/cachepool
Step-2> lvcreate -L 8M -n meta my_vg /dev/fast_dev
# Combine cache pool sub-LVs into a cache pool and specify "writethough".
-Step-3> lvconvert --type cache_pool vg/cachepool \\
+Step-3> lvconvert --type cache-pool vg/cachepool \\
--poolmetadata vg/meta --cachemode writethrough -n cachepool
# Combine the cache pool and origin to create a cached LV
####################
# Full CLI (the advertised form)
-lvcreate --type cache_pool -l 1 -n ${lv}_cache_pool $vg
+lvcreate --type cache-pool -l 1 -n ${lv}_cache_pool $vg
lvremove -ff $vg/${lv}_cache_pool
# Shorthand CLI (not advertised) -- not yet implemented
################
# Create/remove cache_pool
-lvcreate --type cache_pool -l 1 -n ${lv}_cache_pool $vg
+lvcreate --type cache-pool -l 1 -n ${lv}_cache_pool $vg
lvremove -ff $vg
# Create cache_pool, then origin with cache, then remove all
-lvcreate --type cache_pool -l 1 -n ${lv}_cache_pool $vg
+lvcreate --type cache-pool -l 1 -n ${lv}_cache_pool $vg
lvcreate --type cache -l 2 $vg/${lv}_cache_pool -n $lv1
dmsetup table ${vg}-$lv1 | grep cache # ensure it is loaded in kernel
lvremove -ff $vg
# Create cache_pool, then origin with cache, then remove cache_pool/cache
-lvcreate --type cache_pool -l 1 -n ${lv}_cache_pool $vg
+lvcreate --type cache-pool -l 1 -n ${lv}_cache_pool $vg
lvcreate --type cache -l 2 $vg/${lv}_cache_pool -n $lv1
lvremove -ff $vg/${lv}_cache_pool
lvremove -ff $vg/$lv1
# Create cache_pool, then origin with cache, then remove origin
-lvcreate --type cache_pool -l 1 -n ${lv}_cache_pool $vg
+lvcreate --type cache-pool -l 1 -n ${lv}_cache_pool $vg
lvcreate --type cache -l 2 $vg/${lv}_cache_pool -n $lv1
lvremove -ff $vg/$lv1
lvremove -ff $vg/${lv}_cache_pool
# Shorthand CLI (cache_pool exists, create origin w/ cache)
-#lvcreate --type cache_pool -l 1 -n ${lv}_cache_pool $vg
+#lvcreate --type cache-pool -l 1 -n ${lv}_cache_pool $vg
#lvcreate --cache -l 2 $vg/${lv}_cache_pool -n $lv1
#lvremove -ff $vg
# Shorthand CLI (cache_pool exists, create origin w/ cache)
-#lvcreate --type cache_pool -l 1 -n ${lv}_cache_pool $vg
+#lvcreate --type cache-pool -l 1 -n ${lv}_cache_pool $vg
#lvcreate -H -l 2 $vg/${lv}_cache_pool -n $lv1
#lvremove -ff $vg
# Repeat key tests with 'writethrough' cachemode
################################################
# Create/remove cache_pool
-lvcreate --type cache_pool -l 1 -n ${lv}_cache_pool $vg --cachemode writethrough
+lvcreate --type cache-pool -l 1 -n ${lv}_cache_pool $vg --cachemode writethrough
lvremove -ff $vg
# Create cache_pool, then origin with cache, then remove all
-lvcreate --type cache_pool -l 1 -n ${lv}_cache_pool $vg
+lvcreate --type cache-pool -l 1 -n ${lv}_cache_pool $vg
lvcreate --type cache -l 2 $vg/${lv}_cache_pool -n $lv1 --cachemode writethrough
lvremove -ff $vg
# Create cache_pool, then origin with cache, then remove cache_pool/cache
-lvcreate --type cache_pool -l 1 -n ${lv}_cache_pool $vg
+lvcreate --type cache-pool -l 1 -n ${lv}_cache_pool $vg
lvcreate --type cache -l 2 $vg/${lv}_cache_pool -n $lv1 --cachemode writethrough
lvremove -ff $vg/${lv}_cache_pool
lvremove -ff $vg/$lv1
# Create cache_pool, then origin with cache, then remove origin
-lvcreate --type cache_pool -l 1 -n ${lv}_cache_pool $vg
+lvcreate --type cache-pool -l 1 -n ${lv}_cache_pool $vg
lvcreate --type cache -l 2 $vg/${lv}_cache_pool -n $lv1 --cachemode writethrough
lvremove -ff $vg/$lv1
lvremove -ff $vg/${lv}_cache_pool
/* FIXME: Check thin-pool and thin more thoroughly! */
if (!strcmp(type_str, "snapshot") ||
!strncmp(type_str, "raid", 4) ||
- !strcmp(type_str, "cache_pool") || !strcmp(type_str, "cache") ||
+ !strcmp(type_str, "cache-pool") || !strcmp(type_str, "cache") ||
!strcmp(type_str, "thin-pool") || !strcmp(type_str, "thin"))
return 1;
return 0;
}
- if (!strcmp(type_str, "cache_pool")) {
+ if (!strcmp(type_str, "cache-pool")) {
cache_pool = 1;
if ((tmp_str = arg_str_value(cmd, cachemode_ARG, NULL))) {
if (!strcmp(tmp_str, "writeback"))
}
}
- lp->segtype = get_segtype_from_string(cmd, arg_str_value(cmd, type_ARG, cache_pool ? "cache_pool" : "thin-pool"));
+ lp->segtype = get_segtype_from_string(cmd, arg_str_value(cmd, type_ARG, cache_pool ? "cache-pool" : "thin-pool"));
if (!lp->segtype)
return_0;
} else { /* Mirrors (and some RAID functions) */
{
int cache_pool = 0;
- if (!strcmp("cache_pool", arg_str_value(cmd, type_ARG, "none")))
+ if (!strcmp("cache-pool", arg_str_value(cmd, type_ARG, "none")))
cache_pool = 1;
if (!cache_pool && !arg_count(cmd, thinpool_ARG)) {