PowerFlex: Adding an SDS device fails with "A device with the given name already exists in the SDS"
Summary: Adding an SDS device fails with "A device with the given name already exists in the SDS"
Symptoms
While adding a device to an SDS through scli, this error will be displayed:

# scli --add_sds_device --sds_name sds-01 --device_path /dev/sdc --storage_pool pool1
Error: MDM failed command. Status: A device with the given name already exists in the SDS
Typically, this can be resolved by using "--update_device_original_path." However, trying to fix the problem of device paths A device with the given name already exists in the SDS now ends with this error:
# scli --update_device_original_path --sds_id be84190600000001 --device_id cd82454400010008
Error: MDM failed command. Status: Device has an unhandled error that cannot yet be cleared
lsblk") you will not see any duplication in the device paths.
Impact
Cannot add new devices to SDS to expand storage capacity in the cluster.
Cause
As mentioned earlier, when we see this error, the first thing to try is to update the device's original path that currently exists in the SDS. If this fails, it is because the devices the SDS is controlling in this host had an error at one time that was cleared, either in the UI or from the command line, but the MDM is not allowing the device errors to be cleared any further, as it is no longer in an "errored" state. The "unhandled error" is a ScaleIO issue that is resolved in a later revision of code.
Resolution
To work around the issue, the quickest way is to add a temporary device which fills the gap in the device list. For example:
# scli --query_sds --sds_id be84190600000001 |grep ID: |awk '{print $4,$5,$6,$7}'
Path: /dev/sdb Original-path: /dev/sdb
Path: /dev/sdc Original-path: /dev/sdc
Path: /dev/sdd Original-path: /dev/sdd
Path: /dev/sde Original-path: /dev/sde
Path: /dev/sdf Original-path: /dev/sdf
Path: /dev/sdg Original-path: /dev/sdh
Path: /dev/sdh Original-path: /dev/sdi
Path: /dev/sdi Original-path: /dev/sdj
# lsblk
NAME MAJ:MIN RM SIZE RO MOUNTPOINT
sdb 8:16 0 930.4G 0
sdc 8:32 0 930.4G 0
sdd 8:48 0 930.4G 0
sde 8:64 0 930.4G 0
sdf 8:80 0 930.4G 0
sdg 8:96 0 930.4G 0
sda 8:0 0 8G 0
ââsda1 8:1 0 1011M 0 [SWAP]
ââsda2 8:2 0 7G 0 /
sdi 8:128 0 930.4G 0
sdh 8:112 0 930.4G 0
fd0 2:0 1 4K 0
sr0 11:0 1 1024M 0
Note the current path that each device is using. The last device is /dev/sdi. When a new device is added, it comes in as /dev/sdj. There is already a /dev/sdj listed under original-path. When a new SDS device is added, the current and original paths must match. The "--update_device_original_path" command is supposed to clear this up and match the current and original paths.
In this case, with the host being an SVM on ESXi, we add a small (8 GB, thin) VMDK to the SVM, which will come in as /dev/sdj. Now when the new real SDS device is added, it comes in as /dev/sdk, which is free on both current and original path, and will succeed.
Additional Information
Impacted Versions
v2.0.0.3 and above
Fixed in Version
v3.0