Showing posts with label LSI HBA. Show all posts
Showing posts with label LSI HBA. Show all posts

Monday, March 7, 2016

Megacli commands

Basic commands –Controller Related

1)       To show the number of controllers
 #MegaCli -adpcount

 2)       All Adapter Information
 #MegaCli -AdpAllInfo -aN|-a0,1,2|-aALL  
 Displays information about the adapter, such as cluster state, BIOS, alarm, firmware version, etc.

 3)       Flash the firmware
 #MegaCli -AdpFwFlash -f filename [-NoSigChk] [-NoVerChk] -aN|-a0,1,2|-aALL  
 If issued at server level without controller option, cli will attempt to download fw to all compatible controllers that supports the image


Battery Backup Unit Related

4)       Display BBU Information
 #MegaCli -AdpBbuCmd -aN|-a0,1,2|-aALL

5)       Display BBU Status Information
 #MegaCli -AdpBbuCmd -GetBbuStatus -aN|-a0,1,2|-aALL

6)       Starts Battery Test
 #MegaCli -AdpBatTest -aN|-a0,1,2|-aALL
 Requires turning off power to system, and then powering on and rebooting system.


Configuration Related

7)       Create new configuration
 #MegaCli -CfgLDAdd -R0|-R1|-R5|-R6 [E0:S0, E1:S1,...] -aN
 Adds a RAID level 0, 1, 5, or 6 configuration to a specified adapter with default options.

Below the full command with all options;
MegaCli -CfgLdAdd -R0|-R1|-R5|-R6 [E0:S0,E1:S1,...] [WT|WB] [NORA|RA|ADRA] [Direct|Cached] [CachedBadBBU |NoCachedBadBBU] [-szXXX [-szYYY ...] [-strpszM] [-Hsp[E0:S0,...]] [-AfterLdX] –aN

 8)       Clear the existing all configuration
 #MegaCli -CfgClr -aN|-a0, 1, 2|-aALL
 Clears the existing configuration

9)       Save / backup the configuration
 #MegaCli -CfgSave -f FileName -aN
 Saves the configuration for the selected adapter(s) to the given filename.

10)   Restore the configuration to the controller
 #MegaCli -CfgRestore -f FileName -aN
 Can store or restore all read and write adapter properties, all read and write properties for virtual disks, and the RAID configuration including hot spares (with some caveates).


Logical and Physical Device Related

 11)   Show PDs under VD
 #MegaCli -LDPDInfo -aN|-a0,1,2|-aALL

12)   Manage Foreign configuration
 #MegaCli -CfgForeign -Scan | {-Preview | -Dsply| -Import | -Clear [FID]} -aN|-a0,1,2|-aALL
 Scans and displays available foreign configurations, provides a preview of the imported foreign configuration, displays, import, or clear a foreign configuration

13)   Delete the existing Virtual disk
 #MegaCli -CfgLDDel -Lx|-L0,1,2|-Lall -aN|-a0,1,2|-aALL
 Delete one virtual disk, multiple virtual disks, or all the selected virtual disks on selected adapter(s).

14)   Display Virtual disk information
 #MegaCli -LDInfo -Lx|-L0,1,2|-Lall aN|-a0,1,2|-aALL
 Displays VD information; includes name, RAID level, RAID level qualifier, size in MBs, state, stripe size, number of drives, span depth, cache policy, access policy, and ongoing activity progress, if any, including initialization, background initialization, consistency check, and reconstruction

15)   Initialize the Virtual Disk
 #MegaCli -LDInit -Start [-Fast|-Full]  -Lx|-L0,1,2|-Lall -aN|-a0,1,2|-aALL
 Starts the initialization (writing 0s) on the virtual disk(s)

16)   Abort the Initialization
 #MegaCli -LDInit -Abort -Lx|-L0,1,2|-Lall aN|-a0,1,2|-aALL
 Aborts the ongoing initialization on the LD(s)

17)   Rebuild a Physical Device
 #MegaCli -PDRbld -Start|-Stop|-ShowProg |-ProgDsply -PhysDrv [E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL 
 Starts a rebuild or stops an ongoing rebuild, displays current progress percentage and time remaining for the rebuild, or displays the ongoing rebuild progress.

18)   Information about the Physical Device
 #MegaCli -pdInfo -PhysDrv[E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL
 Displays physical disk information.

19)   Display the missing Physical devices
 #MegaCli -PdGetMissing -aN|-a0,1,2|-aALL 
 Displays the physical disk drive(s) in missing status.

