Removing a Disk
This procedure describes removing a disk from a Data Fabric that implements HPE Ezmeral Data Fabric on Kubernetes on HPE Ezmeral Runtime Enterprise.
Prerequisites
-
You know which disk to remove.
-
You know which pod is associated with the disk you want to remove.
-
Required access rights:
-
Platform Administrator or Kubernetes Cluster Administrator access rights are required to download the admin kubeconfig file, which is needed to access Kubernetes cluster pods (see Downloading Admin Kubeconfig).
-
You must be logged on as the root user on the node that contains the disk and on which the Kubernetes cluster is running.
-
Procedure
-
Access the pod from which you want to remove the disk.
In the following example, the pod is
mfs-1
.kubectl exec -it mfs-1 -n mydfcluster -- /bin/bash
-
Determine to which storage pool the disk belongs.
When you remove a disk, the other disks in the storage pool are also removed.
To display the list of storage pools, enter the following command:
/opt/mapr/server/mrconfig sp list -v
-
Determine the internal name used by the Data Fabric file system to refer to the disk.
In
maprcli
commands, you specify the disk using the internal name that the Data Fabric file system uses to refer to the disk.To determine the internal name of a disk, list the directory that contains the logical links to Data Fabric disks (
/var/mapr/edf-disks/
).In the following example, the internal name of the
dev/ssd
disk isdrive_ssd_3
:ls -l /var/mapr/edf-disks/ ... lrwxrwxrwx 1 root root 8 Nov 4 15:28 drive_ssd_0 -> /dev/sdb lrwxrwxrwx 1 root root 8 Nov 4 15:28 drive_ssd_1 -> /dev/sdc lrwxrwxrwx 1 root root 8 Nov 4 16:59 drive_ssd_3 -> /dev/sdd ...
-
Remove the disk from the Data Fabric file
system.
In HPE Ezmeral Data Fabric on Kubernetes deployments, the
host
parameter ofmaprcli
commands refers to the pod.In the following example,
drive_ssd_3
is being removed:maprcli disk remove -host mfs-1.mfs-svc.mydfcluster.svc.cluster.local -disks /var/mapr/edf-disks/drive_ssd_3 -force false
-
Determine which node the pod is running on.
For example:
kubectl describe pod mfs-1 -n mydfcluster | grep Node: Node: mydfnode1-default-pool/192.0.2.75
-
Get the current list of disks from the node annotations.
For example:
kubectl describe node mydfnode-default-pool | grep ssdlist hpe.com/ssdlist: /dev/sdb,/dev/sdc,/dev/sdd
-
Remove the disk from the
ssdlist
annotation:You remove a disk from the
ssdlist
by overwriting the existing list with new list that includes all the disks except for the disk you want to remove.In the following example, the disk
/dev/sdd
has been removed.kubectl annotate --overwrite nodes mydfnode-default-pool hpe.com/ssdlist='/dev/sdb,/dev/sdc'
-
Verify that the disk has been removed from the node annotations.
For example:
kubectl describe node mydfnode-default-pool | grep ssdlist hpe.com/ssdlist: /dev/sdb,/dev/sdc
-
Verify that the logical link for the removed disk is no longer in the directory
that contains the logical links to Data Fabric
disks (
/var/mapr/edf-disks/
).For example:
ls -l /var/mapr/edf-disks/ ... lrwxrwxrwx 1 root root 8 Nov 4 15:28 drive_ssd_0 -> /dev/sdb lrwxrwxrwx 1 root root 8 Nov 4 15:28 drive_ssd_1 -> /dev/sdc ...
-
Edit the Data Fabric configuration file
(
/opt/mapr/conf/disktab
) to delete the reference to the disk you are removing:For example:
vi /opt/mapr/conf/disktab
-
Identify and delete logs that are associated with the removed disk.
To list the logs, use the following command:
ls /opt/mapr/logs
-
Verify that the removed disk is not in the Data Fabric file system:
For example, if there is no
ssd
disk in themfs-1
pod, the following command does not return a result:maprcli disk listall | grep mfs-1 | grep sdd
-
Verify that the storage pool that contained the removed disk no longer
exists.
To display the list of storage pools, enter the following command:
/opt/mapr/server/mrconfig sp list -v
-
Remove the disk from the host.
For more information about this step, refer to the documentation for your server and storage system.
For example, if you are removing a disk from a physical server, remove the physical disk hardware from disk enclosure.