volume create

Creates a volume.

Permissions Required

cv or fc on the cluster.

Note: See acl for more information.

Syntax

CLI
/opt/mapr/bin/maprcli volume create
-name <volume name>
[ -advisoryquota <advisory quota> ]
[ -ae <accounting entity> ]
[ -aetype <accounting entity type> ]
[ -allowgrant true|false ]
[ -allowinherit true|false ]
[ -auditenabled true|false ]
[ -autooffloadthresholdgb <offload size threshold> ]
[ -cluster <cluster> ]
[ -coalesce <interval in mins> ]
[ -compactionoverheadthreshold <compaction_overhead> ]
[ -compactionschedule <compaction_schedule_ID> ]
[ -containerallocationfactor <positive integer> ]
[ -createparent 0|1 ]
[ -criticalrereplicationtimeoutsec ]
[ -dare true|false ]
[ -dataauditops <+|- operations> ]
[ -dbindexlagsecalarmthresh ]
[ -dbrepllagsecalarmthresh ]
[ -ecenable true|false ]
[ -ecscheme <ec scheme> ]
[ -ectopology <path to ec volume> ]
                  
[ -enforceminreplicationforio true|false ]
[ -forceauditenable true|false ]
[ -group <list of group:allowMask> ]
[ -inherit <volume name> ]
[ -localvolumehost <localvolumehost> ]
[ -localvolumeport <localvolumeport> ]
[ -maxinodesalarmthreshold <maxinodesalarmthreshold> ]
[ -maxnssizembalarmthreshold <maxnssizembalarmthreshold> ]
[ -metricsenabled true|false ]
[ -minreplication <minimum replication factor> ]
[ -mirrorschedule <mirror schedule ID> ] (4.0.2 only)
[ -mirrorthrottle 0|1 ]
[ -mount 0|1 ]
[ -namecontainerdatathreshold <size> ]
[ -nsminreplication <minimum replication factor> ]
[ -nsreplication <replication factor> ]
[ -offloadschedule <schedule ID> ]
[ -path <mount path> ]
[ -quota <quota> ]
[ -readAce <access control expression> ]
[ -readonly <read-only status> ]
[ -recallexpirytime <expiry time> ]
[ -replication <replication factor> ]
[ -replicationtype <type> ]
[ -rereplicationtimeoutsec <seconds> ]
[ -rootdirgroup <root directory group> ]
[ -rootdirperms <root directory permissions> ]
[ -rootdiruser <root directory user> ]
[ -schedule <ID> ]

[ -skipinherit schedule|tiername ]
[ -source <source> ]
[ -tenantuser <tenant name> ]
[ -tierencryption true|false ]
[ -tieringenable true|false ]
[ -tieringrule <rulename> ]
[ -tierkey <tier encryption key> ]
[ -tiername <tiername> ]
[ -topology <topology> ]
[ -type rw|mirror ]
[ -user <list of user:allowMask> ]
[ -wiresecurityenabled true|false ]
[ -writeAce <access control expression> ]
REST
Request Type POST
Request URL
http[s]://<host>:<port>/rest/volume/create?<parameters>

Parameters

Parameter

Description

advisoryquota The advisory quota for the volume as integer plus unit. Example: quota=500G; Units: B, K, M, G, T, P
ae The accounting entity that owns the volume.
aetype The type of accounting entity:
  • 0=user
  • 1=group
allowgrant Specifies whether a parent volume grants permission for a child volume to inherit its properties. True or false.

Default: false.

allowinherit Specifies whether a new volume inherits properties from the parent mount point volume. True or false. Default: true.
auditenabled Specifies whether to turn on auditing for the volume. If auditing is also enabled at the cluster level with the maprcli audit data command, setting this value to true causes auditing to start for any directories, files, tables, or streams that are already enabled for auditing. If none are yet so enabled, auditing begins when you subsequently enabling auditing on any of them.

Set auditenabled to true to enable auditing on directories, files, tables, and streams in the volume. You must have the fc permission on the cluster to use this parameter. See acl for details about this permission.

autooffloadthresholdgb The size of the volume in GB (threshold). When this threshold is reached or exceeded, volume data is automatically offloaded by the Automatic Tiering Scheduler. To use the global size threshold (of 1024 GB), set the value for this parameter to 0.
cluster The cluster on which to create the volume.
coalesce The interval of time during which READ, WRITE, or GETATTR operations on one file from one client IP address and UID/GID are logged only once for a particular operation, if auditing is enabled.

For example, suppose that a client application reads a single file three times in 6 minutes, so that there is one read at 0 minutes, another at 3 minutes, and a final read at 6 minutes. If the coalesce interval is at least 6 minutes, then only the first read operation is logged. However, if the interval is between 4 minutes, then only the first and third read operations are logged. If the interval is 2 minutes, all three read operations are logged.

Now however, if the client was also writing to the file, irrespective of the coalesce interval for the read operation in the example stated previously, the write operation is logged, as it is a different operation from reading.

The default value is 60 minutes. Setting this field to a larger number helps prevent audit logs from growing quickly.