20)   Mark a physical device as Missing
 #MegaCli -PdMarkMissing -physdrv[E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL
 Marks the configured physical disk drive as missing for the selected adapter(s).

21)   Replace a Missing Physical Device in an array
 #MegaCli -PdReplaceMissing -physdrv[E0:S0] -arrayA, -rowB -aN 
 Replaces the configured physical disk drives that are identified as missing and then starts an automatic rebuild.

22)   Set the Physical Drive state as online.
 #MegaCli -PDOnline -PhysDrv[E0:S0,E1:S1....] -aN|-a0,1,2
 Changes the physcial disk drive state to Online. Please note this will work with only an offline disk.

23)   Set the Physical disk as offline
 #MegaCli -PDOffline -PhysDrv[E0:S0,E1:S1....] -aN|-a0,1,2|-aALL
 Changes the physcial disk drive state to Offline.

24)   Set the Physical drive as Unconfigure good
#MegaCli PDMakeGood PhysDrv[E0:S0,E1:S1....] aN|a0,1,2|aALL
 Change PD State from UnconfiguredBad to UnconfiguredGood.

25)   Physical Disk initialization ( writing 0s)
 #MegaCli -PDClear -Start |-Stop|-ShowProg |-ProgDsply -PhysDrv[E0:S0,E1:S1....] -aN|-a0,1,2|-aALL
 Starts and Stops initialization, displays the current progress percentage and time remaining for the initialization, or displays the ongoing clear progress.

26)   Locate the Physical Drive
 #MegaCli  -PDLocate -PhysDrv[E0:S0,E1:S1....] -aN|-a0,1,2|-aALL
 Locates the physical disk drive(s) and activates the physical disk activity LED.

27)   Prepare the drive  for remove
 #MegaCli  -PDPrpRmv [Undo] -PhysDrv[E0:S0,E1:S1....] -aN|-a0,1,2|-aALL
 Prepares unconfigured physical drive(s) for removal.

28)   Get the number of Physical Drives attached to the controller
 #MegaCli  -PDGetNum -aN|-a0,1,2|-aALL
 Displays the total number of physical disk drives attached to an adapter. Drives can be attached directly or through enclosures.  Return value is number of PDs.

29)   List all the information about all PDs
 #MegaCli  -PDList -aN|-a0,1..|-aAll
 Displays information about all physical disk drives and other devices connected to the selected adapter(s); includes drive type, size, serial number, and firmware version. For SAS devices: includes SAS address.  For SAS expanders: includes number of drives connected to expander.


Logs Related
 30)   View Event log information
 #MegaCli AdpEventLog GetEventLogInfo aN|a0,1,2|aALL
Displays total number of events, newest and oldest seq num, shutdown sequence number, reboot sequence number, clear sequence number, and 10 (TBD) most recent event

31) Save event logs to a file
#MegaCli -AdpEventLog -GetEvents -f -aN|-a0,1,2|-aALL
Save the controller event logs to the file specified in the command, (no o/p in the console )



 Sas2flash and sas2ircu


 Supported controllers
- SGX-SAS6-INT-Z (Erie-INT)
- SGX-SAS6-REM-Z (Erie-REM)

How to install the SW:
- Download the patch form: https://www.lsi.com/sep/Pages/oracle/sg_x_sas6-int-z.aspx
- Copy the file to the system and set execute permission. Then run the required command.

1)       SAS2flash

  Utility to flash/manage the controller firmware.

Firmware Update
#SAS2Flash  –f filename

BIOS Update
#SAS2Flash  -b filename


List information about controller
#SAS2Flash –list

Exit codes
Exit code - 0 SUCCESS
Exit code -1 Failure

2)  SAS2IRCU

Use this syntax for SAS2IRCU commands:
#sas2ircu > <command> <parameters>

 Replace text enclosed in < > with a required parameter, such as a controller number or a volume type.
 Replace text enclosed in [ ] with an optional parameter.
 Enter parameters enclosed in { } one or more times, as required for the command.
 Do not use the command-line definition characters < >, [ ], and { } on the command line.

Commands

a)       CREATE
 The CREATE command creates Integrated RAID volumes on LSI SAS-2 controllers.
#sas2ircu <controller_#> create <volume_type> <size> {<Enclosure:Bay>} [VolumeName]
 <volume_type> – Volume type for the new volume. Valid values are RAID0, RAID1, RAID10, or RAID1E.
