Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P410i /dev/sg0 report error when enabling HBA mode #7

Closed
terryjx opened this issue May 21, 2020 · 10 comments
Closed

P410i /dev/sg0 report error when enabling HBA mode #7

terryjx opened this issue May 21, 2020 · 10 comments

Comments

@terryjx
Copy link

terryjx commented May 21, 2020

Hi,

I tried to use this tool on Smart Array P410i, to enable its HBA mode, and here is my environment:
HP DL380 Gen7 server,
Ubuntu 18.04 LTS HWE, installed on a SATA SSD connected to system via the SATA port for the optical drive, which should be bypassing the P410i card.
Kernel 5.3.0-53-generic

Before running "hpsahba -E", I have three relevant devices which are /dev/sg0, /dev/sg1 and /dev/sg2.

I was able to run "hpsahba -E /dev/sg1" without any error, but when I run "hpsahba -E /dev/sg0", the system gave the following error:
FATAL ERROR: /dev/sg0: ioctl(CCISS_PASSTHRU) failed with command BMIC_IDENTIFY_CONTROLLER, rc == -1: 25 Inappropriate ioctl for device
After running this, no changes are observed on the output of lsblk and the number of sgX device under /dev/

After running "hpsahba -E /dev/sg1, I noticed that two hard disks that connected to the P410i has gone from the output of lsblk command. And the sg2 device has gone under /dev/ folder.

I enabled hpsa.hpsa_use_nvram_hba_flag=1 in grub, and hpsa module is showing up in lsmod output.

What I did not do is patching the kernel patches that you provided. If the issue is with the kernel patch, could you advise how should the patching by done in my case?

Best Regards,
Terry YIN

@artizirk
Copy link
Contributor

You need to patch the kernel for it to work. I have created a branch with DKMS support that allows for simpler patching of hpsa driver https://github.com/artizirk/hpsahba/tree/dkms/kernel/dkms
It should work with 5.4 kernel in Ubuntu 20.04, don't know about other versions.

@terryjx
Copy link
Author

terryjx commented May 22, 2020

You need to patch the kernel for it to work. I have created a branch with DKMS support that allows for simpler patching of hpsa driver https://github.com/artizirk/hpsahba/tree/dkms/kernel/dkms
It should work with 5.4 kernel in Ubuntu 20.04, don't know about other versions.

Hi Artizirk,

Thanks a lot for the help, and I just tested it and it works after some tweaking for my system.

As spoken, my system is Ubuntu 18.04 LTS HWE, so I first upgrade kernel to version 5.4.0-050400.

And because the location of the kernel source file for Ubuntu is /lib/modules/ rather than /usr/lib/modules/, so I adapt your KDIR variable in your Makefile accordingly.

One issue that I noticed is that it does not stay effective across reboot. Everytime I reboot the system, I have to "modprobe hpsa" again, otherwise there will be no RAID card connected drives showing up in lsblk. I'm pretty sure that the updated HPSA modules are automatically loaded after rebooting, but I still need to modprobe it again. Have you seen anything similar on your side?

Regards,
Terry

@artizirk
Copy link
Contributor

Old driver is probably loaded in initramfs and needs a rebuild, you may also need to add the module option to /etc/modprobe.d folder.

@terryjx
Copy link
Author

terryjx commented May 22, 2020

Old driver is probably loaded in initramfs and needs a rebuild, you may also need to add the module option to /etc/modprobe.d folder.

I actually did update initramfs using update-initramfs after loading dkms modules. I also checked dmesg output but did not find any outstanding error.

I kind of checked & tried a few different methods, however, without knowing what happened, in one of my attempts, it suddenly works. I mean the bare drives could be exposed to OS now even across reboot. I'm still trying to figure out what happened here and will shall it out when it's confirmed.

@im-0 im-0 closed this as completed Jul 18, 2020
@aleexon
Copy link

aleexon commented Feb 7, 2021

terryjx: can you please elaborate the steps how you patched the kernel , I do see the output of hpsahba where HBA MOD=ENABLE , but my disks are not getting attached I tried to follow the instructions from here and there but no success. thanks

@terryjx
Copy link
Author

terryjx commented Feb 10, 2021

terryjx: can you please elaborate the steps how you patched the kernel , I do see the output of hpsahba where HBA MOD=ENABLE , but my disks are not getting attached I tried to follow the instructions from here and there but no success. thanks

Hi Alleexon,

Please try take a look at my blog post guide below:
https://medium.com/@terryjx/enable-it-mode-on-hp-smart-array-p410i-raid-card-on-hp-dl380-gen7-servers-4e827eeb78ca

Some people replied that they got it working by following the guide.

@aleexon
Copy link

aleexon commented Feb 10, 2021 via email

@aleexon
Copy link

aleexon commented Feb 10, 2021 via email

@aleexon
Copy link

aleexon commented Feb 11, 2021

Still waiting an answer from experts.
My ubuntu version is 20.xx desktop I rolled back the kernel to 5.4xxx from 5.8 and patched again with kernel headers and repeated all the steps but no luck in HPSAHBA -i I get the Hba Enabled and working, but no disks attached showing in lsblk, any clue or help what wrong I am doing ? thanks

@terryjx
Copy link
Author

terryjx commented Feb 11, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants