summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2014-10-18 10:58:30 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2014-10-24 16:39:32 +0200
commita330640063fed88616379e3c2e4e85b8e2e355b0 (patch)
tree6dd6a85c281ebdc92593f6811854fe0f11a95f97
parent9a6758e953a83aeb1d384df97c6f18b542c569a2 (diff)
downloadlvm2-a330640063fed88616379e3c2e4e85b8e2e355b0.tar.gz
options: introduce pooldatasize option
Introduce new option to specify pool data size. This will be user to create i.e. cache & cachepool at once. And possible for thin external origin snapshot. This is only very basic patch to enable options, the real working code will come later.
-rw-r--r--lib/metadata/metadata-exported.h2
-rw-r--r--tools/args.h1
-rw-r--r--tools/commands.h7
3 files changed, 8 insertions, 2 deletions
diff --git a/lib/metadata/metadata-exported.h b/lib/metadata/metadata-exported.h
index cfc0ce212..3d656b70d 100644
--- a/lib/metadata/metadata-exported.h
+++ b/lib/metadata/metadata-exported.h
@@ -854,6 +854,8 @@ struct lvcreate_params {
uint64_t voriginsize; /* snapshot */
uint32_t pool_metadata_extents; /* pools */
uint64_t pool_metadata_size; /* pools */
+ uint32_t pool_data_extents; /* pools */
+ uint64_t pool_data_size; /* pools */
struct dm_list *pvh; /* all */
uint64_t permission; /* all */
diff --git a/tools/args.h b/tools/args.h
index 492eb285e..4a4845f04 100644
--- a/tools/args.h
+++ b/tools/args.h
@@ -69,6 +69,7 @@ arg(noudevsync_ARG, '\0', "noudevsync", NULL, 0)
arg(originname_ARG, '\0', "originname", string_arg, 0)
arg(physicalvolumesize_ARG, '\0', "setphysicalvolumesize", size_mb_arg, 0)
arg(poll_ARG, '\0', "poll", yes_no_arg, 0)
+arg(pooldatasize_ARG, '\0', "pooldatasize", size_mb_arg, 0)
arg(poolmetadata_ARG, '\0', "poolmetadata", string_arg, 0)
arg(poolmetadatasize_ARG, '\0', "poolmetadatasize", size_mb_arg, 0)
arg(poolmetadataspare_ARG, '\0', "poolmetadataspare", yes_no_arg, 0)
diff --git a/tools/commands.h b/tools/commands.h
index eb0d248fe..d4473a4d0 100644
--- a/tools/commands.h
+++ b/tools/commands.h
@@ -280,6 +280,7 @@ xx(lvcreate,
"\t[-n|--name LogicalVolumeName]\n"
"\t[--noudevsync]\n"
"\t[-p|--permission {r|rw}]\n"
+ "\t[--pooldatasize DataSize[bBsSkKmMgGtTpPeE]]\n"
"\t[--poolmetadatasize MetadataSize[bBsSkKmMgG]]\n"
"\t[--poolmetadataspare {y|n}]]\n"
"\t[--[raid]minrecoveryrate Rate]\n"
@@ -319,6 +320,7 @@ xx(lvcreate,
"\t[-K|--ignoreactivationskip]\n"
"\t{-l|--extents LogicalExtentsNumber[%{VG|FREE|ORIGIN}] |\n"
"\t -L|--size LogicalVolumeSize[bBsSkKmMgGtTpPeE]}\n"
+ "\t[--pooldatasize DataVolumeSize[bBsSkKmMgGtTpPeE]]\n"
"\t[--poolmetadatasize MetadataVolumeSize[bBsSkKmMgG]]\n"
"\t[-M|--persistent {y|n}] [-j|--major major] [--minor minor]\n"
"\t[--metadataprofile ProfileName]\n"
@@ -339,8 +341,9 @@ xx(lvcreate,
extents_ARG, ignoreactivationskip_ARG, ignoremonitoring_ARG, major_ARG,
metadataprofile_ARG, minor_ARG, mirrorlog_ARG, mirrors_ARG, monitor_ARG,
minrecoveryrate_ARG, maxrecoveryrate_ARG, name_ARG, nosync_ARG,
- noudevsync_ARG, permission_ARG, persistent_ARG, poolmetadatasize_ARG,
- poolmetadataspare_ARG, raidminrecoveryrate_ARG, raidmaxrecoveryrate_ARG,
+ noudevsync_ARG, permission_ARG, persistent_ARG,
+ pooldatasize_ARG, poolmetadatasize_ARG, poolmetadataspare_ARG,
+ raidminrecoveryrate_ARG, raidmaxrecoveryrate_ARG,
readahead_ARG, regionsize_ARG, setactivationskip_ARG, size_ARG, snapshot_ARG,
stripes_ARG, stripesize_ARG, test_ARG, thin_ARG, thinpool_ARG, type_ARG,
virtualoriginsize_ARG, virtualsize_ARG, wipesignatures_ARG, zero_ARG)