<size> – Size of the RAID volume in MB, or MAX for the maximum size available.


b)       DELETE
 #sas2ircu <controller_#> delete
The DELETE command deletes all RAID 0, RAID 1, RAID 10, and RAID 1E Integrated RAID volumes and hot spare drives from the specified LSI SAS-2 controller.

c)       DELETEVOLUME
 #sas2ircu <controller_#> deletevolume <volumeID>
 To delete the specific volume

d)       DISPLAY
 #sas2ircu <controller_#> display [filename]
The DISPLAY command displays information about LSI SAS-2 controller configurations, including controller type, firmware version, BIOS version, volume information, physical drive information, and enclosure.
Possible Values and explanation of 'status/state' field for Physical Disks and Volumes in the Output of sas2ircu display command (Doc ID 2027542.1)

e)       HOTSPARE
#sas2ircu <controller_#> hotspare [delete] <Enclosure:Bay>

f)        STATUS
#sas2ircu <controller_#> status

g)       LIST
#sas2ircu list

h)       ACTIVATE
The ACTIVATE command activates an inactive Integrated RAID volume.
#sas2ircu <controller_#> activate <volumeId>

i)        LOCATE
The LOCATE command locates a specific drive in a volume by turning on its location indicator and flashing its LED. The command works only for drives installed in a disk enclosure. It does not work for drives attached directly to the enclosure.
#sas2ircu <controller_#> locate <Enclosure:Bay> <action>
<action> – The possible actions are as follows:
 ON – Turn on the location indicator of the drive.
 OFF – Turn off the location indicator of the drive

j)        LOGIR
The LOGIR command uploads or clears the Integrated RAID log information.
#sas2ircu <controller_#> logir <action> [filename]
<action> – The possible actions are as follows:
UPLOAD – Upload the controller logs to a file.
 CLEAR – Clear the controller logs.
 [filename] – This optional parameter specifies the name of the file to which the logs must be uploaded. The default filename is LOGIR.LOG.

k)       BOOTIR
The BOOTIR command selects an existing RAID volume as the primary boot device .
#sas2ircu <controller_#> bootir <volumeID>

l)        BOOTENCL
The BOOTENCL command selects a specific enclosure/slot as the primary boot device
#sas2ircu <controller_#> bootencl <Enclosure:Bay>

Exit  codes

0x00 SUCCESS: Command completed successfully.
0x01 FAILURE: Bad command-line arguments or operational failure.
0x02 ADAPTER_NOT_FOUND: Cannot find specified adapter.

Megacli commands

Basic commands –Controller Related

1)       To show the number of controllers
 #MegaCli -adpcount

 2)       All Adapter Information
 #MegaCli -AdpAllInfo -aN|-a0,1,2|-aALL  
 Displays information about the adapter, such as cluster state, BIOS, alarm, firmware version, etc.

 3)       Flash the firmware
 #MegaCli -AdpFwFlash -f filename [-NoSigChk] [-NoVerChk] -aN|-a0,1,2|-aALL  
 If issued at server level without controller option, cli will attempt to download fw to all compatible controllers that supports the image


Battery Backup Unit Related

4)       Display BBU Information
 #MegaCli -AdpBbuCmd -aN|-a0,1,2|-aALL

5)       Display BBU Status Information
 #MegaCli -AdpBbuCmd -GetBbuStatus -aN|-a0,1,2|-aALL

6)       Starts Battery Test
 #MegaCli -AdpBatTest -aN|-a0,1,2|-aALL
 Requires turning off power to system, and then powering on and rebooting system.


Configuration Related

7)       Create new configuration
 #MegaCli -CfgLDAdd -R0|-R1|-R5|-R6 [E0:S0, E1:S1,...] -aN
 Adds a RAID level 0, 1, 5, or 6 configuration to a specified adapter with default options.

Below the full command with all options;
MegaCli -CfgLdAdd -R0|-R1|-R5|-R6 [E0:S0,E1:S1,...] [WT|WB] [NORA|RA|ADRA] [Direct|Cached] [CachedBadBBU |NoCachedBadBBU] [-szXXX [-szYYY ...] [-strpszM] [-Hsp[E0:S0,...]] [-AfterLdX] –aN

 8)       Clear the existing all configuration
 #MegaCli -CfgClr -aN|-a0, 1, 2|-aALL
 Clears the existing configuration

9)       Save / backup the configuration
 #MegaCli -CfgSave -f FileName -aN
 Saves the configuration for the selected adapter(s) to the given filename.

