Removes a disk from filesystem. 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 or true.
-force 1, or the equivalent -force true option only if
you are sure that you do not need the data on the disk. This option removes the
disk without regard to the replication factor or other data protection mechanisms,
and may result in permanent data loss.disk
remove without the -force 1, or the equivalent
-force true option first, and examine the warning messages to
make sure that you are not removing the disk with Container ID 1. If you try to
remove a disk associated with the storage pool that contains Container ID 1, you
receive an error message similar to the following:
ERROR (151) - Failed operation for disk /dev/sdb, Operation may bring
down cluster due to loss of cluster meta-data./opt/mapr/server/mrconfig info dumpcontainers | grep cid:1
The command output may look similar to the following:
cid:1 volid:1 sp:SP1:/dev/sdb spid:82380c287085486f0058112ecf016b76
prev:0 next:0 issnap:0 isclone:0 deleteinprog:0 fixedbyfsck:0 stale:0
querycldb:0 resyncinprog:0 shared:0 owned:206 logical:206 snapusage:0
snapusageupdated:1 ismirror:0 isrwmirrorcapable:0 role:1 maxUniq:2100150
isResyncSnapshot:0 snapId:0 port:5660/opt/mapr/bin/maprcli disk remove
-host name/ip
-disks comma-separated list of disks
[ -force <true|false OR 1|0>. Need this parameter to actually remove the disk, otherwise this command behaves like a test remove. default: false ]
[ -cluster cluster_name ]
| Request Type | POST |
| Request URL | |
| Parameter | Description |
|---|---|
host |
The hostname or ip address of the node from which to remove the disk. |
disks |
A list of disks in the
form: |
force |
Whether to force disk removal.
|
cluster |
The cluster on which to run the command. |
Output Fields
|
Field |
Description |
|---|---|
|
|
The name of a disk or partition. Example: |
|
|
The string |
|
|
A comma-separated list of disks which have non-replicated volumes. For example, "sca" or "sca/sca1,scb" |
Remove a disk:
/opt/mapr/bin/maprcli disk remove -disks /dev/sda
https://abc.sj.us:8443/rest/disk/remove?disks=/dev/sda