How does one cause a Megaraid controller to “re-scan” the devices

megaraidpassthroughsupermicro

We are using a Supermicro Megaraid card (2208) and we are trying to perform some SCSI operations directly on the drives using the passthrough ioctl. One issue that we have run into is that when we change something on the drive (say it's visible capacity), the megaraid controller does not "see" the change and tries to access the drive as if it still has the original capacity.

Physically pulling the drive out, waiting for a few seconds and returning it – solves the problem.

It seems that if we had a way to tell the Megaraid controller to "re-scan" the device we would be all set, the problem is that we don't know how to do it. Does anyone know how to do it?

Thanks in advance

Best Answer

If pulling and re-inserting the drive helps, consider using the megarc utility to power off and re-power the drive:

megarc -physOff -a0 pd[x:y]
megarc -physOn -a0 pd[x:y]

Also take a look at MegaCLI - the CLI configuration utility for LSI MegaRAID controllers. It offers a whole variety of RAID- and PD-related commands and is more widely supported. If using it to offline and re-online the drive with the -PDOffline and -PDOnline commands would help as well, I would advise using this route instead.

Related Topic