Controller RAID LSI Fusion-MPT SAS: installazione e monitoraggio dei dischi: differenze tra le versioni

Riga 19: Riga 19:


=Configurazione e monitoraggio=
=Configurazione e monitoraggio=
Il controller funziona con i driver <code>mptsas</code> che sono inclusi nel kernel Debian. Possiamo verificare che i driver siano stati effettivamente caricati e siano in utilizzo attraverso il comando:
<pre>
# lsmod | grep mptsas
</pre>
che restituirà qualcosa del genere:
<pre>
mptsas                25840  4
mptscsih              25296  1 mptsas
mptbase                61124  3 mptctl,mptsas,mptscsih
scsi_transport_sas    30000  1 mptsas
scsi_mod              158544  9 mptctl,sd_mod,sg,sr_mod,libata,cciss,mptsas,mptscsih,scsi_transport_sas
</pre>
Per installare alcuni tool di monitoraggio dobbiamo abilitare il repository di HWraid nel nostro <code>/etc/apt/sources.list</code>, aggiungendo la riga:
<pre>
deb http://hwraid.le-vert.net/debian lenny main
</pre>
Le versioni attualmente supportate di Debian sono Lenny, Squeeze e Sid; modificate la riga precedente adattandola alla distribuzione che state utilizzando. Ora possiamo installare il software che ci occorre:
<pre>
# apt-get install mpt-status lsiutil
</pre>
==mpt-status==
Il primo software che prendiamo in esame è <code>mpt-status</code>. Perchè questo software funzioni occorre abilitare il modulo <code>mptctl</code>. Quindi carichiamolo a mano e assicuriamoci che venga caricato ad ogni reboot del server:
<pre>
# modprobe mptctl
# echo mptctl >> /etc/modules
</pre>
Pur non essendo molto prolisso nei suoi output, questo software permette di interrogare il nostro controller e di ricavarne lo stato dei dischi ad esso collegati.
* '''Ricavare l'elenco dei controller compatibili'''
<pre>
server:~# mpt-status -p
Checking for SCSI ID:0
Found SCSI id=0, use ''mpt-status -i 0`` to get more information.
</pre>
* '''Ricavare lo stato del controller <code>0</code>'''
<pre>
server:~# mpt-status -i 0
ioc0 vol_id 0 type IM, 2 phy, 73 GB, state OPTIMAL, flags ENABLED
ioc0 phy 1 scsi_id 32 ATA WDC WD5000AAKS-0 1C02, 465 GB, state ONLINE, flags NONE
ioc0 phy 0 scsi_id 1 ATA WDC WD5000AAKS-0 1C02, 465 GB, state ONLINE, flags NONE
</pre>
L'output è scarno, ma possiamo vedere che i nostri due dischi Western Digital sono attivi e non hanno indicatori di problemi attivi.
==lsiutil==
Questo è un tool sviluppato direttamente da LSI. Pur essendo liberamente distribuibile non sono riuscito a capire sotto quale licenza sia rilasciato. Non ho utilizzato molto questo tool, ma ne ho ricavato l'impressione che sia uno strumento che permette di andare molto in profondità nella gestione del controller e che, di conseguenza, '''permetta di fare molti danni grossi e irreparabili'''. Usatelo quindi a vostro rischio e pericolo.<br/>
Di seguito un esempio di una breve sessione con <code>lsiutil</code>. I comandi da me digitati sono riportati in '''grassetto'''.
<pre>
server:~# '''lsiutil'''
LSI Logic MPT Configuration Utility, Version 1.56, March 19, 2008
1 MPT Port found
    Port Name        Chip Vendor/Type/Rev    MPT Rev  Firmware Rev  IOC
1.  /proc/mpt/ioc0    LSI Logic SAS1068E B3    105      00143000    0
Select a device:  [1-1 or 0 to quit] '''1'''
1.  Identify firmware, BIOS, and/or FCode
2.  Download firmware (update the FLASH)
4.  Download/erase BIOS and/or FCode (update the FLASH)
8.  Scan for devices
10.  Change IOC settings (interrupt coalescing)
13.  Change SAS IO Unit settings
16.  Display attached devices
20.  Diagnostics
21.  RAID actions
22.  Reset bus
23.  Reset target
42.  Display operating system names for devices
45.  Concatenate SAS firmware and NVDATA files
60.  Show non-default settings
61.  Restore default settings
69.  Show board manufacturing information
97.  Reset SAS link, HARD RESET
98.  Reset SAS link
99.  Reset port
e  Enable expert mode in menus
p  Enable paged mode
w  Enable logging
Main menu, select an option:  [1-99 or e/p/w or 0 to quit] '''1'''
Current active firmware version is 00143000 (0.20.48)
Firmware image's version is MPTFW-00.20.48.00-IE
  LSI Logic
x86 BIOS image's version is MPTBIOS-6.14.10.00 (2007.09.29)
Main menu, select an option:  [1-99 or e/p/w or 0 to quit] '''21'''
1.  Show volumes
2.  Show physical disks
3.  Get volume state
4.  Wait for volume resync to complete
23.  Replace physical disk
26.  Disable drive firmware update mode
27.  Enable drive firmware update mode
30.  Create volume
31.  Delete volume
32.  Change volume settings
33.  Change volume name
50.  Create hot spare
99.  Reset port
e  Enable expert mode in menus
p  Enable paged mode
w  Enable logging
RAID actions menu, select an option:  [1-99 or e/p/w or 0 to quit] '''2'''
1 volume is active, 2 physical disks are active
PhysDisk 0 is Bus 0 Target 1
  PhysDisk State:  online
  PhysDisk Size 238418 MB, Inquiry Data:  ATA      ST3250620NS      3BKS
PhysDisk 1 is Bus 0 Target 8
  PhysDisk State:  online
  PhysDisk Size 238418 MB, Inquiry Data:  ATA      ST3250620NS      3BKS
RAID actions menu, select an option:  [1-99 or e/p/w or 0 to quit] '''1'''
1 volume is active, 2 physical disks are active
Volume 0 is Bus 0 Target 0, Type IM (Integrated Mirroring)
  Volume Name:
  Volume WWID:  01e2adb8d959aedc
  Volume State:  optimal, enabled
  Volume Settings:  write caching enabled, auto configure, priority resync
  Volume draws from Hot Spare Pools:  0
  Volume Size 237464 MB, 2 Members
  Primary is PhysDisk 1 (Bus 0 Target 8)
  Secondary is PhysDisk 0 (Bus 0 Target 1)
RAID actions menu, select an option:  [1-99 or e/p/w or 0 to quit] '''3'''
Volume 0 State:  optimal, enabled
RAID actions menu, select an option:  [1-99 or e/p/w or 0 to quit] '''0'''
<pre>
<br/>
----
--~~~~
----