compactionoverheadthreshold Specifies the percentage of offloaded data that must be deleted from the MapR cluster to qualify for compaction (or deletion from the tier). The default value is 30%. Value must be less than 100.
compactionschedule Specifies the schedule to use for running the compactor. By default, the compactor runs on an automatic internal schedule.
containerallocationfactor Specifies the number of containers to create when the first write from a remote client is sent to the volume. The pre-created containers are distributed equally across topologies, servers, MapR Filesystem instances, and SPs. CLDB takes into consideration the load (IO/Space) when selecting target SPs for containers. Value must be a positive integer. The default value is 0. Value can be up to twice the number of SPs in the volume’s topology.

If this is not set, when a volume is created, 5 containers are created for that volume when IOs are sent to the volume.

createparent Specifies whether or not to create a parent directory to hold the volume link:
  • 0 = Do not create a parent directory.
  • 1 = Create a parent directory.
criticalrereplicationtimeoutsec Timeout (in seconds) before re-replicating only the critically under-replicated containers. If both rereplicationtimeoutsec and criticalrereplicationtimeoutsec are set, and if the value of:
  • rereplicationtimeoutsec is less than criticalrereplicationtimeoutsec, then rereplicationtimeoutsec overrides criticalrereplicationtimeoutsec setting for both under-replicated and critically under-replicated containers.
  • rereplicationtimeoutsec is greater than criticalrereplicationtimeoutsec, then criticalrereplicationtimeoutsec overrides rereplicationtimeoutsec setting only for critically under-replicated containers; rereplicationtimeoutsec setting is still applicable for under-replicated containers.
Default value for this parameter is 0 (which indicates no timeout). Value can be 0, or >= 300 seconds and <= 3600 seconds.
dare Specifies whether (true) or not (false) to enable data-at-rest encryption for volume. This setting takes effect only if the data-at-rest encryption feature is also enabled at the cluster level. Once enabled, this feature cannot be disabled.
dataauditops The comma separated list of filesystem operations to include (specified with a preceding plus sign (+)) or exclude (specified with a preceding minus sign (-)) from auditing.

If the first operation in the list (of operations) is to be excluded from auditing, it must be preceded by two minus (--) signs. Subsequent operations to exclude must be preceded by only a single minus (-) sign, whether or not the first operation was included (using a plus (+) sign) or excluded (using two minus (--) signs). If neither sign is specified, the given operation is included for auditing.

The operations that can be included (+) or excluded (-) from auditing are listed in Auditing Data Access Operations. You can, alternatively, group all the operations using the keyword all, which:
  • If included (+), cannot be specified with a list of other included operations.
  • If excluded (-), cannot be specified with a list of other excluded operations.
Other than the specified operations, by default, all other operations are:
  • Included for auditing if the specified list is a list of excluded operations.
  • Excluded from auditing if the specified list is a list of included operations.

All specified operations must either be included or excluded from auditing. You cannot specify a mixed list of included and excluded operations.

For more information, see Selective Auditing of Filesystem and Table Operations.

dbindexlagsecalarmthresh Specifies the threshold (in seconds) to raise an alarm for index update lag. Default: 0
dbrepllagsecalarmthresh Specifies the threshold (in seconds) to raise an alarm for DB replication lag. Default: 0
ecenable Enable (true) or disable (false) warm tiering for the volume. Either this parameter or tieringenable is required to enable warm tiering. If you specify this parameter, you cannot specify tiername; when the command runs, a new tier is created for the volume. If you do not specify any rule, the default rule, which is all files (p), is associated with the volume.
ecscheme The number of data chunks and the number of global parity chunks separated by a plus sign (+). The default scheme is 4+2. For information on the supported schemes, see Erasure Coding Scheme for Data Protection and Recovery.
ectopology The topology of the erasure coded volume.
enforceminreplicationforio Specifies whether (true) or not (false) to enforce minimum number of replicas for the (read-write) volume during IO. This parameter ensures that further updates (writes) to the volume are successful only when the minimum number of copies of the container are available. Setting this to true ensures that if writes succeed, then it has been applied to at least the minimum number of copies; if writes fail, it may have been applied to zero or more copies.

Enabling this parameter, may stall volume dump and volume snapshot create operations, if the minimum number of copies of the container are not available.

The default value is false.

This parameter is ignored on Mirror Volumes. If there are more than five cluster nodes, this flag is set to true, by default, on the tier volume. If the number of cluster nodes is less than five, this flag is set to false, by default, on the tier volume.

forceauditenable Specifies whether (true) or not (false) to force audit of operations on all files, tables, and streams in the volume, if auditing is enabled at the cluster and volume levels, irrespective of the audit setting on the individual directory, file, table, or stream. The value can be either:
  • true — force audit of all content
  • false — do not force audit
