PowerFlex: A device with the given name already exists in the SDS
Summary: This article is a solution to the error "MDM failed command. Status: A device with the given name already exists in the SDS" when adding a new device.
Symptoms
The operation fails when adding a new device to the SDS with an error "MDM failed command. Status: A device with the given name already exists in the SDS" Error: MDM failed command. Status: A device with the given name already exists in the SDS to check the current path, please run the following commands on the primary MDM.
- Note down the impacted
SDSname
--query_all_sds
- Query all the devices for the impacted
SDSname captured from Step 1
scli --query_sds --sds_name
- Here you find that the name and the original path are
sdawhile the current path issdc
Name: /dev/svm_sda Path: /dev/svm_sdc Original-path: /dev/svm_sda
If the cloud link is used the path will have the mapper in it and will look like.
Name: /dev/mapper/svm_sda Path: /dev/mapper/svm_sdc Original-path: /dev/mapper/svm_sda
This is because when the SDS reboots the OS can change the device-assigned letter while it is still holding the original path letter.
Cause
When SDS reboots Operating system (OS) can change the device letter while holding the original path letter causing the old removed device letter to be used by another device.
This problem more often happens in the old Flex version prior to 3.6 In a Linux environment, and in an ESXi environment, after removing a device, the other devices are renumbered upon reboot. However, SIO still remembers the original path and if the device to be added has the same path as the original path of an existing SDS device, the command fails.
Here is an example:
[root@centos6-sio-0 ~]# scli --query_sds --sds_name sds-2 |egrep -A 1 -i "ip|path" 1: Name: sdb Path: /dev/sdc Original-path: /dev/sdb ID: 4d109f2b00000000 [root@centos6-sio-0 ~]# scli --add_sds_device --sds_name sds-2 --device_path /dev/sdb --storage_pool_name sp1 Error: MDM failed command. Status: A device with the given name already exists in the SDS
[root@centos6-sio-0 ~]# scli --add_sds_device --sds_name sds-2 --device_path /dev/sdb --device_name testtt --storage_pool_name sp1 Error: MDM failed command. Status: A device with the given name already exists in the SDS
Resolution
1- Get the device ID from by running the below command on the primary MDM.
scli --query_sds --sds_name <SDS_Name>
2- Use the device ID from step 1 to run the below command to update the device' original-path to the same as its current path, so that the new device can be added.
scli --update_device_original_path --device_id <Device_id>
In the above example, the following procedure fixes the problem:
[root@centos6-sio-0 ~]# scli --query_sds --sds_name sds-2 | grep Path 1: Name: sdb Path: /dev/sdc Original-path: /dev/sdb ID: 4d109f2b00000000
[root@centos6-sio-0 ~]# scli --update_device_original_path --device_id 4d109f2b00000000 Successfully update device's original path
[root@centos6-sio-0 ~]# scli --query_sds --sds_name sds-2 | grep Path 1: Name: sdb Path: /dev/sdc Original-path: /dev/sdc ID: 4d109f2b00000000
[root@centos6-sio-0 ~]# scli --add_sds_device --sds_name sds-2 --device_path /dev/sdb --device_name testtt --storage_pool_name sp1 Successfully added device testtt to SDS. New device ID: 4d109f3000000001
[root@centos6-sio-0 ~]# scli --query_sds --sds_name sds-2 | grep Path 1: Name: sdb Path: /dev/sdc Original-path: /dev/sdc ID: 4d109f2b00000000 2: Name: testtt Path: /dev/sdb Original-path: /dev/sdb ID: 4d109f3000000001