Tag Archives: 3ware

3ware RAID Controller

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.

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.
https://www.3ware.com/3warekb/article.aspx?id=11647
https://www.3ware.com/3warekb/article.aspx?id=11956
https://www.3ware.com/3warekb/article.aspx?id=11306

This Howto is copied from the old gentoo wiki. Since the wiki is down and i need this information quite often.