By default, this parameter is disabled (false). To force audit of all directories, files, tables, and streams in the volume irrespective of the audit setting on the individual directory, file, table, or stream, you must set the auditenabled parameter to true.
group Space-separated list of group:permission pairs. Use commas to separate permissions. For example: group:permission,permission,...
inherit Specifies the name of the volume from which the new volume inherits properties. When inherit is explicitly specified, allowgrant is not required. See the following section on Inheritance for more information.
localvolumehost The local volume host.
localvolumeport The local volume port. Default: 5660
maxinodesalarmthreshold The number of inodes, which when exceeded raises the INODES_EXCEEDED alarm.
maxnssizembalarmthreshold The namespace container size, which when exceeded raises the INODES_EXCEEDED alarm.
metricsenabled Specifies whether (true) or not (false) to enable metrics collection for a volume.
minreplication The minimum replication level. Default: 2 When the replication factor falls below this minimum, re-replication occurs as aggressively as possible to restore the replication level. If any containers in the CLDB volume fall below the minimum replication factor, writes are disabled until aggressive re-replication restores the minimum level of replication.
Tip: For more information, see Understanding Replication.
mirrorschedule The ID of a mirror schedule. If you specify a mirror schedule ID, then the mirror volume automatically syncs with its source volume on the specified schedule.
mirrorthrottle Specifies whether throttling should be enabled at creation time.
mount Specifies whether the volume is mounted at creation time.
name The name for the volume. A volume name can contain alphanumeric characters and the following characters: . (dot), _ (underscore), and - (dash). For tiering-enabled volumes, the volume name cannot exceed ninety-eight characters.
namecontainerdatathreshold Limits the size of the data stored in the name container. By default, the name container contains the first 64KB of each file along with metadata (attributes, and block information) about each file. The name container can grow very large with many files. For example, suppose there are 10 million files; 64KB of each file would result in a name container of 640GB. Enabling the name container size control feature reduces the size of the name container. Once the name container reaches the specified size, the first 64KB of each file is no longer placed in the name container; instead, once the limit is reached, all data is placed in data containers and only the metadata is stored in the name container. The value must be in MB. The default name container threshold is 512GB.

If you set this parameter to 0, there is no limit on the size of the data stored in the name container.

If chunk size is 0, by default, all data is stored in the name container. However, if this property is set, all data is stored in a second container and only the metadata is stored in the name container once the threshold is reached. The size of the second container is not limited by this setting; you must ensure that the size does not grow too large, by limiting the amount of data in the volume.

nsminreplication The minimum replication level for the namespace container. Default: 2. When the replication factor falls below this minimum, re-replication occurs as aggressively as possible to restore the replication level. If any containers in the CLDB volume fall below the minimum replication factor, writes are disabled until aggressive re-replication restores the minimum level of replication. When enabled, the CLDB manages the namespace container replication separate from the data container replication. Use this capability when you have low volume replication but want to have higher namespace replication.

This parameter must be the same or larger than the equivalent data replication parameter, minreplication.

For more information, see Understanding Replication.
nsreplication The desired namespace container replication level. Default: 3. When the number of copies falls below the desired replication factor, but remains equal to or above the minimum replication factor, re-replication occurs after the timeout specified in the cldb.fs.mark.rereplicate.sec parameter. This timeout is the time given for a node that is offline to come back online. After this timeout period, the CLDB takes action to restore the replication factor. When enabled, the CLDB manages the namespace container replication separate from the data container replication. Use this capability when you have low volume replication but want to have higher namespace replication.

By default, the value of this parameter is the same or larger than the value of the equivalent data replication parameter, replication. However, to set the value of this parameter lower than the replication value, first set engg.manual.override to true in cldb.conf.

For more information, see Understanding Replication.
offloadschedule The ID of the schedule to associate with the volume for offloading volume data to the tier. To disable schedule-based offload, set the value to 0.
path The path at which to mount the volume. The path must be relative to / and cannot be in the form of a global namespace path (for example, /mapr/<cluster-name>/).
quota The quota for the volume as integer plus unit. Example: quota=500G; Units: B, K, M, G, T, P

Do not use two-letter abbreviations for quota units, such as GB and MB.

When you set a quota for a tiering-enabled volume, the quota is the total space allocated for the volume irrespective of the location (cluster or tier) where the volume data is stored. For example, if you allocate 1GB of hard quota for a tiering-enabled volume, writes fail after you write 1GB of data whether or not the volume data is local (on the cluster) or offloaded (to the tier)

readAce Specifies Access Control Expressions (ACEs) that grants permissions at the volume level to read files and tables in the volume. The default value is p, which grants access to all users.

See Access Control Expression (ACE).

readonly Specifies whether or not the volume is read-only:
  • 0 = Volume is read/write.
  • 1 = Volume is read-only.
recallexpirytime The amount of time to keep the recalled data before offloading it again. Value must be greater than 1 and lesser than 7500. The default value is 1 day.
replication The desired replication level. Default: 3. When the number of copies falls below the desired replication factor, but remains equal to or above the minimum replication factor, re-replication occurs after the timeout specified in the cldb.fs.mark.rereplicate.sec parameter. Note that this timeout is the time given for a node that is offline to come back online. After this timeout period, the CLDB takes action to restore the replication factor.
Tip: For more information, see Understanding Replication.
replicationtype The desired replication type. You can specify low_latency (star replication) or high_throughput (chain replication). The default setting is high_throughput.
rereplicationtimeoutsec Timeout (in seconds) before attempting re-replication of replica containers. This volume property defines the timeout period until CLDB starts re-replicating the containers on the node of the volume when CLDB stops receiving a heartbeat from the node.

