summaryrefslogtreecommitdiff
path: root/doc/source/configuration/block-storage/drivers/dell-emc-powermax-driver.rst
blob: d3c4c560c8db3f38cb90eb096a65ee0809ac8fa1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
======================================
Dell PowerMax iSCSI and FC drivers
======================================

The Dell PowerMax drivers, ``PowerMaxISCSIDriver`` and
``PowerMaxFCDriver``, support the use of Dell PowerMax and VMAX storage
arrays with the Cinder Block Storage project. They both provide equivalent
functions and differ only in support for their respective host attachment
methods.

The drivers perform volume operations by communicating with the back-end
PowerMax storage management software. They use the Requests HTTP library to
communicate with a Unisphere for PowerMax instance, using a RESTAPI interface
in the backend to perform PowerMax and VMAX storage operations.

.. _VMAX-Hybrid:

.. note::

   DEPRECATION NOTICE: The VMAX Hybrid series will not be supported from the
   ``Z`` release of OpenStack. Also, any All Flash array
   running HyperMaxOS 5977 will no longer be supported from the ``Z``
   release onwards.


.. note::

   While ``PowerMax`` will be used throughout this document, it will be used
   to collectively categorize the following supported arrays, PowerMax 2000,
   8000, 2500, 8500, VMAX All Flash 250F, 450F, 850F and 950F and VMAX-Hybrid_.


System requirements and licensing
=================================

The Dell PowerMax Cinder driver supports the VMAX-Hybrid_ series,
VMAX All-Flash series and the PowerMax v3 and v4 arrays.

Download Solutions Enabler and Unisphere from the Dell's support web site
(login is required). See the `Dell Solutions Enabler Installation
and Configuration Guide` and `Dell Unisphere for PowerMax Installation
Guide` at the `Dell Support`_ site.

.. note::

   At the time each OpenStack release, support-matrix-table_ was the
   recommended PowerMax management software and OS combinations.  Please
   reach out your local PowerMax representative to see if these versions
   are still valid.

   Starting with Antelope, the PowerMax OS version is now aligned with the
   Unisphere version scheme.

.. _support-matrix-table:

.. table:: PowerMax Management software and OS for OpenStack release

   +-----------+--------------+-------------+--------------------------------+
   | OpenStack | Unisphere    | PowerMax OS | Supported Arrays               |
   | release   | for PowerMax |             |                                |
   +===========+==============+=============+================================+
   | Antelope  | 10.0.1       | 10.0.1      | PowerMax 2500,8500             |
   |           |              | (6079.175)  |                                |
   |           |              +-------------+--------------------------------+
   |           |              | 5978.711    | PowerMax 2000,8000             |
   |           |              |             | VMAX 250F, 450F, 850F, 950F    |
   +-----------+--------------+-------------+--------------------------------+
   | Zed       | 9.2.2        | 5978.711    | PowerMax 2000,8000             |
   |           |              |             | VMAX 250F, 450F, 850F, 950F    |
   +-----------+--------------+-------------+--------------------------------+
   | Yoga      | 9.2.2        | 5978.711    | PowerMax 2000,8000             |
   |           |              |             | VMAX 250F, 450F, 850F, 950F    |
   |           |              |             | VMAX 100K, 200K, 400K (Hybrid) |
   +-----------+--------------+-------------+--------------------------------+
   | Xena      | 9.2.2        | 5978.711    | PowerMax 2000,8000             |
   |           |              |             | VMAX 250F, 450F, 850F, 950F    |
   |           |              |             | VMAX 100K, 200K, 400K (Hybrid) |
   +-----------+--------------+-------------+--------------------------------+
   | Wallaby   | 9.2.1        | 5978.711    | PowerMax 2000,8000             |
   |           |              |             | VMAX 250F, 450F, 850F, 950F    |
   |           |              |             | VMAX 100K, 200K, 400K (Hybrid) |
   +-----------+--------------+-------------+--------------------------------+
   | Victoria  | 9.2.0        | 5978.669    | PowerMax 2000,8000             |
   |           |              |             | VMAX 250F, 450F, 850F, 950F    |
   |           |              |             | VMAX 100K, 200K, 400K (Hybrid) |
   +-----------+--------------+-------------+--------------------------------+
   | Ussuri    | 9.1.x        | 5978.479    | PowerMax 2000,8000             |
   |           |              |             | VMAX 250F, 450F, 850F, 950F    |
   |           |              |             | VMAX 100K, 200K, 400K (Hybrid) |
   +-----------+--------------+-------------+--------------------------------+
   | Train     | 9.1.x        | 5978.444    | PowerMax 2000,8000             |
   |           |              |             | VMAX 250F, 450F, 850F, 950F    |
   |           |              |             | VMAX 100K, 200K, 400K (Hybrid) |
   +-----------+--------------+-------------+--------------------------------+
   | Stein     | 9.0.x        | 5978.221    | PowerMax 2000,8000             |
   |           |              |             | VMAX 250F, 450F, 850F, 950F    |
   |           |              |             | VMAX 100K, 200K, 400K (Hybrid) |
   +-----------+--------------+-------------+--------------------------------+

.. note::

   A Hybrid array can only run HyperMax OS 5977, and is still supported until
   the ``Z`` release of OpenStack. Some functionality will not be available
   in older versions of the OS.  If in any doubt, please contact your local
   PowerMax representative.

.. note::

   Newer versions of Unisphere for PowerMax and PowerMax OS are not
   retrospectively tested on older versions of OpenStack. If it is necessary
   to upgrade, the older REST endpoints will be used. For example, in Ussuri,
   if upgrading to Unisphere for PowerMax 9.2, the older ``91`` endpoints will
   be used.



Required PowerMax software suites for OpenStack
-----------------------------------------------

The storage system requires a Unisphere for PowerMax (SMC) eLicense.

PowerMax
~~~~~~~~
There are two licenses for the PowerMax 2000 and 8000:

- Essentials software package
- Pro software package

The Dell PowerMax cinder driver requires the Pro software package.

All Flash
~~~~~~~~~
For full functionality including SRDF for the VMAX All Flash, the FX package,
or the F package plus the SRDF a la carte add on is required.

Hybrid
~~~~~~

There are five Dell Software Suites sold with the VMAX-Hybrid_ arrays:

- Base Suite
- Advanced Suite
- Local Replication Suite
- Remote Replication Suite
- Total Productivity Pack

The Dell PowerMax Cinder driver requires the Advanced Suite and the Local
Replication Suite or the Total Productivity Pack (it includes the Advanced
Suite and the Local Replication Suite) for the VMAX Hybrid.

Using PowerMax Remote Replication functionality will also require the Remote
Replication Suite.


.. note::

   Each are licensed separately. For further details on how to get the
   relevant license(s), reference eLicensing Support below.


eLicensing support
------------------

To activate your entitlements and obtain your PowerMax license files, visit the
Service Center on `Dell Support`_, as directed on your License
Authorization Code (LAC) letter emailed to you.

-  For help with missing or incorrect entitlements after activation
   (that is, expected functionality remains unavailable because it is not
   licensed), contact your EMC account representative or authorized reseller.

-  For help with any errors applying license files through Solutions Enabler,
   contact the Dell Customer Support Center.

-  If you are missing a LAC letter or require further instructions on
   activating your licenses through the Online Support site, contact EMC's
   worldwide Licensing team at ``licensing@emc.com`` or call:

   North America, Latin America, APJK, Australia, New Zealand: SVC4EMC
   (800-782-4362) and follow the voice prompts.

   EMEA: +353 (0) 21 4879862 and follow the voice prompts.


PowerMax for OpenStack Cinder customer support
----------------------------------------------

If you require help or assistance with PowerMax and Cinder please open a
Service Request (SR) through standard support channels at `Dell Support`_.
When opening a SR please include the following information:

- Array Model & uCode level
- Unisphere for PowerMax version
- Solutions Enabler Version
- OpenStack host Operating System (Ubuntu, RHEL, etc.)
- OpenStack version (Usurri, Train, etc.)
- PowerMax for Cinder driver version, this can be located in the comments in
  the PowerMax driver file:
  ``{cinder_install_dir}/cinder/volume/drivers/dell_emc/powermax/fc.py``
- Cinder logs
- Detailed description of the issue you are encountering


Supported operations
====================

PowerMax drivers support these operations:

-  Create, list, delete, attach, and detach volumes
-  Create, list, and delete volume snapshots
-  Copy an image to a volume
-  Copy a volume to an image
-  Clone a volume
-  Extend a volume
-  Retype a volume (Host and storage assisted volume migration)
-  Create a volume from a snapshot
-  Create and delete generic volume group
-  Create and delete generic volume group snapshot
-  Modify generic volume group (add and remove volumes)
-  Create generic volume group from source
-  Live Migration
-  Volume replication SRDF/S, SRDF/A and SRDF Metro
-  Quality of service (QoS)
-  Manage and unmanage volumes and snapshots
-  List Manageable Volumes/Snapshots
-  Backup create, delete, list, restore and show

PowerMax drivers also support the following features:

-  Dynamic masking view creation
-  Dynamic determination of the target iSCSI IP address
-  iSCSI multipath support
-  Oversubscription
-  Service Level support
-  SnapVX support
-  Compression support(All Flash and PowerMax)
-  Deduplication support(PowerMax)
-  CHAP Authentication
-  Multi-attach support
-  Volume Metadata in logs
-  Encrypted Volume support
-  Extending attached volume
-  Replicated volume retype support
-  Retyping attached(in-use) volume
-  Unisphere High Availability(HA) support
-  Online device expansion of a metro device
-  Rapid TDEV deallocation of deletes
-  Multiple replication devices
-  PowerMax array and storage group tagging
-  Short host name and port group templates
-  Snap id support
-  Seamless Live Migration from SMI-S support
-  Port group & port performance load balancing

.. note::

   In certain cases, when creating a volume from a source snapshot or
   source volume, subsequent operations using the volumes may fail due to
   a missing snap_name exception. A manual refresh on the connected
   Unisphere instance or waiting until another operation automatically
   refreshes the connected Unisphere instance, will alleviate this issue.

PowerMax naming conventions
===========================

.. note::

   ``shortHostName`` will be altered using the following formula, if its length
   exceeds 16 characters. This is because the storage group and masking view
   names cannot exceed 64 characters:

   .. code-block:: text

      if len(shortHostName) > 16:
          1. Perform md5 hash on the shortHostName
          2. Convert output of 1. to hex
          3. Take last 6 characters of shortHostName and append output of 2.
          4. If the length of output of 3. exceeds 16 characters, join the
             first 8 characters and last 8 characters.

.. note::

   ``portgroup_name`` will be altered using the following formula, if its
   length exceeds 12 characters. This is because the storage group and masking
   view names cannot exceed 64 characters:

   .. code-block:: text

      if len(portgroup_name) > 12:
          1. Perform md5 hash on the portgroup_name
          2. Convert output of 1. to hex
          3. Take last 6 characters of portgroup_name and append output of 2.
          4. If the length of output of 3. exceeds 12 characters, join the
             first 6 characters and last 6 characters.


Masking view names
------------------

Masking views are dynamically created by the PowerMax FC and iSCSI drivers
using the following naming conventions. ``[protocol]`` is either ``I`` for
volumes attached over iSCSI or ``F`` for volumes attached over Fibre Channel.

.. code-block:: text

   OS-[shortHostName]-[protocol]-[portgroup_name]-MV

Initiator group names
---------------------

For each host that is attached to PowerMax volumes using the drivers, an
initiator group is created or re-used (per attachment type). All initiators
of the appropriate type known for that host are included in the group. At
each new attach volume operation, the PowerMax driver retrieves the initiators
(either WWNNs or IQNs) from OpenStack and adds or updates the contents of the
Initiator Group as required. Names are of the following format. ``[protocol]``
is either ``I`` for volumes attached over iSCSI or ``F`` for volumes attached
over Fibre Channel.

.. code-block:: console

   OS-[shortHostName]-[protocol]-IG

.. note::

   Hosts attaching to OpenStack managed PowerMax storage cannot also attach to
   storage on the same PowerMax that are not managed by OpenStack.

FA port groups
--------------

PowerMax array FA ports to be used in a new masking view are retrieved from the
port group provided as the extra spec on the volume type, or chosen from the
list provided in the Dell configuration file.

Storage group names
-------------------

As volumes are attached to a host, they are either added to an existing
storage group (if it exists) or a new storage group is created and the volume
is then added. Storage groups contain volumes created from a pool, attached
to a single host, over a single connection type (iSCSI or FC). ``[protocol]``
is either ``I`` for volumes attached over iSCSI or ``F`` for volumes attached
over Fibre Channel. PowerMax Cinder driver utilizes cascaded storage groups -
a ``parent`` storage group which is associated with the masking view, which
contains ``child`` storage groups for each configured
SRP/slo/workload/compression-enabled or disabled/replication-enabled or
disabled combination.

PowerMax, VMAX All Flash and VMAX-Hybrid_

Parent storage group:

.. code-block:: text

   OS-[shortHostName]-[protocol]-[portgroup_name]-SG

Child storage groups:

.. code-block:: text

   OS-[shortHostName]-[SRP]-[ServiceLevel/Workload]-[portgroup_name]-CD-RE

.. note::

   CD and RE are only set if compression is explicitly disabled or replication
   explicitly enabled. See the compression `11. All Flash compression support`_
   and replication `Volume replication support`_ sections below.

.. note::

   For VMAX All Flash with PowerMax OS (5978) or greater, workload if set will
   be ignored and set to NONE.

.. _my-table:

.. table:: Replication storage group naming conventions

    +----------------------------+---------------------------------+--------------------------------+--------------------+
    | Default storage group      | Attached child storage group    | Management Group               | Replication Type   |
    +============================+=================================+================================+====================+
    | OS-[SRP]-[SL]-[WL]-SG      | OS-[HOST]-[SRP]-[SL/WL]-[PG]    | N/A                            | None               |
    +----------------------------+---------------------------------+--------------------------------+--------------------+
    | OS-[SRP]-[SL]-[WL]-RE-SG   | OS-[HOST]-[SRP]-[SL/WL]-[PG]-RE | N/A                            | Synchronous        |
    +----------------------------+---------------------------------+--------------------------------+--------------------+
    | OS-[SRP]-[SL]-[WL]-RA-SG   | OS-[HOST]-[SRP]-[SL/WL]-[PG]-RA | OS-[RDFG]-Asynchronous-rdf-sg  | Asynchronous       |
    +----------------------------+---------------------------------+--------------------------------+--------------------+
    | OS-[SRP]-[SL]-[WL]-RM-SG   | OS-[HOST]-[SRP]-[SL/WL]-[PG]-RM | OS-[RDFG]-Metro-rdf-sg         | Metro              |
    +----------------------------+---------------------------------+--------------------------------+--------------------+


PowerMax driver integration
===========================

1. Prerequisites
----------------

