Fix 3ware Disk

Rebuilding Degraded Disk in 3ware Controller through Server Console when  web UI doesn’t work

 

Use Below command to see controller type c1,c4 or c4.

 

#tw_cli info

 

Ctl   Model        (V)Ports  Drives   Units   NotOpt  RRate   VRate  BBU

————————————————————————

c4    9550SX-8LP   8         4        1       0       1       1      –  

 

Here controller is c4

Let’s see Units and drives of the controller.

 

# tw_cli  info c4

 

Unit  UnitType  Status         %Cmpl  Stripe  Size(GB)  Cache  AVerify  IgnECC

——————————————————————————

u0    RAID-5    REBUILDING     9      64K     4889.37   OFF    OFF      ON     

 

Port   Status           Unit   Size        Blocks        Serial

—————————————————————

p0     OK               u0     698.63 GB   1465149168    5VP0L8QR          

p1     OK               u0     698.63 GB   1465149168    5QD52LKJ          

p2     OK               u0     698.63 GB   1465149168    5QD4WGBF          

p3     OK               u0     698.63 GB   1465149168    9QK0WCZZ          

p4     DEGRADED         u0     698.63 GB   1465149168    5QD2SD8G          

p5     OK               u0     698.63 GB   1465149168    5QD2S7F1          

p6     OK               u0     698.63 GB   1465149168    5QD42ESY          

p7     OK               u0     698.63 GB   1465149168    5QD2QTHE          

 


Remove the disk from the controller port, be careful while removing.

# tw_cli maint remove c4 p4

 

Rescan the drive to be detected by the controller to rebuild it.

# tw_cli maint rescan

 

Rebuild the disk with particular unit and port inside controller.

#tw_cli maint rebuild c4 u0 p4

 

See the status of 3ware drive with the nagios command

#/home/nagios/nagios/libexec/tw_cli_64 /c4 show

 

Replacing the Fault Disk from the 3ware Controller.

 

Find the disk details of degraded disk.

#tw_cli info                                 – find the controller here it is c4

# tw_cli  info c4                         – Find the unit and port no of degraded disk in controller c4

 

Use smartctl command to find details of the degraded disk which need to be replaced, replace the disk with similar model no and disk size.

Syntax

smartctl -a -d 3ware,N /dev/tweY

The argument 3ware,N, the integer N is the disk number (3ware “port”) within the 3ware ATA RAID controller. The allowed values of N are from 0 to 31 inclusive

 

Here above we found that degraded port is p4 , hence let’s find the model and other details of disk.

#smartctl -a -d 3ware,4 /dev/twa0

 

=== START OF INFORMATION SECTION ===

Model Family:     Seagate Barracuda 7200.9

Device Model:     ST3500641AS

Serial Number:    3PM0D7KX

Firmware Version: 3.AAD

User Capacity:    500,107,862,016 bytes [500 GB]

Sector Size:      512 bytes logical/physical

Device is:        In smartctl database [for details use: -P show]

ATA Version is:   7

ATA Standard is:  Exact ATA specification draft version not indicated

Local Time is:    Wed Mar 15 18:36:16 2017 PDT

SMART support is: Available – device has SMART capability.

SMART support is: Enabled

 

Some 3ware controller we can use below tw_cli command to find disk model no.

# tw_cli /c4/p4 show all

Lets make the faulty disk offline.

Since we have already got information about the controller and the faulty disk unit and port. Now take the faulty drive offline. When using a command that changes something, you have to specify a full path to the thing you are changing. There is a nice help system too:

 

//test15/c4> /c4/p4 help

 

 /cx/px show                                                      

 /cx/px show Attribute [Attribute …]       where Attribute is:  

             status|model|firmware|serial|capacity|smart(SATA only)|

             driveinfo|ncq|identify|lspeed|(9550SX and higher)

             ports|connections|drvintf|wwn|(9690SA and higher)

             rasect|pohrs|temperature|spindlespd|(9650SE and higher)

 /cx/px show all                                                  

 /cx/px show dpmstat [type=<inst|ra|lct|histdata|ext>]

             (9550SX and higher, except for type=ext which is

              9650SE and higher; default: same as type=ra)

 

 /cx/px remove [quiet]

 

 /cx/px set identify=on|off                  (9550SX and higher)

 /cx/px set dpmstat=clear [type=<ra|lct|ext>]

            (9550SX and higher, except for type=ext which is

             9650SE and higher; default: same as type=ra)

 

So it’s the remove command we want:

/c4/p4 remove disk=1

 

At this point it is advisable to generate some disk activity and look at the activity lights to check that we have the right drive bay. See the GUI guide at the top of this document for that.


Once we have replaced the disk, use show again to see if the new disk is visible as a spare. If a new unit got created with that drive in it, use del to get rid of it,  BE CAREFUL TO DELETE THE RIGHT ONE!

 

/c4/u1 del


Now to rebuild. We will need the port number of the new drive (usually the same as the old one)

 

/c4/u0 rebuild disk=1

 

Then a show command will show how complete the rebuild is. You can exit the twe_cli at this point, then to check on progress, do this from the root prompt:

 

tw_cli /c4 show

 

(assuming the controller is c4)

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s