This is documentation for MapR Version 5.0. You can also refer to MapR documentation for the latest release.

Skip to end of metadata
Go to start of metadata

Modifies an existing volume. Permissions required: m or fc on the volume.

An error occurs if the name or path refers to a non-existent volume, or cannot be resolved.

Syntax

CLI

maprcli volume modify
    [ -cluster <cluster name> ]
    -name <volume name>
    [ -advisoryquota <advisory quota> ]
    [ -ae <accounting entity> ]
    [ -aetype <aetype> ]
    [ -allowgrant true|false ]
    [ -auditenabled true|false ]
    [ -coalesce interval in mins ]
    [ -group <list of group:allowMask> ]
    [ -maxinodesalarmthreshold <threshold> ]
    [ -minreplication <minimum replication> ]
    [ -mirrorschedule mirror schedule ID ]
    [ -mirrorthrottle true|false ]
    [ -nsminreplication <minimum replication factor> ]
    [ -nsreplication <replication factor> ]
    [ -quota <quota> ]
    [ -readonly <readonly> ]
    [ -replication <replication> ]
    [ -rereplicationtimeoutsec <timeout in seconds> ]
    [ -schedule <schedule ID> ]
    [ -source <source volume> ]
    [ -type rw|mirror ]
    [ -user <list of user:allowMask> ]

REST

  http[s]://<host>:<port>/rest/volume/modify?<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
allowgrantSpecifies whether the volume as a parent grants permission for a child volume to inherit its properties. True or false. Default: false.
auditenabled

Specifies whether to turn auditing on 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, or tables that are already enabled for auditing. If none are yet so enabled, enabling auditing on any of them causes auditing of them to start.

You must have the fc permission on the cluster to use this parameter. See acl  for details about this permission.

cluster

The cluster on which to run the command.

coalesce

The interval of time during which READ, WRITE, or GETATTR operations on one file from one client IP address are logged only once, 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.

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

group

Space-separated list of group:permission pairs.

minreplication

The minimum replication level. Default: 0

mirrorscheduleThe schedule ID corresponding to the schedule to be used for mirroring. Pre-assigned IDs include 1 for critical data, 2 for important data, and 3 for normal data. Custom schedules are assigned ID numbers in sequence. To determine the ID number, use the schedule list command.
mirrorthrottleSpecifies whether mirror throttling is enabled (true) or disabled (false). The default is true. Throttling is set on the source volume and applies to all its mirrors.
nsminreplicationThe 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. This capability is used when you have low volume replication but want to have higher namespace replication. Note: This parameter must be the same or larger than the equivalent data replication parameter, minreplication.
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 down node 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. This capability is used when you have low volume replication but want to have higher namespace replication. Note: This parameter must be the same or larger than the equivalent data replication parameter, replication.

name

 The name of the volume to modify.

quota

The quota for the volume as integer plus unit. Example: quota=500G; Units: B, K, M, G, T, P

Note that quotas for source and mirror volumes must match.

readonly

Specifies whether the volume is read-only. 

  • 0 = read/write
  • 1 = read-only

replication

The desired replication level. Default: 0

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, repl=1 so that when an mfs is down, CLDB can give up quickly and decide that the container has no master. This forces the TT to give up on local containers and take appropriate recovery action of deleting the mapred volume and creating another one.

schedule

A schedule ID. If a schedule ID is provided, then the volume will automatically create snapshots (normal volume) or sync with its source volume (mirror volume) on the specified schedule.

source

(Mirror volumes only) The source volume from which a mirror volume receives updates, specified in the format <volume>@<cluster>.

user

Space-separated list of user:permission pairs.

threshold

Threshold for the INODES_EXCEEDED alarm.

type

If type = mirror, the volume is converted from a rw volume to a mirror volume.

If type = rw, the volume is converted from a mirror volume to a rw volume.

Examples

 

Change the source volume of the mirror "test-mirror":

CLI

maprcli volume modify -name test-mirror -source volume-2@my-cluster

REST

https://r1n1.sj.us:8443/rest/volume/modify?name=test-mirror&source=volume-2@my-cluster

Create a volume with namespace container replicas

CLI
maprcli volume modify -name testVol -nsminreplication 3 -nsreplication 2
REST
https://10.10.82.26:8443/rest/volume/create?name=testVol?nsminreplication=3?nsreplication=2

Modify a volume to allow inheritance by a child volume

Sub-volumes (children) can inherit properties from their parent volume. The maprcli volume create and volume modify commands provide parameters for setting the inheritance feature. In order for child volume to inherit from a parent volume, the parent volume must grant permission and the child volume must be created specifying the volume name of the parent. In the following example, the parent volume, parentVol, grants of inheritance to child volumes.

 

CLI
maprcli volume modify -name parentVol -allowgrant true
REST
https://10.10.82.26:8443/rest/volume/modify?name=parentVol?allowgrant=true

 

  • No labels