When a node is down, CLDB gives the node an hour to come back online before it takes any action for the containers on this node. This parameter can be set on volumes to reduce the default 1 hour to a shorter time period. This option is provided mainly for local volumes, so that when a MapR Filesystem is down, CLDB can give up quickly and decide that the container has no master. This forces the NodeManager (NM) to give up on local containers and take the appropriate recovery action of deleting the mapred volume and creating another one.

rootdirgroup Group that owns the root directory.
rootdirperms Permissions on the volume root directory.
rootdiruser User that owns the root directory.
schedule The ID of a schedule. Use the schedule list command to find the ID of the named schedule that you want to apply to the volume.

In 4.0.1, when you provide a schedule ID, the ID applies to a mirror volume. The mirror volume automatically syncs with its source volume on the specified schedule. Use the schedule list command to find the ID of the named schedule that you wish to apply to the volume.

In 4.0.2 and later releases, when you provide a schedule ID, the ID applies to either a mirror volume or a standard volume. A standard volume automatically creates snapshots on the specified schedule. A mirror volume syncs with its source volume on the specified schedule. If a mirror volume is made into a standard volume, the -schedule option is used as the snapshot schedule for the standard volume.

skipinherit Specifies not to inherit given properties associated with the:
  • Parent volume (for other volumes)
  • Source volume (for mirror volumes)
Value must be the following keyword:
  • schedule to not inherit snapshot schedule settings
  • tiername to not:
    • Inherit tiering properties like tierid, tieroffloadscheduleid, ecshceme, ectopology
    • Set default values for compactionscheduleid and compactionoverheadthreshold
Use comma to separate multiple values.
source For mirror volumes, the source volume to mirror, in the format <source volume>@<cluster> (Required when creating a mirror volume).
tenantuser The username of the tenant for whom the volume is being created.
tierencryption Specifies whether (true) or not (false) data on the object store should be encrypted. If true, user data is encrypted before being written to the object. This parameter is applicable only for a cold tier, and can be set only if a tier name is also specified. Once set, you cannot modify this parameter.

If true, you can also specify a custom key using the tierkey parameter. The default value is false.

Tip: For creating a warm-tier volume, use the -dare option on the front-end volume to enable or disable encryption of data-at-rest.
tieringenable Enable (true) or disable (false) tiering for the volume. When you specify this parameter, you must also specify the tiername. For creating a tiering-enabled mirror volume, specify this parameter if the source volume is enabled for cold-tier; specify either this parameter or ecenable, if the source volume is enabled for warm-tier.
tieringrule The name of the rule (referred to as storage policy in MCS) to use for offloading data to the tier. If you do not specify a rule, the default rule, which is all files (p), is associated with the volume. See Creating a Rule in Creating a Storage Policy for more information.
tierkey The 32 character HEX string to use for encryption, only for cold-tier operations. If you do not specify this parameter, CLDB generates a 32 character HEX string to use for encrypting data to offload to the tier.
tiername The name of the tier to use for offloading data. This can be set only once and cannot be modified thereafter. For warm tiering, you cannot specify this parameter if ecenable is set to true.
topology The rack path to the volume.
To create a volume in a specific topology, you must have the Converged Enterprise Edition installed on your system. Without the Converged Enterprise Edition, when you run the maprcli volume create command with the -topology option, the following error message is returned:
ERROR (10010) -  Volume Creation Failed: Setting topology on 
a volume requires data placement feature. License not found for data placement.
type The type of volume to create.

The following values are accepted:

  • mirror - standard mirror (read-only) volume (promotable to standard read-write volume)
  • rw - standard (read-write) volume (convertible to standard mirror volume)
  • 0 - standard (read-write) volume (for backward compatibility)
  • 1 - non-convertible mirror (read-only) volume (for backward compatibility)
user Space-separated list of user:permission pairs. Use comma to separate permissions. For example: user:permission,permission,...
wiresecurityenabled Enables (true) or disables (false) on-wire encryption for all files, tables, and streams in the volume on secure clusters. This parameter is not supported on insecure clusters. By default, this parameter is enabled (true) for volumes on secure clusters. If true, this setting overrides all file, table, and stream level encryption settings (set using hadoop mfs command) and enables on-wire encryption for all files, tables, and streams. If this is disabled (false) at the volume level and is enabled at the file, table, and/or stream level, the file, table, and/or stream level encryption setting overrides this setting on those files, tables, and streams where it is enabled; for all other files, tables, and streams where encryption is not enabled at the file, table, and/or stream level, on-wire encryption is disabled.
writeaAce Specifies Access Control Expressions (ACEs) that grants permission at the volume level to write to files and tables in the volume. The default value is p, which grants access to all users.

