Server RAID : A Brief guide.
To start, RAID is a concept introduced by Patterson, Gibson and Katz of the University of California Berkeley in 1987. But it has gained its popularity a few years back. Nowadays it has became one of the most heard words in a webhosting industry.
Let’s have a look into it.
What is RAID?
RAID, an acronym for Redundant Arrays of Inexpensive Disks. As the name implies the disk drives are independent, and are multiple in number. The data distribution between these drives depends on the RAID level used. It can also be defined as a data storage structure that allows a data center to combine two or more physical storage devices (HDDs, SSDs, or both) into a logical unit that is seen by the attached system as a single drive.
The total array capacity depends on the type of RAID array you build and the number and size of disk drives.
The main advantage of RAID is that, to the operating system the array of disks can be presented as a single disk. It has the ability to improve performance and protect data in the event of a system crash because the controller has the ability to access multiple copies of data on multiple physical devices. It’s fault tolerant because in most of the RAID levels data is redundant in multiple disks. Even though if any one of the disk is failed, the data can be recovered from the disk that are not failed.
A RAID controller can be a hardware device or software program and it doesn’t have any
impact on RAID array capacity. Based on the implementation RAID controllers can be classified as hardware-based or software-based.
I am going to briefly explain about hardware-based RAID controller.
A hardware RAID controller has its own processor and memory to run the RAID application. It resides on a PCI-X or PCIe controller card, or on a motherboard-integrated RAID-on-Chip (ROC). Thus, there is no additional load on the computer’s CPU for controlling the RAID array. Modern RAID controllers also support SATA or SAS & SATA hard disks as hard disks with SATA or SAS interfaces are available today..
Let’s start with how to identify a hardware RAID.
The simplest way to identify whether a system uses a software or hardware RAID is by executing below command.
lspci -vv | grep -i raid
The output of above command will show which raid conroller is used in that system.
There are different types of RAID controllers & commonly used are 3-ware, Adaptec & Mega RAID.
Let’s begin with 3-ware and follow with Adaptec & Mega RAID.
3ware RAID controllers use RAID to increase your storage system’s performance and provide fault tolerance (protection against data loss). The 3ware CLI provides the functionality available in 3DM 2 through a Command Line Interface. You can view unit status and version information and perform maintenance functions such as adding or removing drives, and reconfiguring RAID units online. You can also use it to remotely administer controllers in a system.
To enter the 3ware command line interface, type tw_cli or /usr/local/ysa/bin/tw_cli.
The list of commands and the usage is described below :
/usr/local/ysa/bin/tw_cli info ; gives the list of controllers
/usr/local/ysa/bin/tw_cli info c0 (contrller number) ; gives details of the controller.
Sample output is provied below :
/usr/local/ysa/bin/tw_cli info c0
Unit UnitType Status %RCmpl %V/I/M Stripe Size(GB) Cache AVrfy
u0 RAID-1 OK – – – 465.651 ON OFF
u1 SINGLE OK – – – 931.312 ON OFF
Port Status Unit Size Blocks Serial
p0 OK u0 465.76 GB 976773168 5VMVJQG0
p1 OK u0 465.76 GB 976773168 S2A26L22
p2 OK u1 931.51 GB 1953525168 S1DBDKPP
p3 NOT-PRESENT – – – –
//sever> maint rescan c0 ; to rescan controller
//server> maint remove c0 p0 ; to remove a drive from raid
//server> maint rebuild c0 u0 p0 ; to initiate raid rebuilding
The Adaptec RAID Controller utility is a BIOS-based utility that you can use to create and manage controllers, disk drives and other devices, and arrays. This can be used to monitor and manage all the controllers and disk drives in your storage space from a single location.
You can access the Adaptec commandline utility from /usr/StorMan/arcconf
/usr/StorMan/arcconf GETCONFIG AL ; to get controller infromation
/usr/StorMan/arcconf GETCONFIG 1 AD ; to get details of controller information
/usr/StorMan/arcconf GETCONFIG 1 LD; tget o logical drive information
/usr/StorMan/arcconf RESCAN 1 ; to rescan controller
/usr/StorMan/arcconf getstatus 1 ; shows the status of raid
/usr/StorMan/arcconf getconfig 1 PD|egrep “Device #|State\>|Reported Location|Reported Channel|S.M.A.R.T. warnings” ; To see SMART and other warnings
I will share some tips to manage MegaRAID using cli. MegaRAID (MegaCli) commands are usullay lengthy. Storcli will help us to manage Mega RAID arrays much better, without the use of long commands.
Let’s look how we can manage a megaRAID using storcli :
storcli show ; shows a summary of controller and controller-associated information for the system
storcli /cx show ; shows the summary of the controller information
storcli /cx/vx show ; shows the summary of the virtual drive information.
storcli /c0/pall show ; shows details of all physical drives.
storcli /c0/vall show ; shows details of all virtual drives.
A sample output is shown below :
[root@server ~]# storcli /c0/vall show
Controller = 0
Status = Success
Description = None
Virtual Drives :
DG/VD TYPE State Access Consist Cache sCC Size Name
0/0 RAID10 Optl RW Yes NRWTD – 3.636 TB
Optl=Optimal|RO=Read Only|RW=Read Write|B=Blocked|Consist=Consistent|
R=Read Ahead Always|NR=No Read Ahead|WB=WriteBack|AWB=Always WriteBack|
WT=WriteThrough|C=Cached IO|D=Direct IO|sCC=Scheduled Check Consistency
March 20, 2020