#. Download Solutions Enabler from `Dell Support`_ and install it.

   You can install Solutions Enabler on a non-OpenStack host. Supported
   platforms include different flavors of Windows, Red Hat, and SUSE Linux.
   Solutions Enabler can be installed on a physical server, or as a Virtual
   Appliance (a VMware ESX server VM). Additionally, starting with HYPERMAX
   OS Q3 2015, you can manage VMAX3 arrays using the Embedded Management
   (eManagement) container application. See the ``Dell Solutions Enabler
   9.2.1 Installation and Configuration Guide`` on `Dell Support`_ for
   more details.

   .. note::

      You must discover storage arrays before you can use the PowerMax drivers.
      Follow instructions in ``Dell Solutions Enabler 9.2.1 Installation
      and Configuration Guide`` on `Dell Support`_ for more details.

#. Download Unisphere from `Dell Support`_ and install it.

   Unisphere can be installed in local, remote, or embedded configurations
   - i.e., on the same server running Solutions Enabler; on a server
   connected to the Solutions Enabler server; or using the eManagement
   container application (containing Solutions Enabler and Unisphere for
   PowerMax). See ``Dell Solutions Enabler 9.2.1 Installation and
   Configuration Guide`` at `Dell Support`_.

#. Pay attention to the number of Gatekeepers device to have in your
   environment. It may vary depending on simultaneous call to Unisphere.


2. FC zoning with PowerMax
--------------------------

Zone Manager is required when there is a fabric between the host and array.
This is necessary for larger configurations where pre-zoning would be too
complex and open-zoning would raise security concerns.

3. iSCSI with PowerMax
----------------------

-  Make sure the ``open-iscsi`` package (or distro equivalent) is installed
   on all Compute nodes.

.. note::

   You can only ping the PowerMax iSCSI target ports when there is a valid
   masking view. An attach operation creates this masking view.



4. Configure block storage in cinder.conf
-----------------------------------------

.. config-table::
   :config-target: PowerMax

   cinder.volume.drivers.dell_emc.powermax.common


.. note::

   ``san_api_port`` is ``8443`` by default but can be changed if
   necessary. For the purposes of this documentation the default is
   assumed so the tag will not appear in any of the ``cinder.conf``
   extracts below.


.. note::

   PowerMax ``PortGroups`` must be pre-configured to expose volumes managed
   by the array. Port groups can be supplied in ``cinder.conf``, or
   can be specified as an extra spec ``storagetype:portgroupname`` on a
   volume type. If a port group is set on a volume type as an extra
   specification it takes precedence over any port groups set in
   ``cinder.conf``. For more information on port and port group selection
   please see the section ``port group & port load balancing``.

.. note::

   PowerMax ``SRP`` cannot be changed once configured and in-use. SRP renaming
   on the PowerMax array is not supported.

.. note::

   Service Level can be added to ``cinder.conf`` when the backend is the
   default case and there is no associated volume type. This not a recommended
   configuration as it is too restrictive. Workload is ``NONE`` for PowerMax
   and any All Flash with PowerMax OS (5978) or greater.

   +--------------------+----------------------------+----------+----------+
   | PowerMax parameter | cinder.conf parameter      | Default  | Required |
   +====================+============================+==========+==========+
   |  ``ServiceLevel``  | ``powermax_service_level`` | ``None`` | No       |
   +--------------------+----------------------------+----------+----------+


To configure PowerMax block storage, add the following entries to
``/etc/cinder/cinder.conf``:

.. code-block:: ini

   enabled_backends = CONF_GROUP_ISCSI, CONF_GROUP_FC

   [CONF_GROUP_ISCSI]
   volume_driver = cinder.volume.drivers.dell_emc.powermax.iscsi.PowerMaxISCSIDriver
   volume_backend_name = POWERMAX_ISCSI
   powermax_port_groups = [OS-ISCSI-PG]
   san_ip = 10.10.10.10
   san_login = my_username
   san_password = my_password
   powermax_array = 000123456789
   powermax_srp = SRP_1


   [CONF_GROUP_FC]
   volume_driver = cinder.volume.drivers.dell_emc.powermax.fc.PowerMaxFCDriver
   volume_backend_name = POWERMAX_FC
   powermax_port_groups = [OS-FC-PG]
   san_ip = 10.10.10.10
   san_login = my_username
   san_password = my_password
   powermax_array = 000123456789
   powermax_srp = SRP_1

In this example, two back-end configuration groups are enabled:
``CONF_GROUP_ISCSI`` and ``CONF_GROUP_FC``. Each configuration group has a
section describing unique parameters for connections, drivers and the
``volume_backend_name``.


5. SSL support
--------------

#. Get the CA certificate of the Unisphere server. This pulls the CA cert file
   and saves it as ``.pem`` file:

   .. code-block:: console

      # openssl s_client -showcerts \
                         -connect my_unisphere_host:8443 \
                         </dev/null 2>/dev/null \
                         | openssl x509 -outform PEM > my_unisphere_host.pem

   Where ``my_unisphere_host`` is the hostname of the unisphere instance and
   ``my_unisphere_host.pem`` is the name of the ``.pem`` file.

#. Add this path to ``cinder.conf`` under the PowerMax backend stanza and set
   SSL verify to ``True``

   .. code-block:: console

      driver_ssl_cert_verify = True
      driver_ssl_cert_path = /path/to/my_unisphere_host.pem

   ``OR`` follow the steps 3-6 below if you would like to add the CA cert to
   the system certificate bundle instead of specifying the path to cert:

#. OPTIONAL: Copy the ``.pem`` cert to the system certificate
   directory and convert to ``.crt``:

   .. code-block:: console

      # cp my_unisphere_host.pem /usr/share/ca-certificates/ca_cert.crt

#. OPTIONAL: Update CA certificate database with the following command. Ensure
   you select to enable the cert from step 3 when prompted:

   .. code-block:: console

      # sudo dpkg-reconfigure ca-certificates

#. OPTIONAL: Set a system environment variable to tell the Requests library to
   use the system cert bundle instead of the default Certifi bundle:

   .. code-block:: console

      # export REQUESTS_CA_BUNDLE = /etc/ssl/certs/ca-certificates.crt

#. OPTIONAL: Set cert verification to ``True`` under the PowerMax backend
   stanza in ``cinder.conf``:

   .. code-block:: console

      # driver_ssl_cert_verify = True

#. Ensure ``driver_ssl_cert_verify`` is set to ``True`` in ``cinder.conf``
   backend stanzas if steps 3-6 are followed, otherwise ensure both
   ``driver_ssl_cert_path`` and ``driver_ssl_cert_verify`` are set in
   ``cinder.conf`` backend stanzas.


6. Create volume types
----------------------

Once ``cinder.conf`` has been updated, `Openstack CLI`_ commands need to be
issued in order to create and associate OpenStack volume types with the
declared ``volume_backend_names``.

Additionally, each volume type will need an associated ``pool_name`` - an
extra specification indicating the service level/ workload combination to
be used for that volume type.


.. note::

   The ``pool_name`` is an additional property which has to be set and is of
   the format: ``<ServiceLevel>+<SRP>+<Array ID>``. This can be obtained from
   the output of the ``cinder get-pools--detail``. Workload is NONE for
   PowerMax or any All Flash with PowerMax OS (5978) or greater.


There is also the option to assign a port group to a volume type by
setting the ``storagetype:portgroupname`` extra specification.


.. code-block:: console

   $ openstack volume type create POWERMAX_ISCSI_SILVER
   $ openstack volume type set --property volume_backend_name=ISCSI_backend \
                               --property pool_name=Silver+SRP_1+000123456789 \
                               --property storagetype:portgroupname=OS-PG2 \
                               POWERMAX_ISCSI_SILVER
   $ openstack volume type create POWERMAX_FC_DIAMOND
   $ openstack volume type set --property volume_backend_name=FC_backend \
                               --property pool_name=Gold+SRP_1+000123456789 \
                               --property storagetype:portgroupname=OS-PG1 \
                               POWERMAX_FC_GOLD


By issuing these commands, the Block Storage volume type
``POWERMAX_ISCSI_SILVER`` is associated with the ``ISCSI_backend``, a Silver
Service Level.

The type ``POWERMAX_FC_DIAMOND`` is associated with the ``FC_backend``, a
Diamond Service Level.

The ``ServiceLevel`` manages the underlying storage to provide expected
performance. Setting the ``ServiceLevel`` to ``None`` means that non-FAST
managed storage groups will be created instead (storage groups not
associated with any service level).

.. code-block:: console

   openstack volume type set --property pool_name=None+SRP_1+000123456789

.. note::

   PowerMax and VMAX-Hybrid_ support  ``Diamond``, ``Platinum``, ``Gold``,
   ``Silver``, ``Bronze``, ``Optimized``, and ``None`` service
   levels. VMAX All Flash running HyperMax OS (5977) supports ``Diamond``
   and ``None``. VMAX-Hybrid_ and All Flash support ``DSS_REP``, ``DSS``,
   ``OLTP_REP``, ``OLTP``, and ``None`` workloads, the latter up until
   ucode 5977. Please refer to Stein PowerMax online documentation if you
   wish to use ``workload``. There is no support for workloads in PowerMax
   OS (5978) or greater. These will be silently ignored if set for VMAX
   All-Flash arrays which have been upgraded to PowerMax OS (5988).


7. Interval and retries
-----------------------

By default, ``interval`` and ``retries`` are ``3`` seconds and ``200`` retries
respectively. These determine how long (``interval``) and how many times
(``retries``) a user is willing to wait for a single Rest call,
``3*200=600seconds``. Depending on usage, these may need to be overridden by
the user in ``cinder.conf``. For example, if performance is a factor, then the
``interval`` should be decreased to check the job status more frequently, and
if multiple concurrent provisioning requests are issued then ``retries``
should be increased so calls will not timeout prematurely.

In the example below, the driver checks every 3 seconds for the status of the
job. It will continue checking for 200 retries before it times out.

Add the following lines to the PowerMax backend in ``cinder.conf``:

.. code-block:: console

   [CONF_GROUP_ISCSI]
   volume_driver = cinder.volume.drivers.dell_emc.powermax.iscsi.PowerMaxISCSIDriver
   volume_backend_name = POWERMAX_ISCSI
   powermax_port_groups = [OS-ISCSI-PG]
   san_ip = 10.10.10.10
   san_login = my_username
   san_password = my_password
   powermax_array = 000123456789
   powermax_srp = SRP_1
   interval = 1
   retries = 700

8. CHAP authentication support
------------------------------

This supports one-way initiator CHAP authentication functionality into the
PowerMax backend. With CHAP one-way authentication, the storage array
challenges the host during the initial link negotiation process and expects
to receive a valid credential and CHAP secret in response. When challenged,
the host transmits a CHAP credential and CHAP secret to the storage array.
The storage array looks for this credential and CHAP secret which stored in
the host initiator's initiator group (IG) information in the ACLX database.
Once a positive authentication occurs, the storage array sends an acceptance
message to the host. However, if the storage array fails to find any record
of the credential/secret pair, it sends a rejection message, and the link is
closed.

Assumptions, restrictions and prerequisites
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#. The host initiator IQN is required along with the credentials the host
   initiator will use to log into the storage array with. The same credentials
   should be used in a multi node system if connecting to the same array.

#. Enable one-way CHAP authentication for the iSCSI initiator on the storage
   array using ``SYMCLI``. Template and example shown below. For the purpose of
   this setup, the credential/secret used would be ``my_username/my_password``
   with iSCSI initiator of ``iqn.1991-05.com.company.lcseb130``

   .. code-block:: console

      # symaccess -sid <SymmID> -iscsi <iscsi> \
                  {enable chap | disable chap | set chap} \
                   -cred <Credential> -secret <Secret>

      # symaccess -sid 128 \
                  -iscsi iqn.1991-05.com.company.lcseb130 \
                  set chap -cred my_username -secret my_password



Settings and configuration
~~~~~~~~~~~~~~~~~~~~~~~~~~

#. Set the configuration in the PowerMax backend group in ``cinder.conf`` using
   the following parameters and restart cinder.

   +-----------------------+-------------------------+-------------------+
   | Configuration options | Value required for CHAP | Required for CHAP |
   +=======================+=========================+===================+
   |  ``use_chap_auth``    | ``True``                | Yes               |
   +-----------------------+-------------------------+-------------------+
   |  ``chap_username``    | ``my_username``         | Yes               |
   +-----------------------+-------------------------+-------------------+
   |  ``chap_password``    | ``my_password``         | Yes               |
   +-----------------------+-------------------------+-------------------+

   .. code-block:: ini

      [POWERMAX_ISCSI]
      volume_driver = cinder.volume.drivers.dell_emc.powermax.iscsi.PowerMaxISCSIDriver
      volume_backend_name = POWERMAX_ISCSI
      san_ip = 10.10.10.10
      san_login = my_u4v_username
      san_password = my_u4v_password
      powermax_srp = SRP_1
      powermax_array = 000123456789
      powermax_port_groups = [OS-ISCSI-PG]
      use_chap_auth = True
      chap_username = my_username
      chap_password = my_password


Usage
~~~~~

#. Using ``SYMCLI``, enable CHAP authentication for a host initiator as
   described above, but do not set ``use_chap_auth``, ``chap_username`` or
   ``chap_password`` in ``cinder.conf``. Create a bootable volume.

   .. code-block:: console

      openstack volume create --size 1 \
                              --image <image_name> \
                              --type <volume_type> \
                              test

#. Boot instance named ``test_server`` using the volume created above:

   .. code-block:: console

      openstack server create --volume test \
                              --flavor m1.small \
                              --nic net-id=private \
                              test_server

#. Verify the volume operation succeeds but the boot instance fails as
   CHAP authentication fails.

#. Update ``cinder.conf`` with ``use_chap_auth`` set to true and
   ``chap_username`` and ``chap_password`` set with the correct credentials.

#. Rerun ``openstack server create``

#. Verify that the boot instance operation ran correctly and the volume is
   accessible.

#. Verify that both the volume and boot instance operations ran successfully
   and the user is able to access the volume.



9. QoS (Quality of Service) support
-----------------------------------

Quality of service (QoS) has traditionally been associated with network
bandwidth usage. Network administrators set limitations on certain networks
in terms of bandwidth usage for clients. This enables them to provide a
tiered level of service based on cost. The Nova/Cinder QoS offer similar
functionality based on volume type setting limits on host storage bandwidth
per service offering. Each volume type is tied to specific QoS attributes
some of which are unique to each storage vendor. In the hypervisor, the QoS
limits the following:

- Limit by throughput - Total bytes/sec, read bytes/sec, write bytes/sec
- Limit by IOPS - Total IOPS/sec, read IOPS/sec, write IOPS/sec

QoS enforcement in Cinder is done either at the hyper-visor (front-end),
the storage subsystem (back-end), or both. This section focuses on QoS
limits that are enforced by either the PowerMax backend and the hyper-visor
front end interchangeably or just back end (Vendor Specific). The PowerMax
driver offers support for Total bytes/sec limit in throughput and Total
IOPS/sec limit of IOPS.

The PowerMax driver supports the following attributes that are front
end/back end agnostic

- ``total_iops_sec`` - Maximum IOPs (in I/Os per second). Valid values range
  from 100 IO/Sec to 100000 IO/sec.
- ``total_bytes_sec`` - Maximum bandwidth (throughput) in bytes per second.
  Valid values range from 1048576 bytes (1MB) to 104857600000 bytes (100,000MB)

The PowerMax driver offers the following attribute that is vendor specific to
the PowerMax and dependent on the ``total_iops_sec`` and/or ``total_bytes_sec``
being set.

- ``Dynamic Distribution`` - Enables/Disables dynamic distribution of host I/O
  limits. Possible values are:

  - ``Always`` - Enables full dynamic distribution mode. When enabled, the
    configured host I/O limits will be dynamically distributed across the
    configured ports, thereby allowing the limits on each individual port to
    adjust to fluctuating demand.
  - ``OnFailure`` - Enables port failure capability. When enabled, the fraction
    of configured host I/O limits available to a configured port will adjust
    based on the number of ports currently online.
  - ``Never`` - Disables this feature (Default).

USE CASE 1 - Default values
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Prerequisites - PowerMax

- Host I/O Limit (MB/Sec) -     No Limit
- Host I/O Limit (IO/Sec) -     No Limit
- Set Dynamic Distribution -    N/A

.. table:: **Prerequisites - Block Storage (Cinder) back-end (storage group)**

 +-----------------------+-----------------------+
 |  Key                  | Value                 |
 +=======================+=======================+
 |  ``total_iops_sec``   |  ``500``              |
 +-----------------------+-----------------------+
 |  ``total_bytes_sec``  | ``104857600`` (100MB) |
 +-----------------------+-----------------------+
 |  ``DistributionType`` | ``Always``            |
 +-----------------------+-----------------------+

#. Create QoS Specs with the prerequisite values above:

   .. code-block:: console

      $ openstack volume qos create --consumer back-end \
                                    --property total_iops_sec=500 \
                                    --property total_bytes_sec=104857600 \
                                    --property DistributionType=Always \
                                    my_qos

#. Associate QoS specs with specified volume type:

   .. code-block:: console

      $ openstack volume qos associate my_qos my_volume_type

#. Create volume with the volume type indicated above:

   .. code-block:: console

      $ openstack volume create --size 1 --type my_volume_type my_volume

**Outcome - PowerMax (storage group)**

- Host I/O Limit (MB/Sec) -     ``100``
- Host I/O Limit (IO/Sec) -     ``500``
- Set Dynamic Distribution -    ``Always``

**Outcome - Block Storage (Cinder)**

Volume is created against volume type and QoS is enforced with the parameters
above.

USE CASE 2 - Pre-set limits
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Prerequisites - PowerMax

- Host I/O Limit (MB/Sec) -     ``2000``
- Host I/O Limit (IO/Sec) -     ``2000``
- Set Dynamic Distribution -    ``Never``

.. table:: **Prerequisites - Block Storage (Cinder) back-end (storage group)**

 +-----------------------+-----------------------+
 |  Key                  | Value                 |
 +=======================+=======================+
 |  ``total_iops_sec``   |  ``500``              |
 +-----------------------+-----------------------+
 |  ``total_bytes_sec``  | ``104857600`` (100MB) |
 +-----------------------+-----------------------+
 |  ``DistributionType`` | ``Always``            |
 +-----------------------+-----------------------+

#. Create QoS specifications with the prerequisite values above. The consumer
   in this use case is both for front-end and back-end:

   .. code-block:: console

      $ openstack volume qos create --consumer back-end \
                                    --property total_iops_sec=500 \
                                    --property total_bytes_sec=104857600 \
                                    --property DistributionType=Always \
                                    my_qos

#. Associate QoS specifications with specified volume type:

   .. code-block:: console

      $ openstack volume qos associate my_qos my_volume_type

#. Create volume with the volume type indicated above:

   .. code-block:: console

      $ openstack volume create --size 1 --type my_volume_type my_volume

#. Attach the volume created in step 3 to an instance

   .. code-block:: console

      $ openstack server add volume my_instance my_volume

**Outcome - PowerMax (storage group)**

- Host I/O Limit (MB/Sec) -     ``100``
- Host I/O Limit (IO/Sec) -     ``500``
- Set Dynamic Distribution -    ``Always``

**Outcome - Block Storage (Cinder)**

Volume is created against volume type and QoS is enforced with the parameters
above.

**Outcome - Hypervisor (Nova)**

``Libvirt`` includes an extra ``xml`` flag within the ``<disk>`` section called
``iotune`` that is responsible for rate limitation. To confirm that, first get
the ``OS-EXT-SRV-ATTR:instance_name`` value of the server instance,
for example ``instance-00000003``.

.. code-block:: console

   $ openstack server show <serverid>

   +-------------------------------------+-----------------------------------------------------------------+
   | Field                               | Value                                                           |
   +-------------------------------------+-----------------------------------------------------------------+
   | OS-DCF:diskConfig                   | AUTO                                                            |
   | OS-EXT-AZ:availability_zone         | nova                                                            |
   | OS-EXT-SRV-ATTR:host                | myhost                                                          |
   | OS-EXT-SRV-ATTR:hypervisor_hostname | myhost                                                          |
   | OS-EXT-SRV-ATTR:instance_name       | instance-00000003                                               |
   | OS-EXT-STS:power_state              | Running                                                         |
   | OS-EXT-STS:task_state               | None                                                            |
   | OS-EXT-STS:vm_state                 | active                                                          |
   | OS-SRV-USG:launched_at              | 2017-11-02T08:15:42.000000                                      |
   | OS-SRV-USG:terminated_at            | None                                                            |
   | accessIPv4                          |                                                                 |
   | accessIPv6                          |                                                                 |
   | addresses                           | private=fd21:99c2:73f3:0:f816:3eff:febe:30ed, 10.0.0.3          |
   | config_drive                        |                                                                 |
   | created                             | 2017-11-02T08:15:34Z                                            |
   | flavor                              | m1.tiny (1)                                                     |
   | hostId                              | e7b8312581f9fbb8508587d45c0b6fb4dc86102c632ed1f3a6a49d42        |
   | id                                  | 0ef0ff4c-dbda-4dc7-b8ed-45d2fc2f31db                            |
   | image                               | cirros-0.3.5-x86_64-disk (b7c220f5-2408-4296-9e58-fc5a41cb7e9d) |
   | key_name                            | myhostname                                                      |
   | name                                | myhosthame                                                      |
   | progress                            | 0                                                               |
   | project_id                          | bae4b97a0d8b42c28a5add483981e5db                                |
   | properties                          |                                                                 |
   | security_groups                     | name='default'                                                  |
   | status                              | ACTIVE                                                          |
   | updated                             | 2017-11-02T08:15:42Z                                            |
   | user_id                             | 7bccf456740546799a7e20457f13c38b                                |
   | volumes_attached                    |                                                                 |
   +-------------------------------------+-----------------------------------------------------------------+

We then run the following command using the ``OS-EXT-SRV-ATTR:instance_name``
retrieved above.

.. code-block:: console

   $ virsh dumpxml instance-00000003 | grep -1 "total_bytes_sec\|total_iops_sec"

The output of the command contains the XML below. It is found between the
``<disk>`` start and end tag.

.. code-block:: xml

   <iotune>
      <total_bytes_sec>104857600</total_bytes_sec>
      <total_iops_sec>500</total_iops_sec>
   </iotune>


USE CASE 3 - Pre-set limits
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Prerequisites - PowerMax

- Host I/O Limit (MB/Sec) -     ``100``
- Host I/O Limit (IO/Sec) -     ``500``
- Set Dynamic Distribution -    ``Always``

.. table:: **Prerequisites - Block Storage (Cinder) back end (storage group)**

 +-----------------------+-----------------------+
 |  Key                  | Value                 |
 +=======================+=======================+
 |  ``total_iops_sec``   |  ``500``              |
 +-----------------------+-----------------------+
 |  ``total_bytes_sec``  | ``104857600`` (100MB) |
 +-----------------------+-----------------------+
 |  ``DistributionType`` | ``OnFailure``         |
 +-----------------------+-----------------------+

#. Create QoS specifications with the prerequisite values above:

   .. code-block:: console

      $ openstack volume qos create --consumer back-end \
                                    --property total_iops_sec=500 \
                                    --property total_bytes_sec=104857600 \
                                    --property DistributionType=OnFailure \
                                    my_qos

#. Associate QoS specifications with specified volume type:

   .. code-block:: console

      $ openstack volume qos associate my_qos my_volume_type

#. Create volume with the volume type indicated above:

   .. code-block:: console

      $ openstack volume create --size 1 --type my_volume_type my_volume

**Outcome - PowerMax (storage group)**

- Host I/O Limit (MB/Sec) -     ``100``
- Host I/O Limit (IO/Sec) -     ``500``
- Set Dynamic Distribution -    ``OnFailure``

**Outcome - Block Storage (Cinder)**

Volume is created against volume type and QOS is enforced with the parameters
above.


USE CASE 4 - Default values
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Prerequisites - PowerMax

- Host I/O Limit (MB/Sec) -     ``No Limit``
- Host I/O Limit (IO/Sec) -     ``No Limit``
- Set Dynamic Distribution -    ``N/A``

.. table:: **Prerequisites - Block Storage (Cinder) back end (storage group)**

 +-----------------------+---------------+
 |  Key                  | Value         |
 +=======================+===============+
 |  ``DistributionType`` | ``Always``    |
 +-----------------------+---------------+

#. Create QoS specifications with the prerequisite values above:

   .. code-block:: console

      $ openstack volume qos create --consumer back-end \
                                    --property DistributionType=Always \
                                    my_qos

#. Associate QoS specifications with specified volume type:

   .. code-block:: console

      $ openstack volume qos associate my_qos my_volume_type


#. Create volume with the volume type indicated above:

   .. code-block:: console

      $ openstack volume create --size 1 --type my_volume_type my_volume

**Outcome - PowerMax (storage group)**

- Host I/O Limit (MB/Sec) -     ``No Limit``
- Host I/O Limit (IO/Sec) -     ``No Limit``
- Set Dynamic Distribution -    ``N/A``

**Outcome - Block Storage (Cinder)**

Volume is created against volume type and there is no QoS change.

10. Multi-pathing support
-------------------------

- Install ``open-iscsi`` on all nodes on your system if on an iSCSI setup.
- Do not install EMC PowerPath as they cannot co-exist with native multi-path
  software
- Multi-path tools must be installed on all Nova compute nodes

On Ubuntu:

.. code-block:: console

   # apt-get install multipath-tools      #multipath modules
   # apt-get install sysfsutils sg3-utils #file system utilities
   # apt-get install scsitools            #SCSI tools

On openSUSE and SUSE Linux Enterprise Server:

.. code-block:: console

   # zipper install multipath-tools      #multipath modules
   # zipper install sysfsutils sg3-utils #file system utilities
   # zipper install scsitools            #SCSI tools

On Red Hat Enterprise Linux and CentOS:

.. code-block:: console

   # yum install iscsi-initiator-utils   #ensure iSCSI is installed
   # yum install device-mapper-multipath #multipath modules
   # yum install sysfsutils sg3-utils    #file system utilities


Multipath configuration file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The multi-path configuration file may be edited for better management and
performance. Log in as a privileged user and make the following changes to
``/etc/multipath.conf`` on the  Compute (Nova) node(s).

.. code-block:: vim

   devices {
   # Device attributed for EMC PowerMax
       device {
               vendor "EMC"
               product "SYMMETRIX"
               path_grouping_policy multibus
               getuid_callout "/lib/udev/scsi_id --page=pre-spc3-83 --whitelisted --device=/dev/%n"
               path_selector "round-robin 0"
               path_checker tur
               features "0"
               hardware_handler "0"
               prio const
               rr_weight uniform
               no_path_retry 6
               rr_min_io 1000
               rr_min_io_rq 1
       }
   }

You may need to reboot the host after installing the MPIO tools or restart
iSCSI and multi-path services.

On Ubuntu iSCSI:

.. code-block:: console

   # service open-iscsi restart
   # service multipath-tools restart

On Ubuntu FC

.. code-block:: console

   # service multipath-tools restart


On openSUSE, SUSE Linux Enterprise Server, Red Hat Enterprise Linux, and
CentOS iSCSI:

.. code-block:: console

   # systemctl restart open-iscsi
   # systemctl restart multipath-tools


On openSUSE, SUSE Linux Enterprise Server, Red Hat Enterprise Linux, and
CentOS FC:

.. code-block:: console

   # systemctl restart multipath-tools


.. code-block:: console

   $ lsblk
   NAME                                       MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
   sda                                          8:0    0     1G  0 disk
   ..360000970000196701868533030303235 (dm-6) 252:6    0     1G  0 mpath
   sdb                                          8:16   0     1G  0 disk
   ..360000970000196701868533030303235 (dm-6) 252:6    0     1G  0 mpath
   vda                                        253:0    0     1T  0 disk

OpenStack configurations
~~~~~~~~~~~~~~~~~~~~~~~~

On Compute (Nova) node, add the following flag in the ``[libvirt]`` section of
``nova.conf`` and ``nova-cpu.conf``:

.. code-block:: ini

   volume_use_multipath = True

On Cinder controller node, multi-path for image transfer can be enabled in
``cinder.conf`` for each backend section or in ``[backend_defaults]`` section
as a common configuration for all backends.

.. code-block:: ini

   use_multipath_for_image_xfer = True

Restart ``nova-compute`` and ``cinder-volume`` services after the change.

Verify you have multiple initiators available on the compute node for I/O
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#. Create a 3GB PowerMax volume.
#. Create an instance from image out of native LVM storage or from PowerMax
   storage, for example, from a bootable volume
#. Attach the 3GB volume to the new instance:

   .. code-block:: console

      # multipath -ll
      mpath102 (360000970000196700531533030383039) dm-3 EMC,SYMMETRIX
      size=3G features='1 queue_if_no_path' hwhandler='0' wp=rw
      '-+- policy='round-robin 0' prio=1 status=active
      33:0:0:1 sdb 8:16 active ready running
      '- 34:0:0:1 sdc 8:32 active ready running

#. Use the ``lsblk`` command to see the multi-path device:

   .. code-block:: console

      # lsblk
      NAME                                       MAJ:MIN RM   SIZE RO TYPE
      sdb                                          8:0    0     3G  0 disk
      ..360000970000196700531533030383039 (dm-6) 252:6    0     3G  0 mpath
      sdc                                          8:16   0     3G  0 disk
      ..360000970000196700531533030383039 (dm-6) 252:6    0     3G  0 mpath
      vda


11. All Flash compression support
---------------------------------

On an All Flash array, the creation of any storage group has a compressed
attribute by default. Setting compression on a storage group does not mean
that all the devices will be immediately compressed. It means that for all
incoming writes compression will be considered. Setting compression ``off`` on
a storage group does not mean that all the devices will be uncompressed.
It means all the writes to compressed tracks will make these tracks
uncompressed.

.. note::

   This feature is only applicable for All Flash arrays, 250F, 450F, 850F
   and 950F and PowerMax 2000 and 8000. It was first introduced Solutions
   Enabler 8.3.0.11 or later and is enabled by default when associated with
   a Service Level. This means volumes added to any newly created storage
   groups will be  compressed.