10)   Restore the configuration to the controller
 #MegaCli -CfgRestore -f FileName -aN
 Can store or restore all read and write adapter properties, all read and write properties for virtual disks, and the RAID configuration including hot spares (with some caveates).


Logical and Physical Device Related

 11)   Show PDs under VD
 #MegaCli -LDPDInfo -aN|-a0,1,2|-aALL

12)   Manage Foreign configuration
 #MegaCli -CfgForeign -Scan | {-Preview | -Dsply| -Import | -Clear [FID]} -aN|-a0,1,2|-aALL
 Scans and displays available foreign configurations, provides a preview of the imported foreign configuration, displays, import, or clear a foreign configuration

13)   Delete the existing Virtual disk
 #MegaCli -CfgLDDel -Lx|-L0,1,2|-Lall -aN|-a0,1,2|-aALL
 Delete one virtual disk, multiple virtual disks, or all the selected virtual disks on selected adapter(s).

14)   Display Virtual disk information
 #MegaCli -LDInfo -Lx|-L0,1,2|-Lall aN|-a0,1,2|-aALL
 Displays VD information; includes name, RAID level, RAID level qualifier, size in MBs, state, stripe size, number of drives, span depth, cache policy, access policy, and ongoing activity progress, if any, including initialization, background initialization, consistency check, and reconstruction

15)   Initialize the Virtual Disk
 #MegaCli -LDInit -Start [-Fast|-Full]  -Lx|-L0,1,2|-Lall -aN|-a0,1,2|-aALL
 Starts the initialization (writing 0s) on the virtual disk(s)

16)   Abort the Initialization
 #MegaCli -LDInit -Abort -Lx|-L0,1,2|-Lall aN|-a0,1,2|-aALL
 Aborts the ongoing initialization on the LD(s)

17)   Rebuild a Physical Device
 #MegaCli -PDRbld -Start|-Stop|-ShowProg |-ProgDsply -PhysDrv [E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL 
 Starts a rebuild or stops an ongoing rebuild, displays current progress percentage and time remaining for the rebuild, or displays the ongoing rebuild progress.

18)   Information about the Physical Device
 #MegaCli -pdInfo -PhysDrv[E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL
 Displays physical disk information.

19)   Display the missing Physical devices
 #MegaCli -PdGetMissing -aN|-a0,1,2|-aALL 
 Displays the physical disk drive(s) in missing status.

20)   Mark a physical device as Missing
 #MegaCli -PdMarkMissing -physdrv[E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL
 Marks the configured physical disk drive as missing for the selected adapter(s).

21)   Replace a Missing Physical Device in an array
 #MegaCli -PdReplaceMissing -physdrv[E0:S0] -arrayA, -rowB -aN 
 Replaces the configured physical disk drives that are identified as missing and then starts an automatic rebuild.

22)   Set the Physical Drive state as online.
 #MegaCli -PDOnline -PhysDrv[E0:S0,E1:S1....] -aN|-a0,1,2
 Changes the physcial disk drive state to Online. Please note this will work with only an offline disk.

23)   Set the Physical disk as offline
 #MegaCli -PDOffline -PhysDrv[E0:S0,E1:S1....] -aN|-a0,1,2|-aALL
 Changes the physcial disk drive state to Offline.

24)   Set the Physical drive as Unconfigure good
#MegaCli PDMakeGood PhysDrv[E0:S0,E1:S1....] aN|a0,1,2|aALL
 Change PD State from UnconfiguredBad to UnconfiguredGood.

25)   Physical Disk initialization ( writing 0s)
 #MegaCli -PDClear -Start |-Stop|-ShowProg |-ProgDsply -PhysDrv[E0:S0,E1:S1....] -aN|-a0,1,2|-aALL
 Starts and Stops initialization, displays the current progress percentage and time remaining for the initialization, or displays the ongoing clear progress.

26)   Locate the Physical Drive
 #MegaCli  -PDLocate -PhysDrv[E0:S0,E1:S1....] -aN|-a0,1,2|-aALL
 Locates the physical disk drive(s) and activates the physical disk activity LED.

27)   Prepare the drive  for remove
 #MegaCli  -PDPrpRmv [Undo] -PhysDrv[E0:S0,E1:S1....] -aN|-a0,1,2|-aALL
 Prepares unconfigured physical drive(s) for removal.

28)   Get the number of Physical Drives attached to the controller
 #MegaCli  -PDGetNum -aN|-a0,1,2|-aALL
 Displays the total number of physical disk drives attached to an adapter. Drives can be attached directly or through enclosures.  Return value is number of PDs.

