guoyu07 / aspersa

Automatically exported from code.google.com/p/aspersa
0 stars 0 forks source link

Add support for 3ware RAID controller #32

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Percona customer issue 11354 has samples of the commands and output from tw_cli.

Original issue reported on code.google.com by baron.schwartz on 14 Jul 2010 at 7:30

GoogleCodeExporter commented 9 years ago
I added naive support for the 3ware RAID utility (tw_cli) in the attached patch.

It displays specs, battery, logical and physical devices. Tested on a 3Ware 
9650SE-8LPML and 9690SA-8I using the tw_cli versions 2.00.11.016, 2.01.09.004, 
2.00.09.012.

Issues that I didn't address:

- It only polls the first controller (c0); it would be more work to poll the 
list of controllers and then iterate over them, and I don't have a need for it.
- Cache memory size is listed in 3ware docs as 'available memory' and is never 
exactly equal to the installed memory. I don't know why, maybe this is actually 
the unused portion of the card's cache?
- The cards I have don't seem to periodically run the battery test by 
themselves, so the hours remaining printout will be zero if the scan has never 
run (and likely inaccurate if it hasn't run lately).
- I didn't parse out what the unit cache value means (Ri = intelligent read, R 
= basic read, W = write; you'll commonly see RiW).
- I think older versions of tw_cli do not display physical devices in the same 
format, which will cause weirdness.

Output on a controller testing its battery looks like this:

  Controller | 3ware Inc 9690SA SAS/SATA-II RAID PCIe (rev 01)
       Specs | 9690SA-8I, 448MB cache, Optimal
     Battery | State: Testing (0 hours backup), Volt/Temp/Ready: OK/OK/No

  LogicalDev Size      RAID Disks Stripe Status  Cache
  ========== ========= ==== ===== ====== ======= =======
  u0         1098.92GB   10     8 256K   OK      Ri     

  PhysiclDev State   Type          Vendor  Model        Size       
  ========== ======= ============= ======= ============ ===========
  0          OK      SAS           SEAGATE ST9300603SS  279.39GB   
  1          OK      SAS           SEAGATE ST9300603SS  279.39GB   
  2          OK      SAS           SEAGATE ST9300603SS  279.39GB   
  3          OK      SAS           SEAGATE ST9300603SS  279.39GB   
  4          OK      SAS           SEAGATE ST9300603SS  279.39GB   
  5          OK      SAS           SEAGATE ST9300603SS  279.39GB   
  6          OK      SAS           SEAGATE ST9300603SS  279.39GB   
  7          OK      SAS           SEAGATE ST9300603SS  279.39GB   

Original comment by si...@zombe.es on 14 May 2011 at 5:20

Attachments: