Removes a disk from MapR-FS. Permissions required: fc or a


The disk remove command does not remove a disk containing unreplicated data unless forced. To force disk removal, specify -force with the value 1.

  • Only use the -force 1 option if you are sure that you do not need the data on the disk. This option removes the disk without regard to replication factor or other data protection mechanisms, and may result in permanent data loss.
  • Removing a disk in the storage pool that contains Container ID 1 will stop your cluster. Container ID 1 contains CLDB data for the master CLDB. Run disk remove without the -force 1 option first and examine the warning messages to make sure you aren't removing the disk with Container ID 1. To safely remove such a disk, perform a CLDB Failover to make one of the other CLDB nodes the primary CLDB, then remove the disk as normal.

Syntax

CLI

maprcli disk remove
    [ -cluster <cluster> ]
    -disks <disk names>
    [ -force 0|1 ]
    -host <host> 

REST

http[s]://<host>:<port>/rest/disk/remove?<parameters> 

Parameters



Parameter

Description

cluster

The cluster on which to run the command.

disks

A list of disks in the form:

["disk"]or["disk","disk","disk"...]or[]

force

Whether to force

  • 0 (default) - do not remove the disk or disks if there is unreplicated data on the disk
  • 1 - remove the disk or disks regardless of data loss or other consequences

host

The hostname or ip address of the node from which to remove the disk.

Output



Output Fields

Field

Description

disk

The name of a disk or partition. Example: sca or sca/sca1

all

The string all, meaning all unmounted disks attached to the node.

disks

A comma-separated list of disks which have non-replicated volumes.<eg> "sca" or "sca/sca1,scb"</eg>

Examples

Remove a disk:

CLI

maprcli disk remove -disks ["sda1"]

REST

https://r1n1.sj.us:8443/rest/disk/remove?disks=["sda1"]