See ACE.

Inheritance

The following table shows the list of inheritable parameters that are (Yes) and are not (No) inherited by a:

  • Mirror volume from the source volume on the same cluster
  • Mirror volume from the source volume on a different cluster
Note: All (non-mirror) volumes inherit all the inheritable properties from the parent volume. For more information on the properties, refer to volume create parameters.
Inheritable Properties (which are inherited by non-mirror volumes by default) Inherited by Mirror Volume on the same cluster as the source volume? Inherited by Mirror Volume on a different cluster from the source volume?
advisoryquota Yes Yes
ae Yes No
aetype Yes No
allowgrant Yes Yes
allowinherit Yes Yes
auditenabled Yes Yes
coalesce Yes Yes
dare Yes Yes1, No2
dataauditops Yes Yes
dbindexlagsecalarmthresh Yes Yes
dbrepllagsecalarmthresh Yes Yes
ecscheme Yes No
ectopology Yes No
group Yes Yes
inherit Yes Yes
localvolumehost No No
localvolumeport No No
maxinodesalarmthreshold Yes Yes
minreplication Yes Yes
mirrorschedule Yes No
mirrorthrottle Yes Yes
nsminreplication Yes Yes
nsreplication Yes Yes
ofloadschedule Yes No
quota Yes Yes
readonly Yes Yes
recallexpirytime Yes No
replication Yes Yes
replicationtype Yes Yes
rereplicationtimeoutsec Yes Yes
rootdirperms Yes Yes
schedule Yes3 No
source Yes Yes
tierencryption Yes No
tieringenable Yes No
tieringrule Yes No
tierkey Yes No
tiername4 Yes No
topology Yes No
type Yes Yes
user Yes Yes
wiresecurityenabled Yes Yes
  • 1 If destination cluster is also enabled for data-at-rest encryption, dare setting is inherited by the mirror volume on the destination cluster.
  • 2 If destination cluster is not enabled for data-at-rest encryption, dare setting is not inherited by the mirror volume on the destination cluster.
  • 3 If schedule keyword is specified with the skipinherit parameter, schedule(s) are not inherited while inheriting volume properties from the source volume.
  • 4 If tiername keyword is specified with the skipinherit parameter:
    • The tiering properties are not inherited by the mirror volume while inheriting volume properties from the tiering-enabled source volume.
    • For volumes enabled for warm-tier, the backend erasure-coded volume is not created.

Examples

Create the volume "test-volume" mounted at "/test/test-volume"

# /opt/mapr/bin/maprcli volume create -name test-volume -path /test/test-volume -type rw -json
{
	"timestamp":1526522204072,
	"timeofday":"2018-05-16 06:56:44.072 GMT-0700 PM",
	"status":"OK",
	"total":0,
	"data":[
		
	],
	"messages":[
		"Successfully created volume: 'test-volume'"
	]
}
# curl -k -X POST 'https://abc.sj.us:8443/rest/volume/create?name=test-volume&path=/test/test-volume&type=rw' --user mapr:mapr
{"timestamp":1526522305703,"timeofday":"2018-05-16 06:58:25.703 GMT-0700 PM","status":"OK","total":0,"data":[],"messages":["Successfully created volume: 'test-volume'"]}

Create Volume with a Quota and an Advisory Quota

This example creates a volume with the following parameters:

  • advisoryquota: 100M
  • name: volumename
  • path: /volumepath
  • quota: 500M
  • replication: 3
  • schedule: 2
  • topology: /East Coast
  • type: rw
/opt/mapr/bin/maprcli volume create -name volumename -path /volumepath -advisoryquota 100M -quota 500M -replication 3 -schedule 2 -topology "/East Coast" -type rw -json
{
	"timestamp":1526522474660,
	"timeofday":"2018-05-16 07:01:14.660 GMT-0700 PM",
	"status":"OK",
	"total":0,
	"data":[
		
	],
	"messages":[
		"Successfully created volume: 'volumename'"
	]
}
# curl -k -X POST 'https://abc.sj.us:8443/rest/volume/create?name=volumename&path=/volumepath&advisoryquota=100M&quota=500M&replication=3&schedule=2&type=rw' --user mapr:mapr
{"timestamp":1526522622494,"timeofday":"2018-05-16 07:03:42.494 GMT-0700 PM","status":"OK","total":0,"data":[],"messages":["Successfully created volume: 'volumename'"]}

Create the mirror volume "test-volume.mirror" from source volume "test-volume" and mount at "/test/test-volume-mirror"

/opt/mapr/bin/maprcli volume create -name test-volume.mirror -source test-volume@ksTest -path /test/test-volume-mirror -type mirror -json
{
	"timestamp":1526524458615,
	"timeofday":"2018-05-16 07:34:18.615 GMT-0700 PM",
	"status":"OK",
	"total":0,
	"data":[
		
	],
	"messages":[
		"Successfully created volume: 'test-volume.mirror'"
	]
}
# curl -k -X POST 'https://abc.sj.us:8443/rest/volume/create?name=test-volume.mirror&path=/test/test-volume-mirror&type=mirror&source=test-volume@ksTest' --user mapr:mapr
{"timestamp":1526524637534,"timeofday":"2018-05-16 07:37:17.534 GMT-0700 PM","status":"OK","total":0,"data":[],"messages":["Successfully created volume: 'test-volume.mirror'"]}