Use case 1 - Compression disabled create, attach, detach, and delete volume
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#. Create a new volume type called ``POWERMAX_COMPRESSION_DISABLED``.
#. Set an extra spec ``volume_backend_name``.
#. Set a new extra spec ``storagetype:disablecompression = True``.
#. Create a new volume.
#. Check in Unisphere or SYMCLI to see if the volume
   exists in storage group ``OS-<srp>-<servicelevel>-<workload>-CD-SG``, and
   compression is disabled on that storage group.
#. Attach the volume to an instance. Check in Unisphere or SYMCLI to see if the
   volume exists in storage group
   ``OS-<shorthostname>-<srp>-<servicelevel/workload>-<portgroup>-CD``, and
   compression is disabled on that storage group.
#. Detach volume from instance. Check in Unisphere or symcli to see if the
   volume exists in storage group ``OS-<srp>-<servicelevel>-<workload>-CD-SG``,
   and compression is disabled on that storage group.
#. Delete the volume. If this was the last volume in the
   ``OS-<srp>-<servicelevel>-<workload>-CD-SG`` storage group,
   it should also be deleted.


Use case 2 - Retype from compression disabled to compression enabled
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#. Repeat steps 1-4 of Use case 1.
#. Create a new volume type. For example ``POWERMAX_COMPRESSION_ENABLED``.
#. Set extra spec ``volume_backend_name`` as before.
#. Set the new extra spec's compression as
   ``storagetype:disablecompression = False`` or DO NOT set this extra spec.
#. Retype from volume type ``POWERMAX_COMPRESSION_DISABLED`` to
   ``POWERMAX_COMPRESSION_ENABLED``.
#. Check in Unisphere or symcli to see if the volume exists in storage group
   ``OS-<srp>-<servicelevel>-<workload>-SG``, and compression is enabled on
   that storage group.

.. note::
   If extra spec ``storagetype:disablecompression`` is set on a VMAX-Hybrid_,
   it is ignored because compression is not an available feature on a
   VMAX-Hybrid_.


12. Oversubscription support
----------------------------

Please refer to the official OpenStack `over-subscription documentation`_ for
further information on using over-subscription with PowerMax.


13. Live migration support
--------------------------

**Non-live migration** (sometimes referred to simply as 'migration'). The
instance is shut down for a period of time to be moved to another hyper-visor.
In this case, the instance recognizes that it was rebooted.

**Live migration** (or 'true live migration'). Almost no instance downtime.
Useful when the instances must be kept running during the migration. The
different types of live migration are:

- **Shared storage-based live migration** Both hyper-visors have access to
  shared storage.

- **Block live migration** No shared storage is required. Incompatible with
  read-only devices such as CD-ROMs and Configuration Drive (config_drive).

- **Volume-backed live migration** Instances are backed by volumes rather than
  ephemeral disk.  For PowerMax volume-backed live migration, shared storage
  is required.

The PowerMax driver supports shared volume-backed live migration.

Architecture
~~~~~~~~~~~~

In PowerMax, A volume cannot belong to two or more FAST storage groups at the
same time. To get around this limitation we leverage both cascaded storage
groups and a temporary non-FAST storage group.

A volume can remain 'live' if moved between masking views that have the same
initiator group and port groups which preserves the host path.

During live migration, the following steps are performed by the PowerMax driver
on the volume:

#. Within the originating masking view, the volume is moved from the FAST
   storage group to the non-FAST storage group within the parent storage
   group.
#. The volume is added to the FAST storage group within the destination
   parent storage group of the destination masking view. At this point the
   volume belongs to two storage groups.
#. One of two things happen:

   - If the connection to the destination instance is successful, the volume
     is removed from the non-FAST storage group in the originating masking
     view, deleting the storage group if it contains no other volumes.
   - If the connection to the destination instance fails, the volume is
     removed from the destination storage group, deleting the storage group,
     if empty. The volume is reverted back to the original storage group.


Live migration configuration
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Please refer to the official OpenStack documentation on
`configuring migrations`_ and `live migration usage`_ for more information.

.. note::

   OpenStack Oslo uses an open standard for messaging middleware known as
   ``AMQP``. This messaging middleware (the RPC messaging system) enables the
   OpenStack services that run on multiple servers to talk to each other.
   By default, the RPC messaging client is set to timeout after 60 seconds,
   meaning if any operation you perform takes longer than 60 seconds to
   complete the operation will timeout and fail with the ERROR message
   ``Messaging Timeout: Timed out waiting for a reply to message ID``
   ``[message_id]``

   If this occurs, increase the ``rpc_response_timeout`` flag value in
   ``cinder.conf`` and ``nova.conf`` on all Cinder and Nova nodes and restart
   the services.

   What to change this value to will depend entirely on your own environment,
   you might only need to increase it slightly, or if your environment is
   under heavy network load it could need a bit more time than normal. Fine
   tuning is required here, change the value and run intensive operations to
   determine if your timeout value matches your environment requirements.

   At a minimum please set ``rpc_response_timeout`` to ``240``, but this will
   need to be raised if high concurrency is a factor. This should be
   sufficient for all Cinder backup commands also.


System configuration
~~~~~~~~~~~~~~~~~~~~

``NOVA-INST-DIR/instances/`` (for example, ``/opt/stack/data/nova/instances``)
has to be mounted by shared storage. Ensure that ``NOVA-INST-DIR`` (set with
``state_path`` in the ``nova.conf`` file) is the same on all hosts.

#. Configure your DNS or ``/etc/hosts`` and ensure it is consistent across all
   hosts. Make sure that the three hosts can perform name resolution with each
   other. As a test, use the ping command to ping each host from one another.

   .. code-block:: console

      $ ping HostA
      $ ping HostB
      $ ping HostC

#. Export ``NOVA-INST-DIR/instances`` from ``HostA``, and ensure it is readable
   and writable by the Compute user on ``HostB`` and ``HostC``. Please refer to
   the relevant OS documentation for further details, for example
   `Ubuntu NFS Documentation`_

#. On all compute nodes, enable the ``execute/search`` bit on your shared
   directory to allow ``qemu`` to be able to use the images within the
   directories. On all hosts, run the following command:

   .. code-block:: console

       $ chmod o+x NOVA-INST-DIR/instances

.. note::

   If migrating from compute to controller, make sure to run step two above on
   the controller node to export the instance directory.


Use case
~~~~~~~~

For our use case shown below, we have three hosts with host names ``HostA``,
``HostB`` and ``HostC``. ``HostA`` is the controller node while ``HostB`` and
``HostC`` are the compute nodes. The following were also used in live
migration.

- 2GB bootable volume using the CirrOS image.
- Instance created using the 2GB volume above with a flavor ``m1.small`` using
  2048 RAM, 20GB of Disk and 1 VCPU.

#. Create a bootable volume.

   .. code-block:: console

      $ openstack volume create --size 2 \
                                --image cirros-0.3.5-x86_64-disk \
                                --volume_lm_1

#. Launch an instance using the volume created above on ``HostB``.

   .. code-block:: console

      $ openstack server create --volume volume_lm_1 \
                                --flavor m1.small \
                                --nic net-id=private \
                                --security-group default \
                                --availability-zone nova:HostB \
                                server_lm_1

#. Confirm on ``HostB`` has the instance created by running:

   .. code-block:: console

      $ openstack server show server_lm_1 | grep "hypervisor_hostname\|instance_name"
        | OS-EXT-SRV-ATTR:hypervisor_hostname | HostB
        | OS-EXT-SRV-ATTR:instance_name | instance-00000006

#. Confirm, through ``virsh`` using the instance_name returned in step 3
   (``instance-00000006``), on ``HostB`` that the instance is created using:

   .. code-block:: console

      $ virsh list --all

      Id   Name                  State
      --------------------------------
      1    instance-00000006     Running

#. Migrate the instance from ``HostB`` to ``HostA`` with:

   .. code-block:: console

      $ openstack server migrate --os-compute-api-version 2.30 \
                                 --live-migration --host HostA \
                                 server_lm_1

#. Run the command on step 3 above when the instance is back in available
   status. The hypervisor should be on Host A.

#. Run the command on Step 4 on Host A to confirm that the instance is
   created through ``virsh``.


14. Multi-attach support
------------------------

PowerMax cinder driver supports the ability to attach a volume to multiple
hosts/servers simultaneously. Please see the official OpenStack
`multi-attach documentation`_ for configuration information.

Multi-attach architecture
~~~~~~~~~~~~~~~~~~~~~~~~~

In PowerMax, a volume cannot belong to two or more FAST storage groups at the
same time. This can cause issues when we are attaching a volume to multiple
instances on different hosts. To get around this limitation, we leverage both
cascaded storage groups and non-FAST storage groups (i.e. a storage group with
no service level, workload, or SRP specified).

.. note::

   If no service level is assigned to the volume type, no extra work on the
   backend is required – the volume is attached to and detached from each
   host as normal.

Example use case
~~~~~~~~~~~~~~~~

Volume ``Multi-attach-Vol-1`` (with a multi-attach capable volume type, and
associated with a Diamond Service Level) is attached to Instance
``Multi-attach-Instance-A`` on HostA. We then issue the command to attach
``Multi-attach-Vol-1`` to ``Multi-attach-Instance-B`` on HostB:

#. In the ``HostA`` masking view, the volume is moved from the FAST managed
   storage group to the non-FAST managed storage group within the parent
   storage group.

#. The volume is attached as normal on ``HostB`` – i.e., it is added to a FAST
   managed storage group within the parent storage group of the ``HostB``
   masking view. The volume now belongs to two masking views, and is exposed to
   both ``HostA`` and ``HostB``.

We then decide to detach the volume from ``Multi-attach-Instance-B`` on
``HostB``:

#. The volume is detached as normal from ``HostB`` – i.e., it is removed from
   the FAST managed storage group within the parent storage group of the
   ``HostB`` masking view – this includes cleanup of the associated elements
   if required. The volume now belongs to one masking view, and is no longer
   exposed to ``HostB``.

#. In the ``HostA`` masking view, the volume is returned to the FAST managed
   storage group from the non-FAST managed storage group within the parent
   storage group. The non-FAST managed storage group is cleaned up,
   if required.


15. Volume encryption support
-----------------------------

Encryption is supported through the use of OpenStack Barbican. Only front-end
encryption is supported, back-end encryption is handled at the hardware level
with `Data at Rest Encryption`_ (D@RE).

For further information on OpenStack Barbican including setup and configuration
please refer to the following `official Barbican documentation`_.


16. Volume metadata
-------------------

Volume metadata is returned to the user in both the Cinder Volume logs and
with volumes and snapshots created in Cinder via the UI or CLI.

16.1 Volume metadata in logs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If debug is enabled in the default section of ``cinder.conf``, PowerMax Cinder
driver will log additional volume information in the Cinder volume log,
on each successful operation.  The facilitates bridging the gap between
OpenStack and the Array by tracing and describing the volume from a VMAX/
PowerMax view point.

.. code-block:: console

   +------------------------------------+---------------------------------------------------------+
   | Key                                | Value                                                   |
   +------------------------------------+---------------------------------------------------------+
   | service_level                      | Gold                                                    |
   | is_compression_disabled            | no                                                      |
   | powermax_cinder_driver_version     | 3.2.0                                                   |
   | identifier_name                    | OS-819470ab-a6d4-49cc-b4db-6f85e82822b7                 |
   | openstack_release                  | 13.0.0.0b3.dev3                                         |
   | volume_id                          | 819470ab-a6d4-49cc-b4db-6f85e82822b7                    |
   | storage_model                      | PowerMax_8000                                           |
   | successful_operation               | delete                                                  |
   | default_sg_name                    | OS-DEFAULT_SRP-Gold-NONE-SG                             |
   | device_id                          | 01C03                                                   |
   | unisphere_for_powermax_version     | V9.0.0.9                                                |
   | workload                           | NONE                                                    |
   | openstack_version                  | 13.0.0                                                  |
   | volume_updated_time                | 2018-08-03 03:13:53                                     |
   | platform                           | Linux-4.4.0-127-generic-x86_64-with-Ubuntu-16.04-xenial |
   | python_version                     | 2.7.12                                                  |
   | volume_size                        | 20                                                      |
   | srp                                | DEFAULT_SRP                                             |
   | openstack_name                     | 90_Test_Vol56                                           |
   | storage_firmware_version           | 5978.143.144                                            |
   | serial_number                      | 000123456789                                            |
   +------------------------------------+---------------------------------------------------------+

16.2 Metadata in the UI and CLI
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

By default metadata will be set on all volume and snapshot objects created in
Cinder. This information represents the state of the object on the backend
PowerMax and will change when volume attributes are changed by performing
actions on them such as re-type or attaching to an instance.

.. code-block:: console

   demo@openstack-controller:~$ cinder show powermax-volume

   +--------------------------------+------------------------------------------------------------+
   | Property                       | Value                                                      |
   +--------------------------------+------------------------------------------------------------+
   | metadata                       | ArrayID : 000123456789                                     |
   |                                | ArrayModel : PowerMax_8000                                 |
   |                                | CompressionDisabled : False                                |
   |                                | Configuration : TDEV                                       |
   |                                | DeviceID : 0012F                                           |
   |                                | DeviceLabel : OS-d87edb98-60fd-49dd-bb0f-cc388cf6f3f4      |
   |                                | Emulation : FBA                                            |
   |                                | ReplicationEnabled : False                                 |
   |                                | ServiceLevel : Diamond                                     |
   |                                | Workload : None                                            |
   | name                           | powermax-volume                                            |
   +--------------------------------+------------------------------------------------------------+


17. Unisphere High Availability (HA) support
--------------------------------------------

This feature facilitates high availability of Unisphere for PowerMax servers,
allowing for one or more backup unisphere instances in the event of a loss in
connection to the primary Unisphere instance. The PowerMax driver will
cycle through the list of failover instances, trying each until a successful
connection is made. The ordering is first in, first out (FIFO), so the first
``u4p_failover_target`` specified in ``cinder.conf`` will be the first
selected, the second ``u4p_failover_target`` in ``cinder.conf`` will be the
second selected, and so on until all failover targets are exhausted.

Requirements
~~~~~~~~~~~~

- All required instances of Unisphere for PowerMax are set up and configured
  for the array(s)
- Array(s) are locally registered with the instance of Unisphere that will be
  used as a failover instance. There are two failover types, local and
  remote:

  - `Local failover` - Primary Unisphere is unreachable, failover to
    secondary local instance of Unisphere to resume normal operations at
    primary site.
  - `Remote failover` - Complete loss of primary site so primary instance of
    Unisphere is unreachable, failover to secondary instance of Unisphere at
    remote site to resume operations with the R2 array.

.. note::

   Replication must be configured in advance for remote failover to work
   successfully. Human intervention will also be required to failover from R1
   array to R2 array in Cinder using ``cinder failover-host`` command
   (see `Volume replication support`_ for replication setup details).

.. note::

   The remote target array must be registered as local to the remote instance
   of Unisphere

Configuration
~~~~~~~~~~~~~

