CLI commands for DS5300 Storage : Remove mapping
C:\Program Files (x86)\IBM_DS\client>SMcli.exe "IPAddress" -p "PASSWORD"
Remove Mapping:
for i in {6..100}; do echo "remove logicalDrive [\"LPAR1K_"$i"\"] lunMapping hostGroup=defaultGroup;";done > logicaldrive.txt
Example 1:
remove logicalDrive ["LPAR1K_11"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_3"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_4"] lunMapping hostGroup=defaultGroup
Example 2:
remove logicalDrive ["LPAR1K_12"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_13"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_14"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_15"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_16"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_17"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_18"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_19"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_20"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_21"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_22"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_23"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_24"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_25"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_26"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_27"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_28"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_29"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_30"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_31"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_32"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_33"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_34"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_35"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_36"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_37"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_38"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_39"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_40"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_41"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_42"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_43"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_44"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_45"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_46"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_47"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_48"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_49"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_50"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_51"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_52"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_53"] lunMapping hostGroup=defaultGroup;
remove logicalDrive ["LPAR1K_54"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_55"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_56"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_57"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_58"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_59"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_60"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_61"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_62"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_63"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_64"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_65"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_66"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_67"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_68"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_69"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_70"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_71"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_72"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_73"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_74"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_75"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_76"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_77"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_78"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_79"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_80"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_81"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_82"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_83"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_84"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_85"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_86"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_87"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_88"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_89"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_90"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_91"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_92"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_93"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_94"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_95"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_96"] lunMapping hostGroup=defaultGroup;
Remove Mapping:
for i in {6..100}; do echo "remove logicalDrive [\"LPAR1K_"$i"\"] lunMapping hostGroup=defaultGroup;";done > logicaldrive.txt
Example 1:
remove logicalDrive ["LPAR1K_11"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_3"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_4"] lunMapping hostGroup=defaultGroup
Example 2:
remove logicalDrive ["LPAR1K_12"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_13"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_14"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_15"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_16"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_17"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_18"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_19"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_20"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_21"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_22"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_23"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_24"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_25"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_26"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_27"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_28"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_29"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_30"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_31"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_32"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_33"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_34"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_35"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_36"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_37"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_38"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_39"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_40"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_41"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_42"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_43"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_44"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_45"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_46"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_47"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_48"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_49"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_50"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_51"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_52"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_53"] lunMapping hostGroup=defaultGroup;
remove logicalDrive ["LPAR1K_54"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_55"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_56"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_57"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_58"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_59"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_60"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_61"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_62"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_63"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_64"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_65"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_66"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_67"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_68"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_69"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_70"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_71"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_72"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_73"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_74"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_75"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_76"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_77"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_78"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_79"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_80"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_81"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_82"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_83"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_84"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_85"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_86"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_87"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_88"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_89"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_90"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_91"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_92"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_93"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_94"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_95"] lunMapping hostGroup=defaultGroup;remove logicalDrive ["LPAR1K_96"] lunMapping hostGroup=defaultGroup;
remove multiple luns from Falcon1_12_11 Host
[root@cobbler SAN]# for i in {3..100}; do echo "remove logicalDrive [\"LPAR1K_"$i"\"] lunMapping host=\"Falcon1_12_11\";";done |sed 's/"/\\"/g'|xargs echo > removemapping.txt
cat removemapping.txt
remove logicalDrive ["LPAR1K_3"] lunMapping host="Falcon1_12_11"; remove logicalDrive ["LPAR1K_4"] lunMapping host="Falcon1_12_11"; remove logicalDrive ["LPAR1K_5"] lunMapping host="Falcon1_12_11";
Comments
Post a Comment