Create volumes that inherit from a parent volume

When creating and mounting a volume, the location of the mount path is specified by the path parameter. Volumes can be mounted via the web console, the maprcli commands, or the REST commands. The maprcli commands include volume create -path command and the maprcli volume mount -path command if the volume was previously created. Sub-volumes (children) can inherit properties from their parent volume.

In the following example, a parent volume and two (2) child volumes are create where the child volume inherit properties from the parent. When the inherit flag is explicitly used, the allowgrant parameter for the parent volume is not required.

  • For child volumes, c1 and c2, inheritance is explicit because the inherit option is specified. Thus, p1.c1 and p1.c2 volumes will inherit all properties from volume p1 (note that p1 is not a parent of p1.c1) regardless of whether the allowgrant option is set on p1 or not. In this case, there is an explicit inheritance ant the allowgrant flag is ignored and volume properties are inherited.
  • For the child volume, c3, inheritance is implicit. Meaning, the child volume, p1.c3, inherits all properties from the parent volume, p1, only if the allowgrant option is set on p1.
/opt/mapr/bin/maprcli volume create -name p1 -path /p1
/opt/mapr/bin/maprcli volume create -name p1.c1 -inherit p1
/opt/mapr/bin/maprcli volume create -name p1.c2 -path /p1/c2 -inherit p1
/opt/mapr/bin/maprcli volume create -name p1.c3 -path /p1/c3
curl -k -X POST 'https://abc.sj.us:8443/rest/volume/create?name=p1&path=%2Fp1' --user mapr:mapr
curl -k -X POST 'https://abc.sj.us:8443/rest/volume/create?name=p1.c1&inherit=p1' --user mapr:mapr
curl -k -X POST 'https://abc.sj.us:8443/rest/volume/create?name=p1.c2&path=%2Fp1%2Fc2&inherit=p1' --user mapr:mapr
curl -k -X POST 'https://abc.sj.us:8443/rest/volume/create?name=p1.c3&path=%2Fp1%2Fc3' --user mapr:mapr

In the following example, the p1.child volume normally inherits from the p1 parent volume properties because p1.child is mounted under p1 and allowgrant option is set to true on the parent volume. However, if the child volume doesn't want to inherit properties, then set the allowinherit option to false (default: true).

/opt/mapr/bin/maprcli volume create -name p1 -path /p1 -allowgrant true
/opt/mapr/bin/maprcli volume create -name p1.child -path /p1/p1.child -allowinherit false
curl -k -X POST 'https://abc.sj.us:8443/rest/volume/create?name=p1&path=%2Fp1&allowgrant=true' --user mapr:mapr
curl -k -X POST 'https://abc.sj.us:8443/rest/volume/create?name=p1.child&path=%2Fp1%2Fp1.child&allowinherit=false' --user mapr:mapr

Create a volume with namespace container replicas

# /opt/mapr/bin/maprcli volume create -name testVol -nsminreplication 2 -nsreplication 3 -json
{
	"timestamp":1526525132522,
	"timeofday":"2018-05-16 07:45:32.522 GMT-0700 PM",
	"status":"OK",
	"total":0,
	"data":[
		
	],
	"messages":[
		"Successfully created volume: 'testVol'"
	]
}
# curl -k -X POST 'https://abc.sj.us:8443/rest/volume/create?name=testVol&path=/testVol&nsminreplication=2&nsreplication=3' --user mapr:mapr
{"timestamp":1526525257461,"timeofday":"2018-05-16 07:47:37.461 GMT-0700 PM","status":"OK","total":0,"data":[],"messages":["Successfully created volume: 'testVol'"]}

Create a volume and set ACEs

# /opt/mapr/bin/maprcli volume create -name testVol -readAce p -writeAce 'g:group1&!u:user1' -json
{
	"timestamp":1526525429326,
	"timeofday":"2018-05-16 07:50:29.326 GMT-0700 PM",
	"status":"OK",
	"total":0,
	"data":[
		
	],
	"messages":[
		"Successfully created volume: 'testVol'"
	]
}
# curl -k -X POST 'https://abc.sj.us:8443/rest/volume/create?name=testVol&readAce=p&writeAce=g%3Agroup1%26%21u%3Auser1' --user mapr:mapr
{"timestamp":1526525572035,"timeofday":"2018-05-16 07:52:52.035 GMT-0700 PM","status":"OK","total":0,"data":[],"messages":["Successfully created volume: 'testVol'"]}

Create a volume with auditing disabled for specific operations

