This is documentation for MapR version 4.0.x. You can also refer to MapR documentation for the latest or previous releases.

Skip to end of metadata
Go to start of metadata

MapR provides volumes as a way to organize data and manage cluster performance. A volume is a logical unit that allows you to apply policies to a set of files, directories, and sub-volumes. A well-structured volume hierarchy is an essential aspect of your cluster's performance. As your cluster grows, keeping your volume hierarchy efficient maximizes your data's availability. Without a volume structure in place, your cluster's performance will be negatively affected.

See the following sections for more information:

When Should I Use Volumes?

You can use volumes to enforce disk usage limits, set replication levels, establish ownership and accountability, and measure the cost generated by different projects or departments. Create a volume for each user, department, or project. You can mount volumes under other volumes to build a structure that reflects the needs of your organization. The volume structure defines how data is distributed across the nodes in your cluster. Create multiple small volumes with shallow paths at the top of your cluster's volume hierarchy to spread the load of access requests across the nodes.

On a cluster with an Enterprise Edition or Enterprise Database Edition license, you can create a special type of volume called a mirror, a local or remote read-only copy of an entire volume. Mirrors are useful for load balancing or disaster recovery. You can also create a snapshot, an image of a volume at a specific point in time. Snapshots are useful for rollback to a known data set. You can create snapshots and synchronize mirrors manually or using a schedule.

Creating a Volume

When creating a volume, the only required parameters are the volume type (normal or mirror) and the volume name. You can set the ownership, permissions, quotas, and other parameters at the time of volume creation, or use the Volume Properties dialog to set them later. If you plan to schedule snapshots or mirrors, it is useful to create a schedule ahead of time; the schedule will appear in a drop-down menu in the Volume Properties dialog.

By default, the root user and the volume creator have full control permissions on the volume. You can grant specific permissions to other users and groups:

Code

Allowed Action

dump

Dump the volume

restore

Mirror or restore the volume

m

Modify volume properties, create and delete snapshots

d

Delete a volume

fc

Full control (admin access and permission to change volume ACL)

You can create a volume using the volume create command, or use the following procedure to create a volume using the MapR Control System.

To create a volume using the MapR Control System:

  1. In the Navigation pane, expand the MapR-FS group and click the Volumes view.
  2. Click the New Volume button to display the New Volume dialog.
     
  3. Use the Volume Type radio button at the top of the dialog to choose whether to create a standard volume, a local mirror, or a remote mirror.
  4. Type a name for the volume or source volume in the Volume Name or Mirror Name field.
  5. If you are creating a mirror volume:
    • Type the name of the source volume in the Source Volume Name field.
    • If you are creating a remote mirror volume, type the name of the cluster where the source volume resides, in the Source Cluster Name field.
  6. You can set a mount path for the volume by typing a path in the Mount Path field.
  7. You can specify which rack or nodes the volume will occupy by selecting a toplogy from the Topology drop-down selector.
  8. You can set permissions using the fields in the Permissions section:
    1. Click [ + Add Permission ] to display fields for a new permission.
    2. In the left field, type either u: and a user name, or g: and a group name.
    3. In the right field, select permissions to grant to the user or group.
  9. You can associate a standard volume with an accountable entity and set quotas in the Usage Tracking section:
    1. In the Group/User field, select User or Group from the dropdown menu and type the user or group name in the text field.
    2. To set an advisory quota, select the checkbox beside Volume Advisory Quota and type a quota (in megabytes) in the text field.
    3. To set a quota, select the checkbox beside Volume Quota and type a quota (in megabytes) in the text field.
  10. You can set the replication factor and choose a snapshot or mirror schedule in the Replication and Snapshot Scheduling sections:
    1. Type the desired replication factor in the Replication Factor field. When the number of replicas drops below this threshold, the volume is re-replicated after a timeout period (configurable with the cldb.fs.mark.rereplicate.sec parameter using the config API).
    2. Type the minimum replication factor in the Minimum Replication field. When the number of replicas drops below this threshold, the volume is aggressively re-replicated to bring it above the minimum replication factor.
    3. To schedule snapshots or mirrors, select a schedule from the Snapshot Schedule dropdown menu or the Mirror Update Schedule dropdown menu respectively.
  11. Click OK to create the volume.

Determining Replication Factor

Volumes are stored as pieces called containers that contain files, directories, and other data. By default, the container size is 32 GB. Container size is controlled by the cldb.container.sizemb parameter (see the config commands). Containers are replicated to protect data. Normally, each container has three copies stored on separate nodes to provide uninterrupted access to all data, even if a node fails.

For each volume, you can specify a desired replication factor and a minimum replication factor:

  • The desired replication factor is the number of replicated copies you want to keep for normal operation and data protection. 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 (configurable using the config API). The minimum replication factor you can set is 1; the maximum is 6.
  • The minimum replication factor is the smallest number of copies you want in order to adequately protect against data loss. When the replication factor falls below this minimum, re-replication occurs as aggressively as possible to restore the replication level. The minimum number allowed for the minimum replication factor is 1; the default is 2; the maximum number you can set for the minimum replication factor is 6. In all cases, the minimum replication factor cannot be greater than the replication factor.

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. If a disk failure is detected, any data stored on the failed disk is re-replicated without regard to the timeout specified in the cldb.fs.mark.rereplicate.sec parameter.

Viewing a List of Volumes

You can view all volumes using the volume list command, or view them in the MapR Control System using the following procedure.

To view all volumes using the MapR Control System:

In the Navigation pane, expand the MapR-FS group and click the Volumes view.

Viewing Volume Properties

You can view volume properties using the volume info command, or use the following procedure to view them using the MapR Control System.

To view the properties of a volume using the MapR Control System:

  1. In the Navigation pane, expand the MapR-FS group and click the Volumes view.
  2. Display the Volume Properties dialog by clicking the volume name, or by selecting the checkbox beside the volume name, then clicking the Properties button.
  3. After examining the volume properties, click Close to exit without saving changes to the volume.

Modifying a Volume

 

 You can modify any attributes of an existing volume, except that normal (read-write) volumes cannot be converted to mirror (read-only) volumes.

You can modify a volume using the volume modify command, or use the following procedure to modify a volume using the MapR Control System.

To modify a volume using the MapR Control System:

  1. In the Navigation pane, expand the MapR-FS group and click the Volumes view.
  2. Display the Volume Properties dialog by clicking the volume name, or by selecting the checkbox beside the volume name then clicking the Properties button.
  3. Make changes to the fields. See Creating a Volume for more information about the fields.
  4. After examining the volume properties, click Modify Volume to save changes to the volume.

Mounting a Volume

You can mount a volume using the volume mount command, or use the following procedure to mount a volume using the MapR Control System.

To mount a volume using the MapR Control System:

  1. In the Navigation pane, expand the MapR-FS group and click the Volumes view.
  2. Select the checkbox beside the name of  each volume you wish to mount.
  3. Click the Mount button.

You can also mount or unmount a volume using the Mounted checkbox in the Volume Properties dialog. See Modifying a Volume for more information.

Unmounting a Volume

You can unmount a volume using the volume unmount command, or use the following procedure to unmount a volume using the MapR Control System.

To unmount a volume using the MapR Control System:

  1. In the Navigation pane, expand the MapR-FS group and click the Volumes view.
  2. Select the checkbox beside the name of each volume you wish to unmount.
  3. Click the Unmount button.

You can also mount or unmount a volume using the Mounted checkbox in the Volume Properties dialog. See Modifying a Volume for more information.

Removing a Volume or Mirror

You can remove a volume using the volume remove command, or use the following procedure to remove a volume using the MapR Control System.

To remove a volume or mirror using the MapR Control System:

  1. In the Navigation pane, expand the MapR-FS group and click the Volumes view.
  2. Click the checkbox next to the volume you wish to remove.
  3. Click the Remove button to display the Remove Volume dialog.
  4. In the Remove Volume dialog, click the Remove Volume button.
  • No labels