sg3_utils icon indicating copy to clipboard operation
sg3_utils copied to clipboard

sg_scan -s (on windows) not seeing any enclosures

Open Dark-Sider opened this issue 3 years ago • 8 comments

Hi,

I was instructed by the vendor (AICIPC) of one of our JBODs to adjust some settings on the JBOD using sg_ses. I downloaded version 1.46 of the windows build of the sg_utils and pushed to our server (Dell 740xd with H740p and H840 raid cards).

I opened an elevated command shell and executed sg_scan -s to get a list of the bus devices. The tool only returns the virtual disks configured on the adapter. No Enclosures are listed. Is there a known issue with the latest windows server version and Dell Cards?

regards Fabian

Dark-Sider avatar Apr 14 '21 16:04 Dark-Sider

I did some more research myself on the issue. As it turns out, the DELL Raid Cards hide the enclosures from the os. With Dell's version of storcli (perccli) a command can be issued to make them visible to the OS. The command is: perccli /cx set backplane expose=<on/off>

As Dell Cards are not that uncommon it might be a good idea to document this behavior within sg_scan or it's manpage

I'm now able to retrieve the Address of the Enclosure in the form of: SCSI1:0,90,0 however I cannot issue any sg_ses commands/queries. I always get:

inquiry: bad pass-through setup
unknown or no device type device (not an enclosure)
Receive diagnostic results: bad pass-through setup

The same happens with a vanilla LSI 9280-24i8i card.

regards, Fabian

Dark-Sider avatar Apr 15 '21 10:04 Dark-Sider

The Megaraid SAS HBAs have a complete SCSI emulation internally, so any command you send will have to be interpreted by firmware. Chances are that it simply doesn't understand SES commands. However, please attach the verbose output (ie the actual SCSI CDBs which are sent) to check if there's something wrong in the program.

hreinecke avatar Apr 15 '21 12:04 hreinecke

sure:

C:\Users\Administrator\Desktop\sg_utils>sg_ses.exe -vv -p 7 "SCSI2:0,91,0"
    inquiry cdb: [12 00 00 00 24 00]
No command (cdb) given
inquiry: bad pass-through setup

    unknown or no device type device (not an enclosure)
    request sense cdb: [03 00 00 00 fc 00]
    request sense: pass-through requested 252 bytes (data-in), got  got 18 bytes
Request Sense near startup detected something:
  Sense key: No Sense, additional: Additional sense: No additional sense information
  ... continue
    Receive diagnostic results command for Element Descriptor (SES) dpage
    Receive diagnostic results cdb: [1c 01 07 ff fc 00]
No command (cdb) given
Receive diagnostic results: bad pass-through setup
Invalid response, wanted page code: 0x7 but got 0x0
 00     00 00 00 00                                         ....

I also tried the SCSI2:... with and without quotation

Dark-Sider avatar Apr 15 '21 15:04 Dark-Sider

Yes, it's a bug in sg_ses. More precisely in the Windows variant of the common library under these utilities. sg_ses uses this library is a slightly different way. I have updated my mirror: https://github.com/doug-gilbert/sg3_utils which may take a little while arriving here. If you can build and test it, please tell me how that goes. I tested it on W10 with the LSI SAS-2 HBA (9212) as I don't have any functioning MR controllers. If you need sg_ses executable, please contact me directly.

doug-gilbert avatar May 03 '21 14:05 doug-gilbert

Yes, it's a bug in sg_ses. More precisely in the Windows variant of the common library under these utilities. sg_ses uses this library is a slightly different way. I have updated my mirror: https://github.com/doug-gilbert/sg3_utils which may take a little while arriving here. If you can build and test it, please tell me how that goes. I tested it on W10 with the LSI SAS-2 HBA (9212) as I don't have any functioning MR controllers. If you need sg_ses executable, please contact me directly.

Thanks for taking a look at this! Unfortunately I don't have a tool-chain setup right now to compile it myself. Please forgive me this stupid question - how do I contact you directly, I don't see any options on github (I'm not a very experienced github user)

Dark-Sider avatar May 04 '21 10:05 Dark-Sider

I have built a zip of 64 bit exes on W10 here: https://doug-gilbert.github.io/p/sg3_utils-1.47r900cyg_exe.zip . It is a beta, not a release. Github might block those urls so it can also be found in the Downloads section of https://doug-gilbert.github.io/sg3_utils.html or https://sg.danny.cz/sg/sg3_utils.html . It was built with Cygin tools. Please tell me how sg_ses.exe goes with your hardware. My email is [email protected] and is shown in most manpages associated with that package. I will add it to the bottom of the README file so it appears on the main github page.

doug-gilbert avatar May 04 '21 16:05 doug-gilbert

Thanks for the build! Now sg_ses seems to work very well - I can retrieve all pages.

Dark-Sider avatar May 04 '21 20:05 Dark-Sider

Good to read that that problem is sorted. Were you able to tweak the settings in your JBOD? There is now a paragraph in man sg_ses about using the 'perccli /cx set backplane expose=<on/off>' command as you suggested.

doug-gilbert avatar May 07 '21 15:05 doug-gilbert