LSI MegaCLi (preboot CLi),StoreCLi, MegaSCU, MegaREC, SAS2flash and MegaOEM commands

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

mattr

Member
Aug 1, 2013
120
11
18
You don't need -aall I think
Yeah I tried it without and it gave a different error. I created a MS-DOS bootable USB with Rufus and copied the contents of the 2008 zip file on the USB. I've done this before and it's worked fine. I can't figure out what's going on this time.
 

mobilenvidia

Moderator
Sep 25, 2011
1,956
212
63
New Zealand
Ah, your problem is MegaCli is only for MegaRAID controllers ie9260/9285 etc etc
You need to use SAS2FLSH (DOS) or SAS2FLASH (other OS's)

SAS2FLSH in DOS only seems to work on Mobo's with no inbuild VGA, can be a pain

BTW, the H200 is the same as a H310 but is not the same as a M1015/9211 !!
You can xflash them but it's ugly and risky
There are both IT and IR FW for Dell's HBA's
 

mattr

Member
Aug 1, 2013
120
11
18
Ah, your problem is MegaCli is only for MegaRAID controllers ie9260/9285 etc etc
You need to use SAS2FLSH (DOS) or SAS2FLASH (other OS's)

SAS2FLSH in DOS only seems to work on Mobo's with no inbuild VGA, can be a pain

BTW, the H200 is the same as a H310 but is not the same as a M1015/9211 !!
You can xflash them but it's ugly and risky
There are both IT and IR FW for Dell's HBA's
That makes sense then. Thanks for the explanation. Yeah I've been using the 6Gbps SAS HBA firmware from Dell. Luckily the Dell cards still always show up in MSM so I can grab the SAS Address from there.
 

mattr

Member
Aug 1, 2013
120
11
18
So is there a version of sas2flash.efi that allows overwrite? I think it's release P7 through P10 that works? Can't seem to find one anywhere.
 

mrkrad

Well-Known Member
Oct 13, 2012
1,244
52
48
All my efi updates are combined with firmware so you just load them and it does its thing. maybe you need an extractor?
 

mattr

Member
Aug 1, 2013
120
11
18
All my efi updates are combined with firmware so you just load them and it does its thing. maybe you need an extractor?
I'm not really sure what you mean. On the support and download pages there is a section for the uefi installer. That installer contains the executable sas2flash.efi for flashing cards on machines with UEFI. There used to be a sas2flash.efi from the P7 release floating around but no one can seem to find it.

 

mattr

Member
Aug 1, 2013
120
11
18
Ah, your problem is MegaCli is only for MegaRAID controllers ie9260/9285 etc etc
You need to use SAS2FLSH (DOS) or SAS2FLASH (other OS's)

SAS2FLSH in DOS only seems to work on Mobo's with no inbuild VGA, can be a pain

BTW, the H200 is the same as a H310 but is not the same as a M1015/9211 !!
You can xflash them but it's ugly and risky
There are both IT and IR FW for Dell's HBA's
I've found that the Dell 6Gbps SAS HBA firmware doesn't work well on the Perc H310/H200. I tested this on multiple machines with multiple H200's and H310's. It works. You can host drives. But upon reboot you get failed port error messages and the adapter resets. This can also be reproduced under heavy workloads. I've been able to get the adapters to reset multiple times while trying to recalculate parity in FlexRAID which results in a corrupted array. I've also been able to get them to reset when kicking off multiple file transfers at the same time.

I don't see any errors with the LSI P16 or P17 firmware though. Performs flawlessly. So I had been using the Dell 6Gbps firmware as you mentioned but after those findings I've been flashing everything to the LSI P17 firmware. This is easy with the P7 installer as it just asks you if you want to overwrite the NVDATA. But... for people that don't run Windows and don't have a older BIOS based machine to flash with they are stuck without the sas2flash.efi.
 

Dan Pritts

New Member
Jul 22, 2014
2
0
1
66
A couple notes on the MegaCli syntax.

1) the command name is case sensitive (on linux, anyway) but the arguments aren't.

2) the syntax to identify a physical drive is goofy. The help suggests you want something like -physdrv E0:S0 for enclosure 0 slot 0. What you really want is -physdrv [0:0] including the square brackets, but not the letters E or S. You can also specify a list of physical drives for some commands, e.g. [0:0 0:1 0:2]

3) note that if you have only one enclosure (i.e., internal slots on a server), it is not necessarily enclosure 0. My dell R320 with H310 controller uses enclosure 32. You can figure this out by doing a megacli -pdlist -aALL
 

Chuckleb

