Create RAID Disk using hpacucli in Linux

By Parthiban Ponnusamy


1. CHECK UNASSIGNED DRIVES THAT CAN BE USED 

server1:~ # hpacucli
HP Array Configuration Utility CLI 8.70-8.0
Detecting Controllers...Done.
Type "help" for a list of supported commands.
Type "exit" to close the console. 
 => hpacucli ctrl all show config 

Smart Array P400 in Slot 9 (sn: P61XXXXXXXXXN)
 array A (SAS, Unused Space: 0 MB)
 logicaldrive 1 (68.3 GB, RAID 1+0, OK)
 physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 72 GB, OK)
 physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 72 GB, OK)
 unassigned      
 physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 146 GB, OK)  
 physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 146 GB, OK) 

Note: Last two drives in the output are free and we gonna use them to create RAID  


2. NOW WE ARE GOING TO CREATE RAID 1+0 DISK ARRAY 

=> hpacucli ctrl slot=9 create type=logicaldrive drives=1I:1:3,1I:1:4 raid=1

3. VERIFY THAT THE DISK ARRAY WAS CREATED 

hpasmcli> hpacucli ctrl all show config
 Smart Array P400 in Slot 9 (sn: P61XXXXXXXXXN)
 array A (SAS, Unused Space: 0 MB)
 logicaldrive 1 (68.3 GB, RAID 1+0, OK)
 physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 72 GB, OK)
 physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 72 GB, OK)
 array B (SAS, Unused Space: 0 MB)   ß NEW DISK ARRAY
 logicaldrive 2 (136.7 GB, RAID 1+0, OK)
 physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 146 GB, OK)
 physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 146 GB, OK) 


VERIFY NEW DISK DRIVE WAS CREATED IN OS LEVEL (LINUX)

server1# cat /proc/driver/cciss/cciss0
cciss0: HP Smart Array P400 Controller
Board ID: 0x3234103c
Firmware Version: 5.20
IRQ: 74
Logical drives: 2
Sector size: 2048
Current Q depth: 0
Current # commands on controller: 0
Max Q depth since init: 9
Max # commands on controller since init: 331
Max SG entries since init: 31
Sequential access devices: 0
cciss/c0d0:       73.37GB       RAID 1(1+0)
cciss/c0d1:       146.7GB       RAID 1(1+0)



server1# fdisk -l | grep cciss
Disk /dev/cciss/c0d0: 73.3 GB, 73372631040 bytes
Disk /dev/cciss/c0d1: 146.7 GB, 146778685440 bytes

Solution for UNIX Error: Terminal too wide

By Parthiban Ponnusamy


When you are working in an UNIX shell using Putty tool, you may get this error.

Problem: 

When you are trying to open vi editor, you may get error message "Terminal too wide"

How to Fix this??

Enter the below command in the shell and try to open vi editor again. It will work.


stty columns 120

Hope this will help on someone.