The following configuration changes need to be made in ``cinder.conf`` under
the PowerMax backend stanza in order to support the failover to secondary
Unisphere. Cinder services will need to be restarted for changes to take
effect.

.. code-block:: console

   [POWERMAX_1]
   ...

   u4p_failover_timeout = 30
   u4p_failover_retries = 3
   u4p_failover_backoff_factor = 1
   u4p_failover_autofailback = True
   u4p_failover_target = san_ip:10.10.10.12,
                         san_api_port: 8443,
                         san_login:my_username,
                         san_password:my_password,
                         driver_ssl_cert_verify: False,
   u4p_failover_target = san_ip:10.10.10.13,
                         san_api_port: 8443
                         san_login:my_username,
                         san_password:my_password,
                         driver_ssl_cert_verify: True,
                         driver_ssl_cert_path: /path/to/my_unisphere_host.pem

.. note::

  ``u4p_failover_target`` key value pairs will need to be on the same
  line (separated by commas) in ``cinder.conf``. They are displayed on
  separated lines above for readability.

.. note::

   To add more than one Unisphere failover target create additional
   ``u4p_failover_target`` details for the Unisphere instance. These will be
   cycled through in a first-in, first-out (FIFO) basis, the first failover
   target in ``cinder.conf`` will be the first backup instance of Unisphere
   used by the PowerMax driver.


18. Rapid TDEV deallocation
---------------------------

The PowerMax driver can now leverage the enhanced volume delete feature-set
made available in the PowerMax 5978 Foxtail uCode release. These enhancements
allow volume deallocation & deletion to be combined into a single call.
Previously, volume deallocation & deletion were split into separate tasks;
now a single REST call is dispatched and a response code on the projected
outcome of their request is issued rapidly allowing other task execution to
proceed without the delay. No additional configuration is necessary, the
system will automatically determine when to use either the rapid or legacy
compliant volume deletion sequence based on the connected PowerMax array’s
metadata.


19. PowerMax online (in-use) device expansion
---------------------------------------------

.. table::

   +---------------------------------+-------------------------------------------+
   | uCode Level                     | Supported In-Use Volume Extend Operations |
   +----------------+----------------+--------------+--------------+-------------+
   | R1 uCode Level | R2 uCode Level | Sync         | Async        | Metro       |
   +================+================+==============+==============+=============+
   | 5978.711       | 5978.711       | Y            | Y            | Y           |
   +----------------+----------------+--------------+--------------+-------------+
   | 5978.711       | 5978.669       | Y            | Y            | Y           |
   +----------------+----------------+--------------+--------------+-------------+
   | 5978.711       | 5978.444       | Y            | Y            | Y           |
   +----------------+----------------+--------------+--------------+-------------+
   | 5978.711       | 5978.221       | Y            | Y            | N           |
   +----------------+----------------+--------------+--------------+-------------+
   | 5978.669       | 5978.669       | Y            | Y            | Y           |
   +----------------+----------------+--------------+--------------+-------------+
   | 5978.669       | 5978.444       | Y            | Y            | Y           |
   +----------------+----------------+--------------+--------------+-------------+
   | 5978.669       | 5978.221       | Y            | Y            | N           |
   +----------------+----------------+--------------+--------------+-------------+
   | 5978.444       | 5978.444       | Y            | Y            | Y           |
   +----------------+----------------+--------------+--------------+-------------+
   | 5978.444       | 5978.221       | Y            | Y            | N           |
   +----------------+----------------+--------------+--------------+-------------+
   | 5978.221       | 5978.221       | Y            | Y            | N           |
   +----------------+----------------+--------------+--------------+-------------+


Assumptions, restrictions and prerequisites
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- ODE in the context of this document refers to extending a volume where it
  is in-use, that is, attached to an instance.
- The ``allow_extend`` is only applicable on VMAX-Hybrid_ arrays or All Flash
  arrays with HyperMax OS. If included elsewhere, it is ignored.
- Where one array is a lower uCode than the other, the environment is limited
  to functionality of that of the lowest uCode level, i.e. if R1 is 5978.444
  and R2 is 5978.221, expanding a metro volume is not supported, both R1 and
  R2 need to be on 5978.444 uCode at a minimum.


20. PowerMax array and storage group tagging
--------------------------------------------

Unisphere for PowerMax 9.1 and later supports tagging of storage groups and
arrays, so the user can give their own 'tag' for ease of searching and/or
grouping.

Assumptions, restrictions and prerequisites
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- The storage group tag(s) is associated with a volume type extra spec key
  ``storagetype:storagegrouptags``.
- The array tag is associated with the backend stanza using key
  ``powermax_array_tag_list``. It expects a list of one or more comma
  separated values, for example
  ``powermax_array_tag_list=[value1,value2, value3]``
- They can be one or more values in a comma separated list.
- There is a 64 characters limit of letters, numbers, - and _.
- 8 tags are allowed per storage group and array.
- Tags cannot be modified once a volume has been created with that volume
  type. This is an OpenStack constraint.
- Tags can be modified on the backend stanza, but none will ever be removed,
  only added.
- There is no restriction on creating or deleting tags of OpenStack storage
  groups or arrays outside of OpenStack, for example  Unisphere for PowerMax
  UI.  The max number of 8 tags will apply however, as this is a Unisphere for
  PowerMax limit.

Set a storage group tag on a volume type:

.. code-block:: console

   $ openstack volume type set --property storagetype:storagegrouptags=myStorageGroupTag1,myStorageGroupTag2


Set an array tag on the PowerMax backend:

.. code-block:: console

   [POWERMAX_ISCSI]
   volume_driver = cinder.volume.drivers.dell_emc.powermax.iscsi.PowerMaxISCSIDriver
   volume_backend_name = POWERMAX_ISCSI
   san_ip = 10.10.10.10
   san_login = my_u4v_username
   san_password = my_u4v_password
   powermax_srp = SRP_1
   powermax_array = 000123456789
   powermax_port_groups = [OS-ISCSI-PG]
   powermax_array_tag_list = [openstack1, openstack2]


21. PowerMax short host name and port group name override
---------------------------------------------------------

This functionality allows the user to customize the short host name and port
group name that are contained in the PowerMax driver storage groups and
masking views names. For current functionality please refer to
`PowerMax naming conventions`_ for more details.

As the storage group name and masking view name are limited to 64 characters
the short host name needs to be truncated to 16 characters or less and port
group needs to be truncated to 12 characters or less.  This functionality
offers a little bit more flexibility to determine how these truncated
components should look.