29)   List all the information about all PDs
 #MegaCli  -PDList -aN|-a0,1..|-aAll
 Displays information about all physical disk drives and other devices connected to the selected adapter(s); includes drive type, size, serial number, and firmware version. For SAS devices: includes SAS address.  For SAS expanders: includes number of drives connected to expander.


Logs Related
 30)   View Event log information
 #MegaCli AdpEventLog GetEventLogInfo aN|a0,1,2|aALL
Displays total number of events, newest and oldest seq num, shutdown sequence number, reboot sequence number, clear sequence number, and 10 (TBD) most recent event

31) Save event logs to a file
#MegaCli -AdpEventLog -GetEvents -f -aN|-a0,1,2|-aALL
Save the controller event logs to the file specified in the command, (no o/p in the console )



 Sas2flash and sas2ircu


 Supported controllers
- SGX-SAS6-INT-Z (Erie-INT)
- SGX-SAS6-REM-Z (Erie-REM)

How to install the SW:
- Download the patch form: https://www.lsi.com/sep/Pages/oracle/sg_x_sas6-int-z.aspx
- Copy the file to the system and set execute permission. Then run the required command.

1)       SAS2flash

  Utility to flash/manage the controller firmware.

Firmware Update
#SAS2Flash  –f filename

BIOS Update
#SAS2Flash  -b filename


List information about controller
#SAS2Flash –list

Exit codes
Exit code - 0 SUCCESS
Exit code -1 Failure

2)  SAS2IRCU

Use this syntax for SAS2IRCU commands:
#sas2ircu > <command> <parameters>

 Replace text enclosed in < > with a required parameter, such as a controller number or a volume type.
 Replace text enclosed in [ ] with an optional parameter.
 Enter parameters enclosed in { } one or more times, as required for the command.
 Do not use the command-line definition characters < >, [ ], and { } on the command line.

Commands

a)       CREATE
 The CREATE command creates Integrated RAID volumes on LSI SAS-2 controllers.
#sas2ircu <controller_#> create <volume_type> <size> {<Enclosure:Bay>} [VolumeName]
 <volume_type> – Volume type for the new volume. Valid values are RAID0, RAID1, RAID10, or RAID1E.
<size> – Size of the RAID volume in MB, or MAX for the maximum size available.


b)       DELETE
 #sas2ircu <controller_#> delete
The DELETE command deletes all RAID 0, RAID 1, RAID 10, and RAID 1E Integrated RAID volumes and hot spare drives from the specified LSI SAS-2 controller.

c)       DELETEVOLUME
 #sas2ircu <controller_#> deletevolume <volumeID>
 To delete the specific volume

d)       DISPLAY
 #sas2ircu <controller_#> display [filename]
The DISPLAY command displays information about LSI SAS-2 controller configurations, including controller type, firmware version, BIOS version, volume information, physical drive information, and enclosure.
Possible Values and explanation of 'status/state' field for Physical Disks and Volumes in the Output of sas2ircu display command (Doc ID 2027542.1)

e)       HOTSPARE
#sas2ircu <controller_#> hotspare [delete] <Enclosure:Bay>

f)        STATUS
#sas2ircu <controller_#> status

g)       LIST
#sas2ircu list

h)       ACTIVATE
The ACTIVATE command activates an inactive Integrated RAID volume.
#sas2ircu <controller_#> activate <volumeId>

i)        LOCATE
The LOCATE command locates a specific drive in a volume by turning on its location indicator and flashing its LED. The command works only for drives installed in a disk enclosure. It does not work for drives attached directly to the enclosure.
#sas2ircu <controller_#> locate <Enclosure:Bay> <action>
<action> – The possible actions are as follows:
 ON – Turn on the location indicator of the drive.
 OFF – Turn off the location indicator of the drive

j)        LOGIR
The LOGIR command uploads or clears the Integrated RAID log information.
#sas2ircu <controller_#> logir <action> [filename]
<action> – The possible actions are as follows:
UPLOAD – Upload the controller logs to a file.
 CLEAR – Clear the controller logs.
 [filename] – This optional parameter specifies the name of the file to which the logs must be uploaded. The default filename is LOGIR.LOG.

k)       BOOTIR
The BOOTIR command selects an existing RAID volume as the primary boot device .
#sas2ircu <controller_#> bootir <volumeID>