Moderator
Mar 5, 2013
1,017
331
83
Minnesota
Yes, MegaCli has annoying parameters, so much that when you need to use it, you have to have a browser open to figure out what to do. I like StorCli a little bit more because it's understandable.

I've been working on building out a HDD testing suite. As part of it, I've been wrappering a whole bunch of LSI tools based off of Calomel's scripts. I had to extend the original to have it handle more than one enclosure, etc... Here's a link to mine if you find it useful.

chuckleb/linuxdisktools · GitHub
 

Dan Pritts

New Member
Jul 22, 2014
2
0
1
66
Yes, MegaCli has annoying parameters, so much that when you need to use it, you have to have a browser open to figure out what to do. I like StorCli a little bit more because it's understandable.
I had never heard of storcli before I went looking for megacli syntax today. Didn't bother since i'm used to the evil that is megacli.

Megacli really has to be the worst CLI program I've ever used.

I've been working on building out a HDD testing suite
I have a "megamon" script I wrote. It has two modes.

1) hourly - looks for various things we know are bad (e.g., lines beginning with "State" that do not also say "optimal").
2) nightly - Looks for more stuff, and also compares the pdlist output to a previously stored copy and complains if it's different. So more chatty.
3) (extra bonus mode) - clears the adapter event log and saves the pdlist output.

Let me know if you want it.
 

hgeorges

New Member
Aug 8, 2014
5
0
1
66
Hello;
Does anyone know how to use any of these tools to change the serial number and manufacturing date on a MegaRaid 9240-8i controller?

I've had the card only for ~ 1/2 year, purchased new, and crossflashed it as soon as I got it with 9211-8i/M1015, etc.

Unfortunately I didn't save the original settings before crossflashing, and when I just reflashed it back to the original megardaid firmware, I discovered a different S/N and manuf date than those on the card labels. Older than the original ones. My card was manufactured in Jan 2013, and purchased in Jan 2014.
The current data shows it manufactured sometime in 2011.

Obviously this would not be of any importance, if the card would be perfectly functional, but unfortunately I need to RMA it for a port failure (hardware problem), and the current serial and manufacturing date pushes the card outside the warranty, (probably the change of sw internals voids the waranty as well... if I'm not able to restore it to the original state).

Any suggestions are greatly appreciated!
Thank you.
 

mobilenvidia

Moderator
Sep 25, 2011
1,956
212
63
New Zealand
Hello;
Does anyone know how to use any of these tools to change the serial number and manufacturing date on a MegaRaid 9240-8i controller?

I've had the card only for ~ 1/2 year, purchased new, and crossflashed it as soon as I got it with 9211-8i/M1015, etc.

Unfortunately I didn't save the original settings before crossflashing, and when I just reflashed it back to the original megardaid firmware, I discovered a different S/N and manuf date than those on the card labels. Older than the original ones. My card was manufactured in Jan 2013, and purchased in Jan 2014.
The current data shows it manufactured sometime in 2011.

Obviously this would not be of any importance, if the card would be perfectly functional, but unfortunately I need to RMA it for a port failure (hardware problem), and the current serial and manufacturing date pushes the card outside the warranty, (probably the change of sw internals voids the waranty as well... if I'm not able to restore it to the original state).

Any suggestions are greatly appreciated!
Thank you.
Can't say I've ever checked let alone changed the serial number.
Your best bet might be LSIUtil
Grab your version of choice from here Index of /LSIUtil Kit 1.63
Can be a little finicky to run, but can do a lot of diagnostics.
Learning curve will be steep and fraught with danger.

Good luck
 

hgeorges

New Member
Aug 8, 2014
5
0
1
66
Can't say I've ever checked let alone changed the serial number.
Your best bet might be LSIUtil
Grab your version of choice from here Index of /LSIUtil Kit 1.63
Can be a little finicky to run, but can do a lot of diagnostics.
Learning curve will be steep and fraught with danger.

Good luck
Thank you!

Tried a slightly older version of lsiutil and complained of too many things ... which made me discard it. MegaOEM seemed promissing, but did nothing.
Will try lsiutil again.

hg
 

hgeorges

New Member
Aug 8, 2014
5
0
1
66
1.65 ?! didn't know - will try to find it. Thanks for pointing that out.

As for Sas2flash - yes i used it as well, including the full erase (-7) command. Interesting enough it left behind those serial numbers and manufacturing dates - it didn't delete those. After erasure, I went directly to reprogram it with megarec, w/o the clearflash step (with imr_fw.rom )
I have a new theory that the card might have been "refurbished", recoded, relabeled and resold at some point. And my tinkering with it pulled up the initial settings - just a theory. Nothing to prove it... and running out of ideas and time I might just send it back this way, and hope for the best.