volume modify

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> ]
    [ -dataauditops <+|- operations> ]
    [ -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> ]
    [ -readAce <Access Control Expression> ]
    [ -readonly <readonly> ]
    [ -replication <replication> ]
    [ -rereplicationtimeoutsec <timeout in seconds> ]
    [ -schedule <schedule ID> ]
    [ -source <source volume> ]
    [ -type rw|mirror ]
    [ -user <list of user:allowMask> ]
    [ -writeAce <Access Control Expression> ]
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
allowgrant Specifies 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.

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.

Note: 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 here. 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.

You can specify a mixed list of included and excluded operations. There will be no change to operations that are not specified with the command.

group

Space-separated list of group:permission pairs.

minreplication

The minimum replication level. Default: 0.
Tip: For more information, see Determining Replication Factor.
mirrorschedule The 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.
mirrorthrottle Specifies 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.
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. 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.
For more information, see Determining Replication Factor.
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.
For more information, see Determining Replication Factor.

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.

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.

Note: An ACE (up to 2KB in length) is a combination of users, groups, and/or roles for whom access (to volume data) is defined using boolean expressions and subexpressions within single quotes. When you pass in an access type that has already been set, the new value will replace the existing value for that access type. There will be no change to access types that are not passed in with the command, whether or not they were set.

readonly

Specifies whether the volume is read-only.

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

replication

The desired replication level. Default: 0.

Tip: For more information, see Determining Replication Factor.
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.

writeAce

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.

Note: An ACE (up to 2KB in length) is a combination of users, groups, and/or roles for whom access is defined using boolean expressions and subexpressions within single quotes. When you pass in an access type that has already been set, the new value will replace the existing value for that access type. There will be no change to access types that are not passed in with the command, whether or not they were set.

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 2 -nsreplication 4
REST
https://10.10.82.26:8443/rest/volume/create?name=testVol?nsminreplication=2?nsreplication=4

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

Set and modify ACEs on a volume

In the following example, the command will set and modify access (defined using ACEs) to the volume data. When the command runs, new values will:
  • Overwrite existing values for access types that were previously set.
  • Be set for access types that were not set.
Note: There will be no change to the readAce access type, which is not specified with the command, whether or not it was set before.
CLI
maprcli volume modify -name testVol -writeAce 'g:group1&!u:user1|!r:role1'

Modify the list of operations that are audited

In the following example, the create operation is included for auditing and the lookup operation is excluded from auditing. There are no changes to operations that are not specified.

CLI
maprcli volume modify -name parentVol -dataauditops +create,-lookup