l)        BOOTENCL
The BOOTENCL command selects a specific enclosure/slot as the primary boot device
#sas2ircu <controller_#> bootencl <Enclosure:Bay>

Exit  codes

0x00 SUCCESS: Command completed successfully.
0x01 FAILURE: Bad command-line arguments or operational failure.
0x02 ADAPTER_NOT_FOUND: Cannot find specified adapter.

Megacli commands

Basic commands –Controller Related

1)       To show the number of controllers
 #MegaCli -adpcount

 2)       All Adapter Information
 #MegaCli -AdpAllInfo -aN|-a0,1,2|-aALL  
 Displays information about the adapter, such as cluster state, BIOS, alarm, firmware version, etc.

 3)       Flash the firmware
 #MegaCli -AdpFwFlash -f filename [-NoSigChk] [-NoVerChk] -aN|-a0,1,2|-aALL  
 If issued at server level without controller option, cli will attempt to download fw to all compatible controllers that supports the image


Battery Backup Unit Related

4)       Display BBU Information
 #MegaCli -AdpBbuCmd -aN|-a0,1,2|-aALL

5)       Display BBU Status Information
 #MegaCli -AdpBbuCmd -GetBbuStatus -aN|-a0,1,2|-aALL

6)       Starts Battery Test
 #MegaCli -AdpBatTest -aN|-a0,1,2|-aALL
 Requires turning off power to system, and then powering on and rebooting system.


Configuration Related

7)       Create new configuration
 #MegaCli -CfgLDAdd -R0|-R1|-R5|-R6 [E0:S0, E1:S1,...] -aN
 Adds a RAID level 0, 1, 5, or 6 configuration to a specified adapter with default options.

Below the full command with all options;
MegaCli -CfgLdAdd -R0|-R1|-R5|-R6 [E0:S0,E1:S1,...] [WT|WB] [NORA|RA|ADRA] [Direct|Cached] [CachedBadBBU |NoCachedBadBBU] [-szXXX [-szYYY ...] [-strpszM] [-Hsp[E0:S0,...]] [-AfterLdX] –aN

 8)       Clear the existing all configuration
 #MegaCli -CfgClr -aN|-a0, 1, 2|-aALL
 Clears the existing configuration

9)       Save / backup the configuration
 #MegaCli -CfgSave -f FileName -aN
 Saves the configuration for the selected adapter(s) to the given filename.

10)   Restore the configuration to the controller
 #MegaCli -CfgRestore -f FileName -aN
 Can store or restore all read and write adapter properties, all read and write properties for virtual disks, and the RAID configuration including hot spares (with some caveates).


Logical and Physical Device Related

 11)   Show PDs under VD
 #MegaCli -LDPDInfo -aN|-a0,1,2|-aALL

12)   Manage Foreign configuration
 #MegaCli -CfgForeign -Scan | {-Preview | -Dsply| -Import | -Clear [FID]} -aN|-a0,1,2|-aALL
 Scans and displays available foreign configurations, provides a preview of the imported foreign configuration, displays, import, or clear a foreign configuration

13)   Delete the existing Virtual disk
 #MegaCli -CfgLDDel -Lx|-L0,1,2|-Lall -aN|-a0,1,2|-aALL
 Delete one virtual disk, multiple virtual disks, or all the selected virtual disks on selected adapter(s).

14)   Display Virtual disk information
 #MegaCli -LDInfo -Lx|-L0,1,2|-Lall aN|-a0,1,2|-aALL
 Displays VD information; includes name, RAID level, RAID level qualifier, size in MBs, state, stripe size, number of drives, span depth, cache policy, access policy, and ongoing activity progress, if any, including initialization, background initialization, consistency check, and reconstruction

15)   Initialize the Virtual Disk
 #MegaCli -LDInit -Start [-Fast|-Full]  -Lx|-L0,1,2|-Lall -aN|-a0,1,2|-aALL
 Starts the initialization (writing 0s) on the virtual disk(s)

16)   Abort the Initialization
 #MegaCli -LDInit -Abort -Lx|-L0,1,2|-Lall aN|-a0,1,2|-aALL
 Aborts the ongoing initialization on the LD(s)

17)   Rebuild a Physical Device
 #MegaCli -PDRbld -Start|-Stop|-ShowProg |-ProgDsply -PhysDrv [E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL 
 Starts a rebuild or stops an ongoing rebuild, displays current progress percentage and time remaining for the rebuild, or displays the ongoing rebuild progress.