.. note::

   Once the port group and short host name have been overridden with any
   new format, it is not possible to return to the default format or change
   to another format if any volumes are in an attached state. This is because
   there is no way to determine the overridden format once
   ``powermax_short_host_name_template` or ``powermax_port_group_name_template``
   have been removed or changed.

Assumptions, restrictions, and prerequisites
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Backward compatibility with old format is preserved.
- ``cinder.conf`` will have 2 new configuration options,
  ``short_host_name_template`` and ``port_group_name_template``.
- If a storage group, masking view or initiator group in the old naming
  convention already exists, this remains and any new attaches will use
  the new naming convention where the label for the short host name
  and/or port group has been customized by the user.
- Only the short host name and port group name components can be renamed
  within the storage group, initiator group and masking view names.
- If the ``powermax_short_host_name_template`` and
  ``powermax_port_group_name_template`` do not adhere to the rules, then
  the operation will fail early and gracefully with a clear description as
  to the problem.
- The templates cannot be changed once volumes have been attached using the
  new configuration.
- If only one of the templates are configured, then the other will revert to
  the default option.
- The UUID is generated from the MD5 hash of the full short host name
  and port group name
- If ``userdef`` is used, the onus is on the user to make sure it will be
  unique among all short host names (controller and compute nodes) and
  unique among port groups.


.. table:: Short host name templates

   +-----------------------------------+-------------------------------------+------------------------------------+
   | powermax_short_host_name_template |        Description                  | Rule                               |
   +===================================+=====================================+====================================+
   | shortHostName                     | This is the default option          | Existing functionality, if over 16 |
   |                                   |                                     | characters then see                |
   |                                   |                                     | `PowerMax naming conventions`_,    |
   |                                   |                                     | otherwise short host name          |
   +-----------------------------------+-------------------------------------+------------------------------------+
   | shortHostName[:x])uuid[:x]        | First x characters of the short     | Must be less than 16 characters    |
   | e.g.                              | host name and x uuid                |                                    |
   | shortHostName[:6]uuid[:9]         | characters created from md5         |                                    |
   |                                   | hash of short host name             |                                    |
   +-----------------------------------+-------------------------------------+------------------------------------+
   | shortHostName[:x]userdef          | First x characters of the short     | Must be less than 16 characters    |
   | e.g.                              | host name and a user defined x char |                                    |
   | shortHostName[:6]-testHost        | name. NB - the responsibility is on |                                    |
   |                                   | the user for uniqueness             |                                    |
   +-----------------------------------+-------------------------------------+------------------------------------+
   | shortHostName[-x:]uuid[:x]        | Last x characters of the short      | Must be less than 16 characters    |
   | e.g.                              | host name and x uuid                |                                    |
   | shortHostName[-6:]uuid[:9]        | characters created from md5         |                                    |
   |                                   | hash of short host name             |                                    |
   +-----------------------------------+-------------------------------------+------------------------------------+
   | shortHostName[-x:]userdef         | Last x characters of the short      | Must be less than 16 characters    |
   | e.g.                              | host name and a user defined x char |                                    |
   | shortHostName[-6:]-testHost       | name. NB - the responsibility is on |                                    |
   |                                   | the user for uniqueness             |                                    |
   +-----------------------------------+-------------------------------------+------------------------------------+


.. table:: Port group name templates

   +-----------------------------------+-------------------------------------+------------------------------------+
   | powermax_port_group_name_template |        Description                  | Rule                               |
   +===================================+=====================================+====================================+
   | portGroupName                     | This is the default option          | Existing functionality, if over 12 |
   |                                   |                                     | characters then see                |
   |                                   |                                     | `PowerMax naming conventions`_,    |
   |                                   |                                     | otherwise port group name          |
   +-----------------------------------+-------------------------------------+------------------------------------+
   | portGroupName[:x])uuid[:x]        | First x characters of the port      | Must be less than 12 characters    |
   | e.g.                              | group name and x uuid               |                                    |
   | portGroupName[:6]uuid[:5]         | characters created from md5         |                                    |
   |                                   | hash of port group name             |                                    |
   +-----------------------------------+-------------------------------------+------------------------------------+
   | portGroupName[:x]userdef          | First x characters of the port      | Must be less than 12 characters    |
   | e.g.                              | group name and a user defined x char|                                    |
   | portGroupName[:6]-test            | name. NB - the responsibility is on |                                    |
   |                                   | the user for uniqueness             |                                    |
   +-----------------------------------+-------------------------------------+------------------------------------+
   | portGroupName[-x:]uuid[:x]        | Last x characters of the port       | Must be less than 12 characters    |
   | e.g.                              | group name and x uuid               |                                    |
   | portGroupName[-6:]uuid[:5]        | characters created from md5         |                                    |
   |                                   | hash of port group name             |                                    |
   +-----------------------------------+-------------------------------------+------------------------------------+
   | portGroupName[-x:]userdef         | Last x characters of the port       | Must be less than 12 characters    |
   | e.g.                              | group name and a user defined x char|                                    |
   | portGroupName[-6:]-test           | name. NB - the responsibility is on |                                    |
   |                                   | the user for uniqueness             |                                    |
   +-----------------------------------+-------------------------------------+------------------------------------+


21. Snap ids replacing generations
----------------------------------

Snap ids were introduced to the PowerMax in microcde 5978.669.669 and
Unisphere for PowerMax 9.2.  Generations existed previously and could cause
stale data if deleted out of sequence, even though we locked against this
occurence.  This happened when the newer generation(s) inherited its deleted
predecessors generation number.  So in a series of 0, 1, 2 and 3 generations,
if generation 1 gets deleted, generation 2 now becomes generation 1 and
generation 3 becomes generation 2 and so on down the line.
Snap ids are unique to each snapVX and will not change once assigned at
creation so out of sequence deletions are no longer an issue.
Generations will remain for arrays with microcode less than 5978.669.669.


Cinder supported operations
===========================

Volume replication support
--------------------------


.. note::

   A mix of ``RDF1+TDEV`` and ``TDEV`` volumes should not exist in the same
   storage group. This can happen on a cleanup operation after breaking the
   pair and a 'TDEV' remains in the storage group on either the local or
   remote array. If this happens, remove the volume from the storage
   group so that further replicated volume operations can continue.
   For example,  Remove ``TDEV`` from ``OS-[SRP]-[SL]-[WL]-RA-SG``.

.. note::

   Replication storage groups should exist on both local and remote array but
   never on just one. For example, if OS-[SRP]-[SL]-[WL]-RA-SG exists on
   local array A it must also exist on remote array B. If this condition
   does not hold, further replication operations will fail. This applies
   to management storage groups in the case of ``Asynchronous`` and ``Metro``
   modes also. See :ref:`my-table`.

.. note::

   The number of devices in replication storage groups in both local and
   remote arrays should be same. This also applies to management storage
   groups in ``Asynchronous`` and ``Metro`` modes. See :ref:`my-table`.



Configure a single replication target
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#. Configure an SRDF group between the chosen source and target
   arrays for the PowerMax Cinder driver to use. The source array must
   correspond with the ``powermax_array`` entry in ``cinder.conf``.
#. Select both the director and the ports for the SRDF emulation to use on
   both sides. Bear in mind that network topology is important when choosing
   director endpoints. Supported modes are ``Synchronous``, ``Asynchronous``,
   and ``Metro``.

   .. note::

      If the source and target arrays are not managed by the same Unisphere
      server (that is, the target array is remotely connected to server -
      for example, if you are using embedded management), in the event of a
      full disaster scenario (i.e. the primary array is completely lost and
      all connectivity to it is gone), the Unisphere server would no longer
      be able to contact the target array. In this scenario, the volumes would
      be automatically failed over to the target array, but administrator
      intervention would be required to either; configure the target (remote)
      array as local to the current Unisphere server (if it is a stand-alone
      server), or enter the details of a second Unisphere server to the
      ``cinder.conf``, which is locally connected to the target array (for
      example, the embedded management Unisphere server of the target array),
      and restart the Cinder volume service.

   .. note::

      If you are setting up an SRDF/Metro configuration, it is recommended that
      you configure a Witness or vWitness for bias management. Please see the
      `SRDF Metro Overview & Best Practices`_ guide for more information.

   .. note::
      The PowerMax Cinder drivers do not support Cascaded SRDF.

   .. note::

      The transmit idle functionality must be disabled on the R2 array for
      Asynchronous rdf groups. If this is not disabled it will prevent failover
      promotion in the event of access to the R1 array being lost.

      .. code-block:: console

         # symrdf -sid <sid> -rdfg <rdfg> set rdfa -transmit_idle off

   .. note::

      When creating RDF enabled volumes, if there are existing volumes in the
      target storage group, all rdf pairs related to that storage group must
      have the same rdf state i.e. rdf pair states must be consistent across
      all volumes in a storage group when attempting to create a new replication
      enabled volume. If mixed rdf pair states are found during a volume creation
      attempt, an error will be raised by the rdf state validation checks.
      In this event, please wait until all volumes in the storage group have
      reached a consistent state.

#. Enable replication in ``/etc/cinder/cinder.conf``.
   To enable the replication functionality in PowerMax Cinder driver, it is
   necessary to create a replication volume-type. The corresponding
   back-end stanza in ``cinder.conf`` for this volume-type must then
   include a ``replication_device`` parameter. This parameter defines a
   single replication target array and takes the form of a list of key
   value pairs.

   .. code-block:: console

      enabled_backends = POWERMAX_FC_REPLICATION
      [POWERMAX_FC_REPLICATION]
      volume_driver = cinder.volume.drivers.dell_emc.powermax.fc.PowerMaxFCDriver
      san_ip = 10.10.10.10
      san_login = my_u4v_username
      san_password = my_u4v_password
      powermax_srp = SRP_1
      powermax_array = 000123456789
      powermax_port_groups = [OS-FC-PG]
      volume_backend_name = POWERMAX_FC_REPLICATION
      replication_device = target_device_id:000197811111,
                           remote_port_group:os-failover-pg,
                           remote_pool:SRP_1,
                           rdf_group_label: 28_11_07,
                           mode:Metro,
                           metro_use_bias:False,
                           sync_interval:3,
                           sync_retries:200

   .. note::
      ``replication_device`` key value pairs will need to be on the same
      line (separated by commas) in ``cinder.conf``. They are displayed here on
      separate lines above for improved readability.

   * ``target_device_id`` The unique PowerMax array serial number of the
     target array. For full failover functionality, the source and target
     PowerMax arrays must be discovered and managed by the same U4V server.

   * ``remote_port_group`` The name of a PowerMax port group that has been
     pre-configured to expose volumes managed by this backend in the event
     of a failover. Make sure that this port group contains either all FC or
     all iSCSI port groups (for a given back end), as appropriate for the
     configured driver (iSCSI or FC).

   * ``remote_pool`` The unique pool name for the given target array.

   * ``rdf_group_label`` The name of a PowerMax SRDF group that has been
     pre-configured between the source and target arrays.

   * ``mode`` The SRDF replication mode. Options are ``Synchronous``,
     ``Asynchronous``, and ``Metro``. This defaults to ``Synchronous`` if not
     set.

   * ``metro_use_bias`` Flag to indicate if 'bias' protection should be
     used instead of Witness. This defaults to False.

   * ``sync_interval`` How long in seconds to wait between intervals for SRDF
     sync checks during Cinder PowerMax SRDF operations. Default is 3 seconds.

   * ``sync_retries`` How many times to retry RDF sync checks during Cinder
     PowerMax SRDF operations. Default is 200 retries.

   * ``allow_extend`` Only applicable to VMAX-Hybrid_ arrays or All Flash
     arrays running HyperMax OS (5977). It is a flag for
     allowing the extension of replicated volumes. To extend a volume in
     an SRDF relationship, this relationship must first be broken, the R1
     device extended, and a new device pair established. If not explicitly set,
     this flag defaults to ``False``.

     .. note::

        As the SRDF link must be severed, due caution should be exercised when
        performing this operation. If absolutely necessary, only one source and
        target pair should be extended at a time (only only applicable to
        VMAX-Hybrid_ arrays or All Flash arrays with HyperMax OS).


#. Create a ``replication-enabled`` volume type. Once the
   ``replication_device`` parameter has been entered in the PowerMax
   backend entry in the ``cinder.conf``, a corresponding volume type
   needs to be created ``replication_enabled`` property set. See
   above `Create volume types`_ for details.

   .. code-block:: console

      # openstack volume type set --property replication_enabled="<is> True" \
                            POWERMAX_FC_REPLICATION

   .. note::
      Service Level and Workload: An attempt will be made to create a storage
      group on the target array with the same service level and workload
      combination as the primary. However, if this combination is unavailable
      on the target (for example, in a situation where the source array is a
      VMAX-Hybrid_, the target array is an All Flash, and an All
      Flash incompatible service level like Bronze is configured), no service
      level will be applied.

Configure multiple replication targets
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Setting multiple replication devices in cinder.conf allows the use of all the
supported replication modes simultaneously. Up to three replication devices
can be set, one for each of the replication modes available. An additional
volume type ``extra spec`` (``storagetype:replication_device_backend_id``) is
then used to determine which replication device should be utilized when
attempting to perform an operation on a volume which is replication enabled.
All details, guidelines and recommendations set out in the
`Configure a single replication target`_ section also apply in a multiple
replication device scenario.

Multiple replication targets limitations and restrictions:
    #. There can only be one of each replication mode present across all of the
       replication devices set in ``cinder.conf``.
    #. Details for ``target_device_id``, ``remote_port_group`` and
       ``remote_pool`` should be identical across replication devices.
    #. The ``backend_id`` and ``rdf_group_label`` values must be unique across
       all replication devices.

Adding additional ``replication_device`` to cinder.conf:
    #. Open ``cinder.conf`` for editing
    #. If a replication device is already present, add the ``backend_id`` key
       with a value of ``backend_id_legacy_rep``. If this key is already
       defined, it's value must be updated to ``backend_id_legacy_rep``.
    #. Add the additional replication devices to the backend stanza. Any
       additional replication devices must have a ``backend_id`` key set. The
       value of these must ``not`` be ``backend_id_legacy_rep``.

Example existing backend stanza pre-multiple replication:

.. code-block:: console

   enabled_backends = POWERMAX_FC_REPLICATION

   [POWERMAX_FC_REPLICATION]
   volume_driver = cinder.volume.drivers.dell_emc.powermax.fc.PowerMaxFCDriver
   san_ip = 10.10.10.10
   san_login = my_u4v_username
   san_password = my_u4v_password
   powermax_srp = SRP_1
   powermax_array = 000123456789
   powermax_port_groups = [OS-FC-PG]
   volume_backend_name = POWERMAX_FC_REPLICATION
   replication_device = backend_id:id,
                        target_device_id:000197811111,
                        remote_port_group:os-failover-pg,
                        remote_pool:SRP_1,
                        rdf_group_label: 28_11_07,
                        mode:Metro,
                        metro_use_bias:False,
                        sync_interval:3,
                        sync_retries:200

Example updated backend stanza:

.. code-block:: console

   enabled_backends = POWERMAX_FC_REPLICATION

   [POWERMAX_FC_REPLICATION]
   volume_driver = cinder.volume.drivers.dell_emc.powermax.fc.PowerMaxFCDriver
   san_ip = 10.10.10.10
   san_login = my_u4v_username
   san_password = my_u4v_password
   powermax_srp = SRP_1
   powermax_array = 000123456789
   powermax_port_groups = [OS-FC-PG]
   volume_backend_name = POWERMAX_FC_REPLICATION
   replication_device = backend_id:backend_id_legacy_rep
                        target_device_id:000197811111,
                        remote_port_group:os-failover-pg,
                        remote_pool:SRP_1,
                        rdf_group_label: 28_11_07,
                        mode:Metro,
                        metro_use_bias:False,
                        sync_interval:3,
                        sync_retries:200
   replication_device = backend_id:sync-rep-id
                        target_device_id:000197811111,
                        remote_port_group:os-failover-pg,
                        remote_pool:SRP_1,
                        rdf_group_label: 29_12_08,
                        mode:Synchronous,
                        sync_interval:3,
                        sync_retries:200
   replication_device = backend_id:async-rep-id
                        target_device_id:000197811111,
                        remote_port_group:os-failover-pg,
                        remote_pool:SRP_1,
                        rdf_group_label: 30_13_09,
                        mode:Asynchronous,
                        sync_interval:3,
                        sync_retries:200

.. note::

    For environments without existing replication devices. The
    ``backend_id`` values can be set to any value for all replication devices.
    The ``backend_id_legacy_rep`` value is only needed when updating a legacy
    system with an existing replication device to use multiple replication
    devices.

The additional replication devices defined in ``cinder.conf`` will be detected
after restarting the cinder volume service.

To specify which ``replication_device`` a volume type should use an additional
property named ``storagetype:replication_device_backend_id`` must be added to
the extra specs of the volume type. The id value assigned to the
``storagetype:replication_device_backend_id`` key in the volume type must
match the ``backend_id`` assigned to the ``replication_device`` in
``cinder.conf``.

.. code-block:: console

  # openstack volume type set \
  --property storagetype:replication_device_backend_id="<id>" \
  <VOLUME_TYPE>

.. note::

    Specifying which replication device to use is done in addition to the
    basic replication setup for a volume type seen in
    `Configure a single replication target`_

.. note::

    In a legacy system where volume types are present that were replication
    enabled before adding multiple replication devices, the
    ``storagetype:replication_device_backend_id`` should be omitted from any
    volume type that does/will use the legacy ``replication_device`` i.e.
    when ``storagetype:replication_device_backend_id`` is omitted the
    replication_device with a ``backend_id`` of ``backend_id_legacy_rep``
    will be used.

Volume replication interoperability with other features
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Most features are supported, except for the following:

* Replication Group operations are available for volumes in Synchronous mode
  only.

* The Ussuri release of OpenStack supports retyping in-use volumes to and from
  replication enabled volume types with limited exception of volumes with
  Metro replication enabled. To retype to a volume-type that is Metro enabled
  the volume **must** first be detached then retyped. The reason for this is
  so the paths from the Nova instance to the Metro R1 & R2 volumes must be
  initialised, this is not possible on the R2 device whilst a volume is
  attached.

* The image volume cache functionality is supported (enabled by setting
  ``image_volume_cache_enabled = True``), but one of two actions must be taken
  when creating the cached volume:

  * The first boot volume created on a backend (which will trigger the
    cached volume to be created) should be the smallest necessary size.
    For example, if the minimum size disk to hold an image is 5GB, create
    the first boot volume as 5GB. All subsequent boot volumes are extended
    to the user specific size.
  * Alternatively, ensure that the ``allow_extend`` option in the
    ``replication_device parameter`` is set to ``True``. This is only
    applicable to VMAX-Hybrid_ arrays or All Flash array with HyperMax OS.


Failover host
~~~~~~~~~~~~~

.. note::

   Failover and failback operations are not applicable in Metro
   configurations.

In the event of a disaster, or where there is required downtime, upgrade
of the primary array for example, the administrator can issue the failover
host command to failover to the configured target:

.. code-block:: console

   # cinder failover-host cinder_host@POWERMAX_FC_REPLICATION

After issuing ``cinder failover-host`` Cinder will set the R2 array as the
target array for Cinder, however, to get existing instances to use this new
array and paths to volumes it is necessary to first shelve Nova instances and
then unshelve them, this will effectively restart the Nova instance and
re-establish data paths between Nova instances and the volumes on the R2 array.

.. code-block:: console

   # nova shelve <server>
   # nova unshelve [--availability-zone <availability_zone>] <server>

When a host is in failover mode performing normal volume or snapshot
provisioning will not be possible, failover host mode simply provides access
to replicated volumes to minimise environment down-time. The primary objective
whilst in failover mode should be to get the R1 array back online.  When the
primary array becomes available again, you can initiate a fail-back using the
same failover command and specifying ``--backend_id default``:

.. code-block:: console

   # cinder failover-host cinder_host@POWERMAX_FC_REPLICATION --backend_id default

After issuing the failover command to revert to the default backend host it is
necessary to re-issue the Nova shelve and unshelve commands to restore the
data paths between Nova instances and their corresponding back end volumes.
Once reverted to the default backend volume and snapshot provisioning
operations can continue as normal.

Failover promotion
~~~~~~~~~~~~~~~~~~

Failover promotion can be used to transfer all existing RDF enabled volumes
to the R2 array and overwrite any references to the original R1 array. This
can be used in the event of total R1 array failure or in other cases where
an array transfer is warranted. If the R1 array is online and working and the
RDF links are still enabled the failover promotion will automatically delete
rdf pairs as necessary. If the R1 array or the link to the R1 array is down,
a half deletepair must be issued manually for those volumes during the
failover promotion.

1. Issue failover command:

.. code-block:: console

   # cinder failover-host <host>

2. Enable array promotion:

.. code-block:: console

   # cinder failover-host --backend_id=pmax_failover_start_array_promotion <host>

3. View and re-enable the cinder service

.. code-block:: console

   # cinder service-list
   # cinder service-enable <host> <binary>

4. Remove all volumes from volume groups

.. code-block:: console

   # cinder --os-volume-api-version 3.13 group-update --remove-volumes <Vol1ID, etc..> <volume_group_name>

5. Detach all volumes that are attached to instances

.. code-block:: console

   # openstack server remove volume <instance_id> <volume_id>

.. note::

   Deleting the instance will call a detach volume for each attached volume.
   A terminate connection can be issued manually using the following command
   for volumes that are stuck in the attached state without an instance.

   .. code-block:: console

      # cinder --os-volume-api-version 3.50 attachment-delete <attachment_id>

6. Delete all remaining instances

.. code-block:: console

   # nova delete <instance_id>

7. Create new volume types

New volume types must be created with references to the remote array. All new
volume types must adhere to the following guidelines:

.. code-block:: text

    1. Uses the same workload, SLO & compression setting as the previous R1 volume type.
    2. Uses the remote array instead of the primary for its pool name.
    3. Uses the same volume_backend_name as the previous volume type.
    4. Must not have replication enabled.

Example existing volume type extra specs.

.. code-block:: text

   pool_name='Gold+None+SRP_1+000297900330', replication_enabled='<is> True',
   storagetype:replication_device_backend_id='async-rep-1', volume_backend_name='POWERMAX_ISCSI_NONE'

Example new volume type extra specs.

.. code-block:: text

   pool_name='Gold+None+SRP_1+000197900049', volume_backend_name='POWERMAX_ISCSI_NONE'

8. Retype volumes to new volume types

Additional checks will be performed during failover promotion retype to ensure
workload, compression and slo settings meet the criteria specified above when
creating the new volume types.

.. code-block:: console

   # cinder retype --migration-policy on-demand <volume> <volume_type>

.. note::

   If the volumes RDF links are offline during this retype then a half deletepair
   must be performed manually after retype. Please reference section 8.a. below
   for guidance on this process.

8.a. Retype and RDF half deletepair

In instances where the rdf links are offline and rdf pairs have been set to
partitioned state there are additional requirements. In that scenario the
following order should be adhered to:

.. code-block:: text

   1. Retype all Synchronous volumes.
   2. Half_deletepair all Synchronous volumes using the default storage group.
   3. Retype all Asynchronous volumes.
   4. Half_deletepair all Asynchronous volumes using their management storage group.
   5. Retype all Metro volumes.
   6. Half_deletepair all Metro volumes using their management storage group.
   7. Delete the Asynchronous and Metro management storage groups.

.. note::

   A half deletepair cannot be performed on Metro enabled volumes unless the
   symforce option has been enabled in the symapi options. In symapi/config/options
   uncomment and set 'SYMAPI_ALLOW_RDF_SYMFORCE = True'.

.. code-block:: console

   # symrdf -sid <sid> -sg <sg> -rdfg <rdfg> -force -symforce half_deletepair

9. Issue failback

Issuing the failback command will disable both the failover and promotion
flags. Please ensure all volumes have been retyped and all replication pairs
have been deleted before issuing this command.

.. code-block:: console

   # cinder failover-host --backend_id default <host>

10. Update cinder.conf

Update the cinder.conf file to include details for the new primary array. For
more information please see the Configure block storage in cinder.conf section
of this documentation.

11. Restart the cinder services

Restart the cinder volume service to allow it to detect the changes made to
the cinder.conf file.

12. Set Metro volumes to ready state

Metro volumes will be set to a Not Ready state after performing rdf pair
cleanup. Set these volumes back to Ready state to allow them to be attached
to instances. The U4P instance must be restarted for this change to be
detected.

.. code-block:: console

   # symdev -sid <sid> ready -devs <dev_id1, dev_id2>

Asynchronous and metro replication management groups
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Asynchronous and metro volumes in an RDF session, i.e. belonging to an SRDF
group, must be managed together for RDF operations (although there is a
``consistency exempt`` option for creating and deleting pairs in an Async
group). To facilitate this management, we create an internal RDF management
storage group on the backend. This RDF management storage group will use the
following naming convention:

.. code-block:: text

   OS-[rdf_group_label]-[replication_mode]-rdf-sg

It is crucial for correct management that the volumes in this storage group
directly correspond to the volumes in the RDF group. For this reason, it is
imperative that the RDF group specified in the ``cinder.conf`` is for the
exclusive use by this Cinder backend. If there are any issues with the state
of your RDF enabled volumes prior to performing additional operations in Cinder
you will be notified in the Cinder volume logs.


Metro support
~~~~~~~~~~~~~

SRDF/Metro is a high availability solution. It works by masking both sides of
the RDF relationship to the host, and presenting all paths to the host,
appearing that they all point to the one device. In order to do this,
there needs to be multi-path software running to manage writing to the
multiple paths.

.. note::

   The metro issue around formatting volumes when they are added to existing
   metro RDF groups has been fixed in Unisphere for PowerMax 9.1, however, it
   has only been addressed on arrays with PowerMax OS and will not be
   available on arrays running a HyperMax OS.


Volume retype - storage assisted volume migration
--------------------------------------------------

Volume retype with storage assisted migration is supported now for
PowerMax arrays. Cinder requires that for storage assisted migration, a
volume cannot be retyped across backends. For using storage assisted volume
retype, follow these steps:

.. note::

   From the Ussuri release of OpenStack the PowerMax driver supports retyping
   in-use volumes to and from replication enabled volume types with limited
   exception of volumes with Metro replication enabled. To retype to a
   volume-type that is Metro enabled the volume **must** first be detached
   then retyped. The reason for this is so the paths from the instance to the
   Metro R1 & R2 volumes must be initialised, this is not possible on the R2
   device whilst a volume is attached.

.. note::

   When multiple replication devices are configured. If retyping from one
   replication mode to another the R1 device ID is preserved and a new
   R2 side device is created. As a result, the device ID on the R2 array
   may be different after the retype operation has completed.

.. note::

   Retyping an in-use volume to a metro enabled volume type is not currently
   supported via storage-assisted migration. This retype can still be
   performed using host-assisted migration by setting the migration-policy
   to ``on-demand``.

   .. code-block:: console

      cinder retype --migration-policy on-demand <volume> <volume-type>

#. For migrating a volume from one Service Level or Workload combination to
   another, use volume retype with the migration-policy to on-demand. The
   target volume type should have the same volume_backend_name configured and
   should have the desired pool_name to which you are trying to retype to
   (please refer to `Create volume types`_ for details).

   .. code-block:: console

      $ cinder retype --migration-policy on-demand <volume> <volume-type>


Generic volume group support
----------------------------

Generic volume group operations are performed through the CLI using API
version 3.1x of the Cinder API. Generic volume groups are multi-purpose
groups which can be used for various features. The PowerMax driver supports
consistent group snapshots and replication groups. Consistent group
snapshots allows the user to take group snapshots which are consistent based
on the group specs. Replication groups allow for tenant facing APIs to enable
and disable replication, and to failover and failback, a group of volumes.
Generic volume groups have replaced the deprecated consistency groups.

Consistent group snapshot
~~~~~~~~~~~~~~~~~~~~~~~~~

To create a consistent group snapshot, set a group-spec, having the key
``consistent_group_snapshot_enabled`` set to ``<is> True`` on the group.

.. code-block:: console

   # cinder --os-volume-api-version 3.11 group-type-key GROUP_TYPE set consistent_group_snapshot_enabled="<is> True"

Similarly the same key should be set on any volume type which is specified
while creating the group.

.. code-block:: console

   # openstack volume type set --property consistent_group_snapshot_enabled="<is> True" POWERMAX_GROUP

If this key is not set on the group-spec or volume type, then the generic
volume group will be created/managed by Cinder (not the PowerMax driver).

.. note::

   The consistent group snapshot should not be confused with the PowerMax
   consistency group which is an SRDF construct.

Replication groups
~~~~~~~~~~~~~~~~~~

As with Consistent group snapshot ``consistent_group_snapshot_enabled`` should
be set to true on the group and the volume type for replication groups.
Only Synchronous replication is supported for use with Replication Groups.
When a volume is created into a replication group, replication is on by
default. The ``disable_replication`` api suspends I/O traffic on the devices,
but does NOT remove replication for the group. The ``enable_replication`` api
resumes I/O traffic on the RDF links. The ``failover_group`` api allows a group
to be failed over and back without failing over the entire host. See below for
usage.

.. note::

   A generic volume group can be both consistent group snapshot enabled and
   consistent group replication enabled.

Storage group names
~~~~~~~~~~~~~~~~~~~

Storage groups are created on the PowerMax as a result of creation of generic
volume groups. These storage groups follow a different naming convention
and are of the following format depending upon whether the groups have a
name.

.. code-block:: text

   TruncatedGroupName_GroupUUID or GroupUUID

Group type, group, and group snapshot operations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Please refer to the official OpenStack `block-storage groups`_ documentation
for the most up to date group operations

Group replication operations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Generic volume group operations no longer require the user to specify the
Cinder CLI version, however, performing generic volume group replication
operations still require this setting. When running generic volume group
commands set the value ``--os-volume-api-version`` to ``3.38``. These
commands are not listed in the latest Cinder CLI documentation so will
remain here until added to the latest Cinder CLI version or deprecated
from Cinder.

This is how to create a replication group.
Please refer to the official OpenStack `block-storage groups`_ documentation
for the most up to date group operations.

- Make sure there is a `replication_device` for Synchronous in `cinder.conf`

.. code-block:: console

   replication_device = backend_id:backend_id_legacy_rep,target_device_id:0001234567890,remote_port_group:PG1,remote_pool:SRP_1,rdf_group_label:os-sync,mode:Synchronous

- Create a volume type with property `replication_enabled=’<is> True’`.

.. code-block:: console

   $ openstack volume type create --property replication_enabled='<is> True' SYNC_REP_VT

- Create a Generic group type with extra specs
  `consistent_group_snapshot_enabled=’<is> True’` and
  `consistent_group_replication_enabled=’<is> True’`.

.. code-block:: console

  $ cinder --os-volume-api-version 3.38 group-type-create GROUP_REP_VT
  $ cinder --os-volume-api-version 3.38 group-type-key GROUP_REP_VT set \
    consistent_group_snapshot_enabled='<is> True' \
    consistent_group_replication_enabled='<is> True'

- Create a Generic group with synchronous volume type SYNC_REP_VT

.. code-block:: console

  $ cinder --os-volume-api-version 3.13 group-create --name GROUP_REP GROUP_REP_VT GROUP_REP_VT

- Create a volume in the Generic group

.. code-block:: console

  $ cinder --os-volume-api-version 3.38 create --volume-type SYNC_REP_VT --group-id GROUP_REP \
    --name VOL_REP_GROUP 1

- Enable group replication

.. code-block:: console

  $ cinder --os-volume-api-version 3.38 group-enable-replication GROUP_REP

- Disable group replication

.. code-block:: console

  $ cinder --os-volume-api-version 3.38 group-disable-replication GROUP_REP

- Failover group

.. code-block:: console

  $ cinder --os-volume-api-version 3.38 group-failover-replication GROUP_REP

- Failback group

.. code-block:: console

  $ cinder --os-volume-api-version 3.38 group-failover-replication GROUP_REP \
       --secondary-backend-id default


Manage and unmanage Volumes
---------------------------

Managing volumes in OpenStack is the process whereby a volume which exists
on the storage device is imported into OpenStack to be made available for use
in the OpenStack environment.  For a volume to be valid for managing into
OpenStack, the following prerequisites must be met:

- The volume exists in a Cinder managed pool

- The volume is not part of a Masking View

- The volume is not part of an SRDF relationship

- The volume is configured as a TDEV (thin device)

- The volume is set to FBA emulation

- The volume must a whole GB e.g. 5.5GB is not a valid size

- The volume cannot be a SnapVX target


For a volume to exist in a Cinder managed pool, it must reside in the same
Storage Resource Pool (SRP) as the backend which is configured for use in
OpenStack. Specifying the pool correctly can be entered manually as it follows
the same format:

.. code-block:: console

   Pool format: <service_level>+<srp>+<array_id>
   Pool example: Diamond+SRP_1+111111111111


.. list-table:: Pool values
   :header-rows: 1

   * - Key
     - Value
   * - ``service_level``
     - The service level of the volume to be managed
   * - ``srp``
     - The Storage Resource Pool configured for use by the backend
   * - ``array_id``
     - The PowerMax serial number (12 digit numerical)


Manage volumes
~~~~~~~~~~~~~~

With your pool name defined you can now manage the volume into OpenStack, this
is possible with the CLI command ``cinder manage``. The ``bootable`` parameter
is optional in the command, if the volume to be managed into OpenStack is not
bootable leave this parameter out. OpenStack will also determine the size of
the value when it is managed so there is no need to specify the volume size.

Command format:

.. code-block:: console

   $ cinder manage --name <new_volume_name> --volume-type <powermax_vol_type> \
     --availability-zone <av_zone> <--bootable> <host> <identifier>

Command Example:

.. code-block:: console

   $ cinder manage --name powermax_managed_volume --volume-type POWERMAX_ISCSI_DIAMOND \
     --availability-zone nova demo@POWERMAX_ISCSI_DIAMOND#Diamond+SRP_1+111111111111 031D8

After the above command has been run, the volume will be available for use in
the same way as any other OpenStack PowerMax volume.

.. note::

   An unmanaged volume with a prefix of ``OS-`` in its identifier name cannot
   be managed into OpenStack, as this is a reserved keyword for managed
   volumes. If the identifier name has this prefix, an exception will be thrown
   by the PowerMax driver on a manage operation.


Managing volumes with replication enabled
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Whilst it is not possible to manage volumes into OpenStack that are part of a
SRDF relationship, it is possible to manage a volume into OpenStack and
enable replication at the same time. This is done by having a replication
enabled PowerMax volume type (for more information see section Volume
Replication) during the manage volume process you specify the replication
volume type as the chosen volume type. Once managed, replication will be
enabled for that volume.

.. note::

   It is not possible to manage into OpenStack SnapVX linked target volumes,
   only volumes which are a SnapVX source are permitted. We do not want a
   scenario where a snapshot source can exist outside of OpenStack management.


Unmanage volume
~~~~~~~~~~~~~~~

Unmanaging a volume is not the same as deleting a volume. When a volume is
deleted from OpenStack, it is also deleted from the PowerMax at the same time.
Unmanaging a volume is the process whereby a volume is removed from OpenStack
but it remains for further use on the PowerMax. The volume can also be managed
back into OpenStack at a later date using the process discussed in the
previous section. Unmanaging volume is carried out using the Cinder unmanage
CLI command:

Command format:

.. code-block:: console

   $ cinder unmanage <volume_name/volume_id>

Command example:

.. code-block:: console

   $ cinder unmanage powermax_test_vol

Once unmanaged from OpenStack, the volume can still be retrieved using its
device ID or OpenStack volume ID. Within Unisphere you will also notice that
the ``OS-`` prefix has been removed, this is another visual indication that
the volume is no longer managed by OpenStack.


Manage/unmanage snapshots
-------------------------

Users can manage PowerMax SnapVX snapshots into OpenStack if the source volume
already exists in Cinder. Similarly, users will be able to unmanage OpenStack
snapshots to remove them from Cinder but keep them on the storage backend.

Set-up, restrictions and requirements:

#. No additional settings or configuration is required to support this
   functionality.

#. Manage/Unmanage snapshots requires SnapVX functionality support on PowerMax.

#. Manage/Unmanage Snapshots in OpenStack Cinder is only supported at present
   through Cinder CLI commands.

#. It is only possible to manage or unmanage one snapshot at a time in Cinder.

Manage SnapVX snapshot
~~~~~~~~~~~~~~~~~~~~~~

It is possible to manage PowerMax SnapVX snapshots into OpenStack, where the
source volume from which the snapshot is taken already exists in, and is
managed by OpenStack Cinder. The source volume may have been created in
OpenStack Cinder, or it may have been managed in to OpenStack Cinder also.
With the support of managing SnapVX snapshots included in OpenStack Queens,
the restriction around managing SnapVX source volumes has been removed.

.. note::

   It is not possible to manage into OpenStack SnapVX linked target volumes,
   only volumes which are a SnapVX source are permitted. We do not want a
   scenario where a snapshot source can exist outside of OpenStack management.


Requirements/restrictions:

#. The SnapVX source volume must be present in and managed by Cinder.

#. The SnapVX snapshot name must not begin with ``OS-``.

#. The SnapVX snapshot source volume must not be in a failed-over state.

#. Managing a SnapVX snapshot will only be allowed if the snapshot has no
   linked target volumes.


Command structure:

#. Identify your SnapVX snapshot for management on the PowerMax, note the name.

#. Ensure the source volume is already managed into OpenStack Cinder, note
   the device ID.

#. Using the Cinder CLI, use the following command structure to manage a
   Snapshot into OpenStack Cinder:


.. code-block:: console

   $ cinder snapshot-manage --id-type source-name
                            [--name <name>]
                            [--description <description>]
                            [--metadata [<key=value> [<key=value> ...]]]
                            <volume name/id> <identifier>

Positional arguments:

- ``<volume name/id>`` Source OpenStack volume name

- ``<identifier>`` Name of existing snapshot on PowerMax backend

Optional arguments:

- ``--name <name>`` Snapshot name (Default=``None``)

- ``--description <description>`` Snapshot description (Default=``None``)

- ``--metadata [<key=value> [<key=value> ...]]`` Metadata ``key=value`` pairs
  (Default=``None``)

Example:

.. code-block:: console

   $ cinder snapshot-manage --name SnapshotManaged \
                            --description "Managed Queens Feb18" \
                            powermax-vol-1 PowerMaxSnapshot

Where:

- The name in OpenStack after managing the SnapVX snapshot will be
  ``SnapshotManaged``.

- The snapshot will have the description ``Managed Queens Feb18``.

- The Cinder volume name is ``powermax-vol-1``.

- The name of the SnapVX snapshot on the PowerMax backend is
  ``PowerMaxSnapshot``.

Outcome:

After the process of managing the Snapshot has completed, the SnapVX snapshot
on the PowerMax backend will be prefixed by the letters ``OS-``, leaving the
snapshot in this example named ``OS-PowerMaxSnapshot``. The associated snapshot
managed by Cinder will be present for use under the name ``SnapshotManaged``.


Unmanage cinder snapshot
~~~~~~~~~~~~~~~~~~~~~~~~

Unmanaging a snapshot in Cinder is the process whereby the snapshot is removed
from and no longer managed by Cinder, but it still exists on the storage
backend. Unmanaging a SnapVX snapshot in OpenStack Cinder follows this
behaviour, whereby after unmanaging a PowerMax SnapVX snapshot from Cinder, the
snapshot is removed from OpenStack but is still present for use on the PowerMax
backend.

Requirements/Restrictions:

- The SnapVX source volume must not be in a failed over state.

Command Structure:

Identify the SnapVX snapshot you want to unmanage from OpenStack Cinder, note
the snapshot name or ID as specified by Cinder. Using the Cinder CLI use the
following command structure to unmanage the SnapVX snapshot from Cinder:

.. code-block:: console

   $ cinder snapshot-unmanage <snapshot>

Positional arguments:

- ``<snapshot>`` Cinder snapshot name or ID.

Example:

.. code-block:: console

   $ cinder snapshot-unmanage SnapshotManaged

Where:

- The SnapVX snapshot name in OpenStack Cinder is SnapshotManaged.

After the process of unmanaging the SnapVX snapshot in Cinder, the snapshot on
the PowerMax backend will have the ``OS-`` prefix removed to indicate it is no
longer OpenStack managed. In the example above, the snapshot after unmanaging
from OpenStack will be named ``PowerMaxSnapshot`` on the storage backend.

List manageable volumes and snapshots
-------------------------------------

Manageable volumes
~~~~~~~~~~~~~~~~~~

Volumes that can be managed by and imported into Openstack.

List manageable volume is filtered by:

- Volume size should be 1026MB or greater (1GB PowerMax Cinder Vol = 1026 MB)
- Volume size should be a whole integer GB capacity
- Volume should not be a part of masking view.
- Volume status should be ``Ready``
- Volume service state should be ``Normal``
- Volume emulation type should be ``FBA``
- Volume configuration should be ``TDEV``
- Volume should not be a system resource.
- Volume should not be ``private``
- Volume should not be ``encapsulated``
- Volume should not be ``reserved``
- Volume should not be a part of an RDF session
- Volume should not be a SnapVX Target
- Volume identifier should not begin with ``OS-``.
- Volume should not be in more than one storage group.

Manageable snaphots
~~~~~~~~~~~~~~~~~~~

Snapshots that can be managed by and imported into Openstack

List manageable snapshots is filtered by:

- The source volume should be marked as SnapVX source.
- The source volume should be 1026MB or greater
- The source volume should be a whole integer GB capacity.
- The source volume emulation type should be ``FBA``.
- The source volume configuration should be ``TDEV``.
- The source volume should not be ``private``.
- The source volume should be not be a system resource.
- The snapshot identifier should not start with ``OS-`` or ``temp-``.
- The snapshot should not be expired.
- The snapshot generation number should npt be greater than 0.

.. note::

   There is some delay in the syncing of the Unisphere for PowerMax database
   when the state/properties of a volume is modified using ``symcli``.  To
   prevent this it is preferable to modify state/properties of volumes within
   Unisphere.


Cinder backup support
---------------------

PowerMax Cinder driver support Cinder backup functionality. For further
information on setup, configuration and usage please see the official
OpenStack `volume backup`_ documentation and related `volume backup CLI`_
guide.

.. note::

   ``rpc_response_timeout`` may need to be increased significantly in volume
   backup operations especially in replication scenarios where the creation
   operation will be longer.  For more information on ``rpc_response_timeout``
   please refer to `Live migration configuration`_


Port group & port load balancing
--------------------------------

By default port groups are selected at random from ``cinder.conf`` when
connections are initialised between volumes on the backend array and
compute instances in Nova. If a port group is set in the volume type extra
specifications this will take precedence over any port groups configured in
``cinder.conf``. Port selection within the chosen port group is also selected
at random by default.

With port group and port load balancing in the PowerMax for Cinder driver users
can now select the port group and port load by determining which has the lowest
load. The load metric is defined by the user in both instances so the selection
process can better match the needs of the user and their environment. Available
metrics are detailed in the ``performance metrics`` section.

Port Groups are reported on at five minute time deltas (diagnostic), and FE
Ports are reported on at one minute time deltas (real-time) if real-time
metrics are enabled, else default five minute time delta (diagnostic). The
window at which performance metrics are analysed is a user-configured option in
``cinder.conf``, this is detailed in the ``configuration`` section.

Calculating load
~~~~~~~~~~~~~~~~

The process by which Port Group or Port load is calculated is the same for
both. The user specifies the look back window which determines how many
performance intervals to measure, 60 minutes will give 12 intervals of 5
minutes each for example.  If no lookback window is specified or is set to
0 only the most recent performance metric will be analysed. This will give a
slight performance improvement but with the improvements made to the
performance REST endpoints for load this improvement is negligible.
For real-time stats a minimum of 1 minute is required.

Once a call is made to the performance REST endpoints, the performance data for
that PG or port is extracted. Then the metric values are summed and divided by
the count of intervals to get the average for the look back window.

The performance metric average value for each asset is added to a Python heap.
Once all assets have been measured the lowest value will always be at position
0 in the heap so there is no extra time penalty requirement for search.


Pre-requisites
~~~~~~~~~~~~~~

Before load balancing can be enabled in the PowerMax for Cinder driver
performance metrics collection must be enabled in Unisphere. Real-time
performance metrics collection is enabled separately from diagnostic metrics
collection. Performance metric collection is only available for local arrays
in Unisphere.

After performance metrics registration there is a time delay before Unisphere
records performance metrics, adequate time must be given before enabling load
balancing in Cinder else default random selection method will be used. It is
recommended to wait 4 hours after performance registration before enabling
load balancing in Cinder.


Configuration
~~~~~~~~~~~~~

A number of configuration options are available for users so load balancing
can be set to better suit the needs of the environment. These configuration
options are detailed in the table below.

.. table:: Load balance cinder.conf configuration options

    +-----------------------------+----------------+-----------------+----------------------------------------+
    | ``cinder.conf parameter``   | options        | Default         | Description                            |
    +=============================+================+=================+========================================+
    |  ``load_balance``           | ``True/False`` | ``False``       | | Enable/disable load balancing for    |
    |                             |                |                 | | a PowerMax backend.                  |
    +-----------------------------+----------------+-----------------+----------------------------------------+
    | ``load_balance_real_time``  | ``True/False`` | ``False``       | | Enable/disable real-time performance |
    |                             |                |                 | | metrics for Port level metrics       |
    |                             |                |                 | | (not available for Port Group).      |
    +-----------------------------+----------------+-----------------+----------------------------------------+
    | ``load_data_format``        | ``Avg/Max``    | ``Avg``         | | Performance data format, not         |
    |                             |                |                 | | applicable for real-time.            |
    +-----------------------------+----------------+-----------------+----------------------------------------+
    | ``load_lookback``           | ``int``        | ``60``          | | How far in minutes to look back for  |
    |                             |                |                 | | diagnostic performance metrics in    |
    |                             |                |                 | | load calculation, minimum of 0       |
    |                             |                |                 | | maximum of 1440 (24 hours).          |
    +-----------------------------+----------------+-----------------+----------------------------------------+
    | ``load_real_time_lookback`` | ``int``        | ``1``           | | How far in minutes to look back for  |
    |                             |                |                 | | real-time performance metrics in     |
    |                             |                |                 | | load calculation, minimum of 1       |
    |                             |                |                 | | maximum of 60 (24 hours).            |
    +-----------------------------+----------------+-----------------+----------------------------------------+
    | ``port_group_load_metric``  | See below      | ``PercentBusy`` | | Metric used for port group load      |
    |                             |                |                 | | calculation.                         |
    +-----------------------------+----------------+-----------------+----------------------------------------+
    | ``port_load_metric``        | See below      | ``PercentBusy`` | | Metric used for port group load      |
    |                             |                |                 | | calculation.                         |
    +-----------------------------+----------------+-----------------+----------------------------------------+

Port-Group Metrics
~~~~~~~~~~~~~~~~~~

.. table:: Port-group performance metrics

    +-------------------+--------------------+-----------------------------------------------------------+
    | Metric            | cinder.conf option | Description                                               |
    +===================+====================+===========================================================+
    |  % Busy           | ``PercentBusy``    | The percent of time the port group is busy.               |
    +-------------------+--------------------+-----------------------------------------------------------+
    |  Avg IO Size (KB) | ``AvgIOSize``      | | Calculated value: (HA Kbytes transferred per sec /      |
    |                   |                    | | total IOs per sec)                                      |
    +-------------------+--------------------+-----------------------------------------------------------+
    |  Host IOs/sec     | ``IOs``            | | The number of host IO operations performed each second, |
    |                   |                    | | including writes and random and sequential reads.       |
    +-------------------+--------------------+-----------------------------------------------------------+
    |  Host MBs/sec     | ``MBs``            | The number of host MBs read each second.                  |
    +-------------------+--------------------+-----------------------------------------------------------+
    |  MBs Read/sec     | ``MBRead``         | The number of reads per second in MBs.                    |
    +-------------------+--------------------+-----------------------------------------------------------+
    |  MBs Written/sec  | ``MBWritten``      | The number of writes per second in MBs.                   |
    +-------------------+--------------------+-----------------------------------------------------------+
    |  Reads/sec        | ``Reads``          | The average number of host reads performed per second.    |
    +-------------------+--------------------+-----------------------------------------------------------+
    |  Writes/sec       | ``Writes``         | The average number of host writes performed per second.   |
    +-------------------+--------------------+-----------------------------------------------------------+

Port Metrics
~~~~~~~~~~~~

.. table:: Port performance metrics

    +---------------------+-----------------------+---------------------+------------------------------------------------------------+
    | Metric              | cinder.conf option    | Real-Time Supported |  Description                                               |
    +=====================+=======================+=====================+============================================================+
    |  % Busy             | ``PercentBusy``       |  Yes                |  The percent of time the port is busy.                     |
    +---------------------+-----------------------+---------------------+------------------------------------------------------------+
    |  Avg IO Size (KB)   | ``AvgIOSize``         |  Yes                |  | Calculated value: (HA Kbytes transferred per sec /      |
    |                     |                       |                     |  | total IOs per sec)                                      |
    +---------------------+-----------------------+---------------------+------------------------------------------------------------+
    |  Host IOs/sec       | ``IOs``               |  Yes                |  | The number of host IO operations performed each second, |
    |                     |                       |                     |  | including writes and random and sequential reads.       |
    +---------------------+-----------------------+---------------------+------------------------------------------------------------+
    |  Host MBs/sec       | ``MBs``               |  Yes                |  The number of host MBs read each second.                  |
    +---------------------+-----------------------+---------------------+------------------------------------------------------------+
    |  MBs Read/sec       | ``MBRead``            |  Yes                |  The number of reads per second in MBs.                    |
    +---------------------+-----------------------+---------------------+------------------------------------------------------------+
    |  MBs Written/sec    | ``MBWritten``         |  Yes                |  The number of writes per second in MBs.                   |
    +---------------------+-----------------------+---------------------+------------------------------------------------------------+
    |  Reads/sec          | ``Reads``             |  Yes                |  The number of read operations performed by the port per   |
    |                     |                       |                     |  second.                                                   |
    +---------------------+-----------------------+---------------------+------------------------------------------------------------+
    |  Writes/sec         | ``Writes``            |  Yes                |  The number of write operations performed each second by   |
    |                     |                       |                     |  the port.                                                 |
    +---------------------+-----------------------+---------------------+------------------------------------------------------------+
    |  Speed Gb/sec       | ``SpeedGBs``          |  No                 |  Speed.                                                    |
    +---------------------+-----------------------+---------------------+------------------------------------------------------------+
    |  Response Time (ms) | ``ResponseTime``      |  No                 |  The average response time for the reads and writes.       |
    +---------------------+-----------------------+---------------------+------------------------------------------------------------+
    |  Read RT (ms)       | ``ReadResponseTime``  |  No                 |  The average time it takes to serve one read IO.           |
    +---------------------+-----------------------+---------------------+------------------------------------------------------------+
    |  Write RT (ms)      | ``WriteResponseTime`` |  No                 |  The average time it takes to serve one write IO.          |
    +---------------------+-----------------------+---------------------+------------------------------------------------------------+


Upgrading from SMI-S based driver to REST API based driver
==========================================================

Seamless upgrades from an SMI-S based driver to REST API based driver,
following the setup instructions above, are supported with a few exceptions:

#. Seamless upgrade from SMI-S(Ocata and earlier) to REST(Pike and later)
   is now available on all functionality including Live Migration.

#. Consistency groups are deprecated in Pike. Generic Volume Groups are
   supported from Pike onwards.


Known issues
============

These known issues exist in the current release of OpenStack:

- `Launchpad #1951977`_ Cannot create backups for metro volumes with
  multipath enabled.

