Search:  
Gentoo Wiki

3ware_RAID_controller

This article is part of the Hardware series.
Laptops TV Tuner Cards Wireless Servers Storage Other Hardware Motherboards Related

If the computer your are working on has a 3ware controller, you can use a command to check the RAID, and rebuild it if it's degraded.

Contents

Determine the controller

To determine the controller, run this command...

Code: Output of lspci
00:00.0 Host bridge: Intel Corp. E7501 Memory Controller Hub (rev 01)
00:00.1 Class ff00: Intel Corp. E7000 Series Host RASUM Controller (rev 01)
00:02.0 PCI bridge: Intel Corp. E7000 Series Hub Interface B PCI-to-PCI Bridge (rev 01)
00:1d.0 USB Controller: Intel Corp. 82801CA/CAM USB (Hub #1) (rev 02)
00:1d.1 USB Controller: Intel Corp. 82801CA/CAM USB (Hub #2) (rev 02)
00:1d.2 USB Controller: Intel Corp. 82801CA/CAM USB (Hub #3) (rev 02)
00:1e.0 PCI bridge: Intel Corp. 82801BA/CA/DB/EB/ER Hub interface to PCI Bridge (rev 42)
00:1f.0 ISA bridge: Intel Corp. 82801CA LPC Interface Controller (rev 02)
00:1f.1 IDE interface: Intel Corp. 82801CA Ultra ATA Storage Controller (rev 02)
00:1f.3 SMBus: Intel Corp. 82801CA/CAM SMBus Controller (rev 02)
01:1c.0 PIC: Intel Corp. 82870P2 P64H2 I/OxAPIC (rev 04)
01:1d.0 PCI bridge: Intel Corp. 82870P2 P64H2 Hub PCI Bridge (rev 04)
01:1e.0 PIC: Intel Corp. 82870P2 P64H2 I/OxAPIC (rev 04)
01:1f.0 PCI bridge: Intel Corp. 82870P2 P64H2 Hub PCI Bridge (rev 04)
02:01.0 RAID bus controller: 3ware Inc 3ware 7000-series ATA-RAID (rev 01)
02:03.0 Ethernet controller: Intel Corp. 82546EB Gigabit Ethernet Controller (Copper) (rev 01)
02:03.1 Ethernet controller: Intel Corp. 82546EB Gigabit Ethernet Controller (Copper) (rev 01)
03:01.0 Ethernet controller: Intel Corp. 82546GB Gigabit Ethernet Controller (rev 03)
03:01.1 Ethernet controller: Intel Corp. 82546GB Gigabit Ethernet Controller (rev 03)
04:01.0 VGA compatible controller: ATI Technologies Inc Rage XL (rev 27)

Here we can see that we have a 3ware 7000 series card installed. To manage it, we'll use the tw_cli package.

Install Driver

Most drivers are located in the kernel Device Drivers > SCSI Dev Support > SCSI low-level drivers > 3ware XXXX

Dont forget to enable SCSI disk support and i think you also need to enable Multi-device support (RAID and LVM).

Install Software

Before downloading this software, you must agree to 3ware's License. Because this package has fetch restrictions turned on, you must download the software from 3ware Software Download Center.

Be sure to select the correct software version and architecture. Place the downloaded file in your DISTDIR (typically /usr/portage/distfiles).

Finally, install the tw_cli package:

# emerge tw_cli

Check the card

To enter the 3ware command line interface, type tw_cli. Enter ? or help to view help. For more information about the 3ware CLI, see the man page or the 3ware knowledge base linked at the bottom of this document.

First we need some info on our setup:

Code: Getting info on setup
3ware CLI> info
List of controllers
-------------------
Controller 0: 8006-2LP (2)

Here we see that we have one controller 0 with two drives. Let's get more info on controller 0.

Code: Getting info on controller 0
3ware CLI> info c0
Controller: c0
-------------
Driver:   1.02.00.033
Model:    8006-2LP
FW:       FE7S 1.05.00.065
BIOS:     BE7X 1.08.00.048
Monitor:  ME7X 1.01.00.038
Serial #: F14902A4110263
PCB:      Rev5
PCHIP:    1.30-66
ACHIP:    3.20


# of units: 1
        Unit 0: RAID 1 111.79 GB ( 234439600 blocks): DEGRADED

# of ports: 2
        Port 0: WDC WD1200JD-22GBB0 WD-WMAET1426272 111.79 GB (234441648 blocks): OK(unit 0)
        Port 1: WDC WD1200JD-00GBB0 WD-WMAET1626327 111.79 GB (234441648 blocks): OK(unit 0)

Now we can see the RAID at unit 0 is degraded. Let's find out which disk is giving us a problem. For the rest of the document, I'll exit from the program and run it as a command instead.

Code: Finding out which disk is degraded
[root@myputer ~]# tw_cli info c0 u0
Unit /c0/u0
---------------------
Status:        DEGRADED
Unit Type:     RAID 1
Stripe Size:   N/A
Size:          111.79 GB (234439600 blocks)
# of subunits: 2

        Subunit 0:    CBOD: OK
        Physical Port: 0
        Logical  Port: 0

        Subunit 1:    CBOD: DEGRADED
        Physical Port: 1
        Logical  Port: 1

Ok, port 1 is the disk that needs our attention.

Rebuild The RAID

First we need to remove the drive. This is like unmounting a filesystem so that we can work on it.

Code: Removing the drive
[root@myputer ~]# tw_cli maint remove c0 p1
Removing port /c0/p1 ... Done.

Now let's have the software rescan the drives.

Code: Rescaning the drives
[root@myputer ~]# tw_cli maint rescan c0
Rescanning controller /c0 for units and drives ...Done.

At this point, we need to see if the rescan picked the drive back up. If the port is N/A this is likey a bad drive and isn't responding. You'll need to replace the drive and rescan:

Code: Checking if the rescan picked the drive back up

(Third party note: This is confusing, ignore this block. I suspect that this is supposed to be an example of a drive that is N/A, not a continuation of the example.)

[root@myputer ~]# tw_cli info c0 u0
Unit /c0/u0
---------------------
Status:        DEGRADED
Unit Type:     RAID 1
Stripe Size:   N/A
Size:          111.79 GB (234439600 blocks)
# of subunits: 2

        Subunit 0:    CBOD: DEGRADED
        Physical Port: N/A
        Logical  Port: 0

        Subunit 1:    CBOD: OK
        Physical Port: 1
        Logical  Port: 1

Otherwise all that's left to do is rebuild the drive.

Code: Rebuilding the drive
[root@myputer ~]# tw_cli maint rebuild c0 u0 p1
Rebuild started on unit /c0/u0

To check the status, just give it the info option

Code: Checking the status
[root@myputer ~]# tw_cli info c0 u0
Unit /c0/u0
---------------------
Status:        REBUILDING (0%)
Unit Type:     RAID 1
Stripe Size:   N/A
Size:          111.79 GB (234439600 blocks)
# of subunits: 2

        Subunit 0:    CBOD: OK
        Physical Port: 0
        Logical  Port: 0

        Subunit 1:    CBOD: DEGRADED
        Physical Port: 1
        Logical  Port: 1

Since it's rebuilding as it's running, this could take a really long time.
---
addendum for version tw_cli-linux-x86_64-9.3.0.2.tgz on AMD_64:
---


Output may also look like this (here drive p0 was DEGRADED):

server ~ # tw_cli info c0 u0

Unit     UnitType  Status         %Cmpl  Port  Stripe  Size(GB)  Blocks
-----------------------------------------------------------------------
u0       RAID-1    REBUILDING     0      -     -       298.09    625140400
u0-0     DISK      DEGRADED       -      p0    -       298.09    625140400
u0-1     DISK      OK             -      p1    -       298.09    625140400

More Information

3ware Knowledge Base

Man page for tw_cli

Some notes from 3ware support

They said the way it should be done:

Assuming port0 is bad
1.tw_cli maint remove c0 p0
2. remove the Old drive and Hotswap a new drive
3. tw_cli maint rescan c0
This will bring the new drive up
4. tw_cli maint createunit c0 rspare p0
5. tw_cli maint rebuild c0 u0 p0


Check our knowledge base article's for rebuild information.
http://3ware.com/kb/article.aspx?id=11647
http://3ware.com/kb/article.aspx?id=11956
http://3ware.com/kb/article.aspx?id=11306


Something about 3dm2 (webserver for Raid Maintainence) & 3ware support

You really should read: http://bugs.gentoo.org/show_bug.cgi?id=60690

Retrieved from "http://www.gentoo-wiki.info/3ware_RAID_controller"

Last modified: Sun, 31 Aug 2008 08:19:00 +0000 Hits: 23,872