18)   Information about the Physical Device
 #MegaCli -pdInfo -PhysDrv[E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL
 Displays physical disk information.

19)   Display the missing Physical devices
 #MegaCli -PdGetMissing -aN|-a0,1,2|-aALL 
 Displays the physical disk drive(s) in missing status.

20)   Mark a physical device as Missing
 #MegaCli -PdMarkMissing -physdrv[E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL
 Marks the configured physical disk drive as missing for the selected adapter(s).

21)   Replace a Missing Physical Device in an array
 #MegaCli -PdReplaceMissing -physdrv[E0:S0] -arrayA, -rowB -aN 
 Replaces the configured physical disk drives that are identified as missing and then starts an automatic rebuild.

22)   Set the Physical Drive state as online.
 #MegaCli -PDOnline -PhysDrv[E0:S0,E1:S1....] -aN|-a0,1,2
 Changes the physcial disk drive state to Online. Please note this will work with only an offline disk.

23)   Set the Physical disk as offline
 #MegaCli -PDOffline -PhysDrv[E0:S0,E1:S1....] -aN|-a0,1,2|-aALL
 Changes the physcial disk drive state to Offline.

24)   Set the Physical drive as Unconfigure good
#MegaCli PDMakeGood PhysDrv[E0:S0,E1:S1....] aN|a0,1,2|aALL
 Change PD State from UnconfiguredBad to UnconfiguredGood.

25)   Physical Disk initialization ( writing 0s)
 #MegaCli -PDClear -Start |-Stop|-ShowProg |-ProgDsply -PhysDrv[E0:S0,E1:S1....] -aN|-a0,1,2|-aALL
 Starts and Stops initialization, displays the current progress percentage and time remaining for the initialization, or displays the ongoing clear progress.

26)   Locate the Physical Drive
 #MegaCli  -PDLocate -PhysDrv[E0:S0,E1:S1....] -aN|-a0,1,2|-aALL
 Locates the physical disk drive(s) and activates the physical disk activity LED.

27)   Prepare the drive  for remove
 #MegaCli  -PDPrpRmv [Undo] -PhysDrv[E0:S0,E1:S1....] -aN|-a0,1,2|-aALL
 Prepares unconfigured physical drive(s) for removal.

28)   Get the number of Physical Drives attached to the controller
 #MegaCli  -PDGetNum -aN|-a0,1,2|-aALL
 Displays the total number of physical disk drives attached to an adapter. Drives can be attached directly or through enclosures.  Return value is number of PDs.

29)   List all the information about all PDs
 #MegaCli  -PDList -aN|-a0,1..|-aAll
 Displays information about all physical disk drives and other devices connected to the selected adapter(s); includes drive type, size, serial number, and firmware version. For SAS devices: includes SAS address.  For SAS expanders: includes number of drives connected to expander.


Logs Related
 30)   View Event log information
 #MegaCli AdpEventLog GetEventLogInfo aN|a0,1,2|aALL
Displays total number of events, newest and oldest seq num, shutdown sequence number, reboot sequence number, clear sequence number, and 10 (TBD) most recent event

31) Save event logs to a file
#MegaCli -AdpEventLog -GetEvents -f -aN|-a0,1,2|-aALL
Save the controller event logs to the file specified in the command, (no o/p in the console )



 Sas2flash and sas2ircu


 Supported controllers
- SGX-SAS6-INT-Z (Erie-INT)
- SGX-SAS6-REM-Z (Erie-REM)

How to install the SW:
- Download the patch form: https://www.lsi.com/sep/Pages/oracle/sg_x_sas6-int-z.aspx
- Copy the file to the system and set execute permission. Then run the required command.

1)       SAS2flash

  Utility to flash/manage the controller firmware.

Firmware Update
#SAS2Flash  –f filename

BIOS Update
#SAS2Flash  -b filename


List information about controller
#SAS2Flash –list

Exit codes
Exit code - 0 SUCCESS
Exit code -1 Failure

2)  SAS2IRCU

Use this syntax for SAS2IRCU commands:
#sas2ircu > <command> <parameters>

 Replace text enclosed in < > with a required parameter, such as a controller number or a volume type.
 Replace text enclosed in [ ] with an optional parameter.
 Enter parameters enclosed in { } one or more times, as required for the command.
 Do not use the command-line definition characters < >, [ ], and { } on the command line.

Commands

a)       CREATE
 The CREATE command creates Integrated RAID volumes on LSI SAS-2 controllers.