# /opt/mapr/bin/maprcli volume create -name test-volume -auditenabled true -dataauditops --lookup,-read,-write -json
{
	"timestamp":1526525720308,
	"timeofday":"2018-05-16 07:55:20.308 GMT-0700 PM",
	"status":"OK",
	"total":0,
	"data":[
		
	],
	"messages":[
		"Successfully created volume: 'test-volume'"
	]
}
# curl -k -X POST 'https://abc.sj.us:8443/rest/volume/create?name=test-volume&path=/test/test-volume&auditenabled=true&dataauditops=%2D%2Dlookup%2C%2Dread%2C%2Dwrite' --user mapr:mapr
{"timestamp":1526525795017,"timeofday":"2018-05-16 07:56:35.017 GMT-0700 PM","status":"OK","total":0,"data":[],"messages":["Successfully created volume: 'test-volume'"]}

Create a volume and grant user permissions on the volume:

# /opt/mapr/bin/maprcli volume create -name testVol1 -path /testVol1 -user user1:dump user2:fc -json
{
    "timestamp":1521162402826,
    "timeofday":"2018-03-15 06:06:42.826 GMT-0700 PM",
    "status":"OK",
    "total":0,
    "data":[
    ],
    "messages":[
        "Successfully created volume: 'testVol1'"
    ]
}
# curl -k -X POST 'https://10.10.82.24:8443/rest/volume/create?name=testVol&path=/testVol&user=user1%3Adump%20user2%3Afc' --user mapr:mapr
{"timestamp":1526526072608,"timeofday":"2018-05-16 08:01:12.608 GMT-0700 PM","status":"OK","total":0,"data":[],"messages":["Successfully created volume: 'testVol'"]}
# /opt/mapr/bin/maprcli volume create -name testVol -path /testVol2 -user user1:dump,restore user2:a,fc -json
{
    "timestamp":1521162467485,
    "timeofday":"2018-03-15 06:07:47.485 GMT-0700 PM",
    "status":"OK",
    "total":0,
    "data":[
    ],
    "messages":[
        "Successfully created volume: 'testVol2'"
    ]
}
# curl -k -X POST 'https://abc.sj.us:8443/rest/volume/create?name=testVol2&path=/testVol2&user=user1%3Adump%2Crestore%20user2%3Aa%2Cfc' --user mapr:mapr
{"timestamp":1526526256845,"timeofday":"2018-05-16 08:04:16.845 GMT-0700 PM","status":"OK","total":0,"data":[],"messages":["Successfully created volume: 'testVol2'"]}

Create a volume for a tenant

This example creates a volume for a tenant with the following parameters:
  • name: volumename
  • path: /volumepath
  • advisoryquota: 500MB
  • quota: 1GB
  • replication: 3
# /opt/mapr/bin/maprcli volume create -name tenantVol -cluster ksTest -path /egTenant -tenantuser egTenant -advisoryquota 500M -quota 1G -replication 3 -json
{
	"timestamp":1526526462865,
	"timeofday":"2018-05-16 08:07:42.865 GMT-0700 PM",
	"status":"OK",
	"total":0,
	"data":[
		
	],
	"messages":[
		"Successfully created volume: 'tenantVol'"
	]
} 
# curl -k -X POST 'https://abc.sj.us:8443/rest/volume/create?name=tenantVol&cluster=ksTest&path=/egTenant&advisoryquota=500M&quota=1G&replication=3' --user mapr:mapr
{"timestamp":1526526615167,"timeofday":"2018-05-16 08:10:15.167 GMT-0700 PM","status":"OK","total":0,"data":[],"messages":["Successfully created volume: 'tenantVol'"]}

Create a volume with on-wire encryption enabled for all files and tables in the volume:

# /opt/mapr/bin/maprcli volume create -name test-Volume -path /testvolume -type rw -wiresecurityenabled true -json
{
	"timestamp":1526526686905,
	"timeofday":"2018-05-16 08:11:26.905 GMT-0700 PM",
	"status":"OK",
	"total":0,
	"data":[
		
	],
	"messages":[
		"Successfully created volume: 'test-Volume'"
	]
}
# curl -k -X POST 'https://abc.sj.us:8443/rest/volume/create?name=test-volume&path=/testVolume&type=rw&wiresecurityenabled=true' --user mapr:mapr
{"timestamp":1526526748723,"timeofday":"2018-05-16 08:12:28.723 GMT-0700 PM","status":"OK","total":0,"data":[],"messages":["Successfully created volume: 'test-volume'"]}

Create a sub-volume and do not inherit schedules from the parent volume:

# /opt/mapr/bin/maprcli volume create -name p1.c2 -path /p1/p1.c2 -skipinherit schedule -json
{
        "timestamp":1505196021575,
        "timeofday":"2017-09-11 11:00:21.575 GMT-0700",
        "status":"OK",
        "total":0,
        "data":[

        ],
        "messages":[
                "Successfully created volume: 'p1.c2'"
        ]
}
# curl -k -X POST 'https://abc.sj.us:8443/rest/volume/create?name=p1.c2&path=/p1/p1.c2&skipinherit=schedule' --user mapr:mapr
{"timestamp":1526526980643,"timeofday":"2018-05-16 08:16:20.643 GMT-0700 PM","status":"OK","total":0,"data":[],"messages":["Successfully created volume: 'p1.c2'"]}

