In this article, you will learn how to work with Adaptec hardware RAID controller.
How to read the status of the hardware-based RAID
To read the status of the Adaptec RAID Controller, the Adaptec command-line tool arcconf must be installed.
You can get the current status of the RAID by using the following command:
arcconf GETCONFIG 1 LD
Example RAID 1:
Controllers found: 1
----------------------------------------------------------------------
Logical device information
----------------------------------------------------------------------
Logical device number 0
Logical device name :
RAID level : 1
Status of logical device : Optimal
Size : 714742 MB
Read-cache mode : Enabled
MaxIQ preferred cache setting : Enabled
MaxIQ cache setting : Disabled
Write-cache mode : Enabled (write-back)
Write-cache setting : Enabled (write-back)
Partitioned : Yes
Protected by Hot-Spare : No
Bootable : Yes
Failed stripes : No
Power settings : Disabled
--------------------------------------------------------
Logical device segment information
--------------------------------------------------------
Segment 0 : Present (0,0) S13UJ1DPB05048
Segment 1 : Present (0,1) S13UJ1DQ201027
You can get the status of the drives by using the following command:
arcconf GETCONFIG 1 PD
As this command also generates a quantity of useless information, it is advisable to filter the output. For example, you can use:
arcconf getconfig 1 pd|egrep "Device #|State\>|Reported Location|Reported Channel|S.M.A.R.T. warnings|Model|Serial number"
How to set up a hardware-based RAID
Regardless of whether you just need to make changes to the mode of an existing RAID or if you need to set up a new RAID (after installing a controller), the first thing you should do is to delete the drives from their logical drives:
arcconf DELETE <Controller#> LOGICALDRIVE <ld#>
for example:
arcconf DELETE 1 LOGICALDRIVE 0
or all:
arcconf DELETE 1 LOGICALDRIVE ALL
Now you can set up a new RAID. For this, the state of your disks has to be Ready. If your disks are still in the Raw (Pass Through) state, you need to initialize the disks:
Syntax:
arcconf TASK START <Controller#> DEVICE <Channel# ID#> INITIALIZE
To initialize all of your disks which are connected to the RAID controller at once, you can use ALL
:
arcconf TASK START 1 DEVICE ALL INITIALIZE
Syntax:
arcconf CREATE <Controller#> LOGICALDRIVE [Options] <Size> <RAID#> <Channel# ID#> [Channel# ID#]
- Create RAID 0 (maximum size, drives on Channel 0, Port 0 and 1, no confirmation):
arcconf CREATE 1 LOGICALDRIVE MAX 0 0 0 0 1 noprompt
- Create RAID 1 (maximum size, drives on Channel 0, Port 0 and 1, no confirmation):
arcconf CREATE 1 LOGICALDRIVE MAX 1 0 0 0 1 noprompt
- Create RAID 5 (maximum size, drives on Channel 0, Port 0, 1 and 2, no confirmation):
arcconf CREATE 1 LOGICALDRIVE MAX 5 0 0 0 1 0 2 noprompt
- Create RAID 10 (maximum size, drives on Channel 0, Port 0, 1, 2 and 3, no confirmation):
arcconf CREATE 1 LOGICALDRIVE MAX 10 0 0 0 1 0 2 0 3 noprompt
- Create RAID 6 (maximum size, drives on Channel 0, Slot 0 – 14, no confirmation):
arcconf CREATE 1 LOGICALDRIVE MAX 6 0 4 0 5 0 6 0 7 0 8 0 9 0 10 0 11 0 12 0 13 0 14 0 15 0 16 0 17 0 18 noprompt
- JBOD (single drive on Channel 0, Port 2):
arcconf CREATE 1 JBOD 0 2 noprompt
How to start a REBUILD using arcconf with a DEGRADED RAID
First, check to see if all the drives are recognized:
arcconf GETCONFIG 1 PD
If they are not, you can launch a manual rescan:
arcconf RESCAN 1
The status of the RAID should then be shown as being degraded:
root@rescue ~ # arcconf getconfig 1 ld
Controllers found: 1
----------------------------------------------------------------------
Logical device information
----------------------------------------------------------------------
Logical device number 0
Logical device name : Device 0
RAID level : 1
Status of logical device : Degraded
Size : 1428470 MB
Read-cache mode : Enabled
Write-cache mode : Enabled (write-back)
Write-cache setting : Enabled (write-back)
Partitioned : No
Protected by Hot-Spare : No
Bootable : Yes
Failed stripes : No
Power settings : Disabled
--------------------------------------------------------
Logical device segment information
--------------------------------------------------------
Segment 0 : Inconsistent (0,0) 9VS38R1D
Segment 1 : Present (0,1) 9VS38RKE
Now it may be necessary to delete the metadata:
arcconf TASK START 1 DEVICE 0 0 CLEAR
Since automatic failover mode is enabled, the rebuild should have already started. If it has not, the drive is manually added to the RAID as a hot spare. The rebuild starts automatically:
arcconf SETSTATE 1 DEVICE 0 0 HSP LOGICALDRIVE 0
After a RAID rebuild on a hot spare drive, the drive remains as a hot spare. After replacing the defective drive, data automatically migrates back. It is also possible to remove a hot spare designation via arcconf and to mark the new replacement drive as a new hot spare.
Here’s an example on how to set Device 0;0 on Controller 1 from hot spare to ready:
arcconf setstate 1 device 0 0 rdy
How to read the SMART values of the drive in RAID
The sg module helps to access the physical drives behind the controller, for example, for the first drive:
smartctl -d sat -a /dev/sg1
On a Smart Raid Controller, you can check the SMART values with the following command.
smartctl -d cciss,0 -i /dev/sg0
With AACRAID:
smartctl -d aacraid,0,0,0 -i /dev/sg0
Depending on the operating system, you may need to upgrade the smartmontools or the kernel.
How to restore a faulty array
If an array is detected, but has the status offline or failed, it is possible to force the array to be activated or to be recreated — and to not lose data. However, there is no guarantee that you will be able to recover the data. Data loss may still occur. You can find more information at: Ask Adaptec
It is possible in some circumstances to bring an array back online using the following command:
arcconf SETSTATE <Controller#> LOGICALDRIVE <LD#> OPTIMAL [ADVANCED <option>] [noprompt]
An example for the first array on the first controller would be:
arcconf SETSTATE 1 LOGICALDRIVE 0 OPTIMAL ADVANCED nocheck noprompt
Backing up and restoring the configuration of the controller
To save the configuration of the controller and all arrays:
arcconf saveconfig config.xml
This command will save the config to /var/log/config.xml
.
To restore the configuration of the controller:
arcconf playconfig /path/to/config.xml