How to create logical drive in HP Smart Storage Array Configuration CLI hpssacli ?
Today lets have a look how to create a logical drive in hpssacli i.e. HP Smart storage array configuraiton interface.
To understand this, lets see the available unassigned disks and create a logical drive.
1. Viewing all controllers configuration
bash-4.2# hpssacli ctrl all show config Smart Array P440ar in Slot 0 (Embedded) (sn: PDNLH0BRH8L430) 12G SAS Exp Card at Port 1I, Box 1, OK Port Name: 1I Port Name: 2I array A (SAS, Unused Space: 0 MB) logicaldrive 1 (5.5 TB, RAID 5, OK) physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 1200.2 GB, OK) physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 1200.2 GB, OK) physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 1200.2 GB, OK) physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 1200.2 GB, OK) physicaldrive 1I:1:5 (port 1I:box 1:bay 5, SAS, 1200.2 GB, OK) physicaldrive 1I:1:6 (port 1I:box 1:bay 6, SAS, 1200.2 GB, OK) physicaldrive 1I:1:7 (port 1I:box 1:bay 7, SAS, 1200.2 GB, OK, spare) unassigned physicaldrive 1I:1:9 (port 1I:box 1:bay 9, SAS, 300 GB, OK) physicaldrive 1I:1:10 (port 1I:box 1:bay 10, SAS, 300 GB, OK) physicaldrive 1I:1:11 (port 1I:box 1:bay 11, SAS, 300 GB, OK) physicaldrive 1I:1:12 (port 1I:box 1:bay 12, SAS, 300 GB, OK) physicaldrive 1I:1:13 (port 1I:box 1:bay 13, SAS, 300 GB, OK) physicaldrive 1I:1:14 (port 1I:box 1:bay 14, SAS, 300 GB, OK) physicaldrive 1I:1:15 (port 1I:box 1:bay 15, SAS, 300 GB, OK) physicaldrive 1I:1:16 (port 1I:box 1:bay 16, SAS, 300 GB, OK) physicaldrive 1I:1:17 (port 1I:box 1:bay 17, SAS, 300 GB, OK) physicaldrive 1I:1:18 (port 1I:box 1:bay 18, SAS, 300 GB, OK) physicaldrive 1I:1:19 (port 1I:box 1:bay 19, SAS, 300 GB, OK) physicaldrive 1I:1:20 (port 1I:box 1:bay 20, SAS, 300 GB, OK) physicaldrive 1I:1:21 (port 1I:box 1:bay 21, SAS, 300 GB, OK) physicaldrive 1I:1:22 (port 1I:box 1:bay 22, SAS, 300 GB, OK) physicaldrive 1I:1:23 (port 1I:box 1:bay 23, SAS, 300 GB, OK) physicaldrive 1I:1:24 (port 1I:box 1:bay 24, SAS, 300 GB, OK) Enclosure SEP (Vendor ID HPE, Model 12G SAS Exp Card) 377 (WWID: 500424422BBC, Port: 1I, Box: 1) Expander 378 (WWID: 50014424234232BBD, Port: 1I, Box: 1) bash-4.2#
2. Creating a RAID 1+0 logical drive with 8 unassigned drives.
In this example, i am creating a RAID 1+0 logical drive, you can create a RAID 5, 0, or 1, as per your requirements.
### RAID 1+0 LD(Logical Drive) bash-4.2# hpssacli ctrl slot=0 create type=ld drives=1I:1:17,1I:1:18,1I:1:19,1I:1:20,1I:1:21,1I:1:22,1I:1:23,1I:1:24 raid=1+0
3. Viewing the created logical drive.
bash-4.2# hpssacli ctrl all show config Smart Array P440ar in Slot 0 (Embedded) (sn: PDNLH0BRH8L430) 12G SAS Exp Card at Port 1I, Box 1, OK Port Name: 1I Port Name: 2I array A (SAS, Unused Space: 0 MB) logicaldrive 1 (5.5 TB, RAID 5, OK) physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 1200.2 GB, OK) physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 1200.2 GB, OK) physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 1200.2 GB, OK) physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 1200.2 GB, OK) physicaldrive 1I:1:5 (port 1I:box 1:bay 5, SAS, 1200.2 GB, OK) physicaldrive 1I:1:6 (port 1I:box 1:bay 6, SAS, 1200.2 GB, OK) physicaldrive 1I:1:7 (port 1I:box 1:bay 7, SAS, 1200.2 GB, OK, spare) array B (SAS, Unused Space: 0 MB) logicaldrive 2 (1.1 TB, RAID 1+0, OK) physicaldrive 1I:1:17 (port 1I:box 1:bay 17, SAS, 300 GB, OK) physicaldrive 1I:1:18 (port 1I:box 1:bay 18, SAS, 300 GB, OK) physicaldrive 1I:1:19 (port 1I:box 1:bay 19, SAS, 300 GB, OK) physicaldrive 1I:1:20 (port 1I:box 1:bay 20, SAS, 300 GB, OK) physicaldrive 1I:1:21 (port 1I:box 1:bay 21, SAS, 300 GB, OK) physicaldrive 1I:1:22 (port 1I:box 1:bay 22, SAS, 300 GB, OK) physicaldrive 1I:1:23 (port 1I:box 1:bay 23, SAS, 300 GB, OK) physicaldrive 1I:1:24 (port 1I:box 1:bay 24, SAS, 300 GB, OK) unassigned physicaldrive 1I:1:9 (port 1I:box 1:bay 9, SAS, 300 GB, OK) physicaldrive 1I:1:10 (port 1I:box 1:bay 10, SAS, 300 GB, OK) physicaldrive 1I:1:11 (port 1I:box 1:bay 11, SAS, 300 GB, OK) physicaldrive 1I:1:12 (port 1I:box 1:bay 12, SAS, 300 GB, OK) physicaldrive 1I:1:13 (port 1I:box 1:bay 13, SAS, 300 GB, OK) physicaldrive 1I:1:14 (port 1I:box 1:bay 14, SAS, 300 GB, OK) physicaldrive 1I:1:15 (port 1I:box 1:bay 15, SAS, 300 GB, OK) physicaldrive 1I:1:16 (port 1I:box 1:bay 16, SAS, 300 GB, OK) Enclosure SEP (Vendor ID HPE, Model 12G SAS Exp Card) 377 (WWID: 50014adasda2BBC, Port: 1I, Box: 1) Expander 378 (WWID: 5001434243221BBD, Port: 1I, Box: 1)
We can see above a new array B is created with logical drive 2.
4. Viewing fdisk output to see a new disk created corresponding to logical drive.
bash-4.2# fdisk -l WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion. Disk /dev/sda: 6001.0 GB, 6001048248320 bytes, 11720797360 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 262144 bytes / 1310720 bytes Disk label type: gpt Disk identifier: 2FE8FE57-4645-484F-8346-05DE9BFC2338 # Start End Size Type Name 1 2560 1026559 500M EFI System EFI System Partition 2 1026560 2050559 500M Microsoft basic 3 2050560 11720796159 5.5T Linux LVM Disk /dev/sdb: 1199.9 GB, 1199864854528 bytes, 2343486044 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 262144 bytes / 1048576 bytes bash-4.2#
Hence we can see above a new RAID 1+0 disk or logical drive is setup which is known as /dev/sdb.
We can further create partitions on this drive as per our requirements.