Create a mirror volume and do not inherit the schedule(s) from the source volume:

# /opt/mapr/bin/maprcli volume create -name p1.m2 -path /p1/p1.m2 -type mirror -source p1@ksTest -skipinherit schedule -json
{
        "timestamp":1505196450141,
        "timeofday":"2017-09-11 11:07:30.141 GMT-0700",
        "status":"OK",
        "total":0,
        "data":[

        ],
        "messages":[
                "Successfully created volume: 'p1.m2'"
        ]
}
# curl -k -X POST 'https://abc.sj.us:8443/rest/volume/create?name=p1.m2&path=/p1/p1.m2&type=mirror&source=p1@ksTest&skipinherit=schedule' --user mapr:mapr
{"timestamp":1526527151925,"timeofday":"2018-05-16 08:19:11.925 GMT-0700 PM","status":"OK","total":0,"data":[],"messages":["Successfully created volume: 'p1.m2'"]}

Create a volume and enable tiering, but do not specify the tier type and do not associate an offload rule or schedule:

# /opt/mapr/bin/maprcli volume create -name sampleVol -path /sampleVol -tieringenable true -json
{
	"timestamp":1519922099117,
	"timeofday":"2018-03-01 08:34:59.117 GMT-0800 AM",
	"status":"OK",
	"total":0,
	"data":[
		
	],
	"messages":[
		"Successfully created volume: 'sampleVol'"
	]
}
# curl -k -X POST 'https://10.10.82.24:8443/rest/volume/create?name=sampleVol&path=/sampleVol&tieringenable=true' --user mapr:mapr
{"timestamp":1519922181381,"timeofday":"2018-03-01 08:36:21.381 GMT-0800 AM","status":"OK","total":0,"data":[],"messages":["Successfully created volume: 'sampleVol'"]}

Create a volume, enable cold tiering, associate a rule and schedule for offloading data, and set the number of days to keep recalled data:

# /opt/mapr/bin/maprcli volume create -name sampleVol -path /sampleVol -tieringenable true -tiername ksTestCold -tieringrule rule1 -offloadschedule 2 -recallexpirytime 2 -json
{
	"timestamp":1519922642632,
	"timeofday":"2018-03-01 08:44:02.632 GMT-0800 AM",
	"status":"OK",
	"total":0,
	"data":[
		
	],
	"messages":[
		"Successfully created volume: 'sampleVol'"
	]
}
# curl -k -X POST 'https://10.10.82.24:8443/rest/volume/create?name=sampleVol&path=/sampleVol&tieringenable=true&tiername=ksTestCold&tieringrule=rule1&offloadschedule=2&recallexpirytime=2' --user mapr:mapr
{"timestamp":1519922784818,"timeofday":"2018-03-01 08:46:24.818 GMT-0800 AM","status":"OK","total":0,"data":[],"messages":["Successfully created volume: 'sampleVol'"]}

Create a volume, enable warm tiering, associate a rule and schedule for offloading data, and set the number of days to keep recalled data:

# /opt/mapr/bin/maprcli volume create -name sampleVol -path /sampleVol -tieringenable true -tiername ksTestEC -tieringrule testRule -ecscheme 6+3 -ectopology /ecdata -offloadschedule 2 -recallexpirytime 2 -json
{
    "timestamp":1516336193635,
    "timeofday":"2018-01-19 04:29:53.635 GMT+0000",
    "status":"OK",
    "total":0,
    "data":[
        
    ],
    "messages":[
        "Successfully created volume: 'sampleVol'"
    ]
}
# curl -k -X POST 'https://abc.sj.us:8443/rest/volume/create?name=sampleVol&path=/sampleVol&tieringenable=true&tiername=testWarm&tieringrule=testRule&ecscheme=6%2B3&ectopology=/ecdata&offloadschedule=2&recallexpirytime=2' --user mapr:mapr
{"timestamp":1526521538688,"timeofday":"2018-05-16 06:45:38.688 GMT-0700 PM","status":"OK","total":0,"data":[],"messages":["Successfully created volume: 'sampleVol'"]}
Create a volume and enable it for warm tiering, but do not specify tier name:
# /opt/mapr/bin/maprcli volume create -name sampleVol3 -path /sampleVol3 -ecenable true -json
{
	"timestamp":1527690187540,
	"timeofday":"2018-05-30 07:23:07.540 GMT-0700 AM",
	"status":"OK",
	"total":0,
	"data":[
		
	],
	"messages":[
		"Successfully created volume: 'sampleVol3'"
	]
}
# curl -k -X POST 'https://abc.sj.us:8443/rest/volume/create?name=sampleVol3&path=/sampleVol3&ecenable=true'  --user mapr:mapr
{"timestamp":1527690187540,"timeofday":"2018-05-30 07:23:07.540 GMT-0700 AM","status":"OK","total":0,"data":[],"messages":["Successfully created volume: 'sampleVol3'"]}