#sas2ircu <controller_#> create <volume_type> <size> {<Enclosure:Bay>} [VolumeName]
 <volume_type> – Volume type for the new volume. Valid values are RAID0, RAID1, RAID10, or RAID1E.
<size> – Size of the RAID volume in MB, or MAX for the maximum size available.


b)       DELETE
 #sas2ircu <controller_#> delete
The DELETE command deletes all RAID 0, RAID 1, RAID 10, and RAID 1E Integrated RAID volumes and hot spare drives from the specified LSI SAS-2 controller.

c)       DELETEVOLUME
 #sas2ircu <controller_#> deletevolume <volumeID>
 To delete the specific volume

d)       DISPLAY
 #sas2ircu <controller_#> display [filename]
The DISPLAY command displays information about LSI SAS-2 controller configurations, including controller type, firmware version, BIOS version, volume information, physical drive information, and enclosure.
Possible Values and explanation of 'status/state' field for Physical Disks and Volumes in the Output of sas2ircu display command (Doc ID 2027542.1)

e)       HOTSPARE
#sas2ircu <controller_#> hotspare [delete] <Enclosure:Bay>

f)        STATUS
#sas2ircu <controller_#> status

g)       LIST
#sas2ircu list

h)       ACTIVATE
The ACTIVATE command activates an inactive Integrated RAID volume.
#sas2ircu <controller_#> activate <volumeId>

i)        LOCATE
The LOCATE command locates a specific drive in a volume by turning on its location indicator and flashing its LED. The command works only for drives installed in a disk enclosure. It does not work for drives attached directly to the enclosure.
#sas2ircu <controller_#> locate <Enclosure:Bay> <action>
<action> – The possible actions are as follows:
 ON – Turn on the location indicator of the drive.
 OFF – Turn off the location indicator of the drive

j)        LOGIR
The LOGIR command uploads or clears the Integrated RAID log information.
#sas2ircu <controller_#> logir <action> [filename]
<action> – The possible actions are as follows:
UPLOAD – Upload the controller logs to a file.
 CLEAR – Clear the controller logs.
 [filename] – This optional parameter specifies the name of the file to which the logs must be uploaded. The default filename is LOGIR.LOG.

k)       BOOTIR
The BOOTIR command selects an existing RAID volume as the primary boot device .
#sas2ircu <controller_#> bootir <volumeID>

l)        BOOTENCL
The BOOTENCL command selects a specific enclosure/slot as the primary boot device
#sas2ircu <controller_#> bootencl <Enclosure:Bay>

Exit  codes

0x00 SUCCESS: Command completed successfully.
0x01 FAILURE: Bad command-line arguments or operational failure.
0x02 ADAPTER_NOT_FOUND: Cannot find specified adapter.

Saturday, November 28, 2015

Some important Megacli commands


1) /opt/Megacli/RAID/Megacli -CfgForeign -Import [x] -aN|-a0,1,2|-aALL =======> command to import the Forigen config
2) /opt/MegaRAID/MegaCli/MegaCli64 -LDRecon -Start -r5 -Add -PhysDrv[39:25] -L0 -a0   to Add the Disk to RAID5  ( VD0) here L0 is Vd0.
3) /opt/MegaRAID/MegaCli/MegaCli64 -LDRecon -ShowProg -L0 -a0=================================> to check the progress.
4) /opt/MegaRAID/CLI/MegaCli -PDMakeGood -PhysDrv[39:25] -a0 =============> Command to make the Disk from bad to good.
5) /opt/MegaRAID/CLI/MegaCli -CfgLDDel -L3 -force -a0  ===================> Delete the Disk from the unwanted VD, Here L3 is VD.

Note: Be careful running with commands.

Wednesday, November 25, 2015

How to identify various manufactures of the HBA cards ?

.


LPxxxxxx-S are Oracle Emulex HBA Cards (ie it has a “-S” for Sun at end).
LPxxxxxx-E are NON-Oracle HBAs usually resold by EMC.
LPxxxxxx-H are NON-Oracle HBAs usually resold by Hitachi.
LPxxxxxx-M are NON-Oracle HBAs usually resold by
375-xxxx-xx are Oracle Qlogic HBA Cards.
QLAxxxx may or may not be Oracle Qlogic HBA Cards so you would need to use “prtpicl Command:” to determine.
Model: 2200 with Manufacturer: QLogic Corp is a old Oracle Fibre Channel Arbitrated Loop (FC-AL) HBA Cards.

Regards
Gurudatta N.R