My first disk on the raid failed. Found out (because I haven’t yet written a script) because the disk became read-only. And when I ran fdisk -l /dev/sda, it showed no partitions.

I ran tw_cli and got errors like this:

//pnn> info

Ctl   Model        Ports   Drives   Units   NotOpt   RRate   VRate   BBU
------------------------------------------------------------------------
c0    9550SX-8LP   8       6        1       1        4       4       -        
c1    9550SX-8LP   8       8        1       0        4       4       -        

//pnn> info c0

Unit  UnitType  Status         %Cmpl  Stripe  Size(GB)  Cache  AVerify  IgnECC
------------------------------------------------------------------------------
u0    RAID-5    INOPERABLE     -      64K     1629.74   OFF    OFF      OFF      

Port   Status           Unit   Size        Blocks        Serial
---------------------------------------------------------------
p0     OK               u0     233.76 GB   490234752     WD-WCANY1788981     
p1     OK               u0     233.76 GB   490234752     WD-WCANY1795430     
p2     OK               u0     233.76 GB   490234752     WD-WCANY1851853     
p3     OK               u0     233.76 GB   490234752     WD-WCANY1787889     
p4     NOT-PRESENT      -      -           -             -
p5     NOT-PRESENT      -      -           -             -
p6     OK               u0     233.76 GB   490234752     WD-WCANY1788370     
p7     OK               u0     233.76 GB   490234752     WD-WCANY1788683     

I’m not exactly sure why both p4 and p5 showed as not-present, but they did. The disk that was the problem was p4. (I found that out by running the command again, where it showed only p4 as the problem.)

To fix this, run:

/c0 remove p4 (or whichever disk is the problem)

Replace the disk with a new one.

/c0 rescan

Looking for something saying Found /c0/p4, but if you don’t find it, do a info c0.

Then, start the rebuild with:

/c0/u0 start rebuild disk=4

After this command, the info c0 shows:

//pnn> info c0

Unit  UnitType  Status         %Cmpl  Stripe  Size(GB)  Cache  AVerify  IgnECC
------------------------------------------------------------------------------
u0    RAID-5    REBUILDING     4      64K     1629.74   OFF    OFF      OFF      

Port   Status           Unit   Size        Blocks        Serial
---------------------------------------------------------------
p0     OK               u0     233.76 GB   490234752     WD-WCANY1788981     
p1     OK               u0     233.76 GB   490234752     WD-WCANY1795430     
p2     OK               u0     233.76 GB   490234752     WD-WCANY1851853     
p3     OK               u0     233.76 GB   490234752     WD-WCANY1787889     
p4     DEGRADED         u0     233.76 GB   490234752     WD-WCANY2233803     
p5     OK               u0     233.76 GB   490234752     WD-WCANY1789375     
p6     OK               u0     233.76 GB   490234752     WD-WCANY1788370     
p7     OK               u0     233.76 GB   490234752     WD-WCANY1788683     

This is a 250 gb disk and it looks like it’s going to take about an hour to rebuild.

Should also turn the write cache back on. Use:

tw_cli /c0/u0 set cache=on