TkTech / smartie

Pure-python ATA/SATA/ATAPI/SCSI and disk enumeration library for Linux/Windows/OS X.
https://tkte.ch/smartie/
MIT License
11 stars 5 forks source link

Help to test this tool in HBA/RAID #4

Closed jackeichen closed 5 months ago

jackeichen commented 1 year ago

I can help to test this tool with HBA/RAID controllers. I think this code may support disk thourgh HBA and JBOD Mode through RAID.

I will attach the test result in future.

TkTech commented 1 year ago

That would be awesome! I simply don't have access to the hardware necessary so I have no way to even begin implementing it.

jackeichen commented 1 year ago

It's my honour to do some work for this project, and I benifit very much from it.

It may take several weeks to finish these tests. Bellow is my test points, please let me know if you want more:

  1. disks(with HBA or RAID Card) scan in system;
  2. disk(from step1) info check, like model,serial, temperature.
    
    from smartie.device import get_all_devices

for device in get_all_devices(): print(device.path) print(device.model) print(device.serial) print(device.temperature)

jackeichen commented 1 year ago

For SATA HDD&SSD: Broadcom RAID 9440 and 9560 test pass in JBOD Mode test pass; Broadcom HBA 9500 test pass.

SAS Disk and More RAID&HBA will be test in future.

TkTech commented 1 year ago

@jackeichen are you testing these as part of your pydiskcmd work? I should put together a support matrix and see if it can't be shared between the two.

jackeichen commented 1 year ago

@jackeichen are you testing these as part of your pydiskcmd work? I should put together a support matrix and see if it can't be shared between the two.

Yes, in early time, the same Broadcom RAID card and another PMC RAID card is tested for pydiskcmd. But like smartie, pydiskcmd is a fun side project, too. I didn't test all of the commands with a raid or HBA card. So far, no different behavior among smartmontools, smartie and pydiskcmd in my limited test case. A potential problem is that I didn't compare the command's structure between smartie and pydiskcmd, I‘m not sure if we can put together a support matrix and shared it between the two. A safer way is to do test in all the two projects (I could help on it). Let me know if you have any other ideas.

Besides, I add more information about the test for smartie in my last comment. SAS Disk should be tested in tomorrow, while more RAID&HBA will be test in the future.

jackeichen commented 1 year ago

I will add pyscsi cdb-passthru to pydiskcmd, which can pass through a raw CDB request to device. Then I could test all the command structure in smartie. I think this will help to put together a support matrix.

jackeichen commented 6 months ago

For SATA HDD&SSD: Broadcom RAID 9440 and 9560 test pass in JBOD Mode test pass; Broadcom HBA 9500 test pass.

SAS Disk and More RAID&HBA will be test in future.

Add new support RAID:

  1. ThinkSystem 4350 series;
  2. ThinkSystem 5350 series;
jackeichen commented 5 months ago

The test will focus on the raw command structures. The key point of compatibility is the controller driver could transfer the scsi commands and the scsi command is built in correct format.

Three scsi commands in smartie are included:

The command will be sent with # pyscsi cdb-passthru XX XX XX XX XX XX ...

Plz tell me if it is enough, or I will close this issue.

jackeichen commented 5 months ago

pull request 2dae1b457ba2aac8279d7c43bdba3912fdd79fef