stanford-rc / sasutils

Serial Attached SCSI (SAS) Linux utilities and Python library
Apache License 2.0
62 stars 17 forks source link

Not found: '/sys/class/sas_host/host4/device/port-4:3/end_device-4:3/target4:0:3/4:0:3:0/scsi_generic/*[0-9]' #24

Open Luflosi opened 2 years ago

Luflosi commented 2 years ago

sas_counters, sas_devices, sas_discover, ses_report all fail with the error message Not found: '/sys/class/sas_host/host4/device/port-4:3/end_device-4:3/target4:0:3/4:0:3:0/scsi_generic/*[0-9]'. The /sys/class/sas_host/host4/device/port-4:3/end_device-4:3/target4:0:3/4:0:3:0/ directory does not contain a scsi_generic directory. This is my setup: I have a Dell PowerEdge R610 with an HBA in one of the PCIe slots. I then have a SAS SFF-8088 cable that connects to an EMC KTN-STL3 15 bay chassis with some SATA hard disks inside connected to interposers. I also have a second HBA card connected to the internal backplane of the server with some SATA SSDs connected to it. lspci shows my HBA cards as Serial Attached SCSI controller: Broadcom / LSI SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] (rev 03). Is this configuration supported or do I need SAS hard disks for sasutils to work? Maybe my hardware is too weird? I'm using sasutils installed via Nix (https://github.com/NixOS/nixpkgs/blob/41cc1d5d9584103be4108c1815c350e07c807036/pkgs/os-specific/linux/sasutils/default.nix) but that shouldn't matter. I'm running NixOS but I can also try this on Arch Linux as well if you want. I'll happily provide any additional information you may need to help you diagnose the issue.

aij commented 2 years ago

I really hope it's not NixOS-specific :sweat_smile: but I ran into the same when I didn't have the sg kernel module loaded (also on NixOS). modprobe sg or boot.kernelModules = [ "sg" ]; should do it.

Do other distros automatically load sg when running on supported hardware? Or does the sg3_utils package cause it to be loaded?

In any case, the error message could be improved IMHO, especially since /sys/class/sas_host/ could also be absent on machines without SAS.

Luflosi commented 2 years ago

I can confirm it works after loading the kernel module. I also think that the error message should be improved.

Luflosi commented 2 years ago

On Arch Linux I experienced the same behaviour, I also had to manually load the kernel module there.