.. Document Hyperlinks
.. _Dell Support: https://www.dell.com/support
.. _Openstack CLI: https://docs.openstack.org/cinder/latest/cli/cli-manage-volumes.html#volume-types
.. _over-subscription documentation: https://docs.openstack.org/cinder/latest/admin/over-subscription.html
.. _configuring migrations: https://docs.openstack.org/nova/latest/admin/configuring-migrations.html
.. _live migration usage: https://docs.openstack.org/nova/latest/admin/live-migration-usage.html
.. _Ubuntu NFS Documentation: https://help.ubuntu.com/lts/serverguide/network-file-system.html
.. _multi-attach documentation: https://docs.openstack.org/cinder/latest/admin/volume-multiattach.html
.. _Data at Rest Encryption: https://www.dellemc.com/resources/en-us/asset/white-papers/products/storage/h13936-dell-emc-powermax-vmax-all-flash-data-rest-encryption.pdf
.. _official Barbican documentation: https://docs.openstack.org/cinder/latest/configuration/block-storage/volume-encryption.html
.. _SRDF Metro Overview & Best Practices: https://www.emc.com/collateral/technical-documentation/h14556-vmax3-srdf-metro-overview-and-best-practices-tech-note.pdf
.. _block-storage groups: https://docs.openstack.org/cinder/latest/admin/groups.html
.. _volume backup: https://docs.openstack.org/cinder/latest/configuration/block-storage/backup-drivers.html
.. _volume backup CLI: https://docs.openstack.org/python-openstackclient/latest/cli/command-objects/volume-backup.html
.. _PyU4V: https://pyu4v.readthedocs.io/en/latest/
.. _Create volume types: `6. Create volume types`_
.. _Launchpad #1951977: https://bugs.launchpad.net/cinder/+bug/1951977