im-0 / hpsahba

Tool to enable/disable HBA mode on some HP Smart Array controllers
GNU General Public License v2.0
129 stars 49 forks source link

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

Closed terryjx closed 4 years ago

terryjx commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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.

aleexon commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

Hi Terry, Thanks for your reply Your writeup is a marvelous narration . I learned a lot. I m new to linux and tried my best to adapt your command sequence .

Here is the command sequence out put , Please guide me what wrong I am doing. ?

========================================================================================================= linux-headers installation

root@kam-DL380-G7:/home/kam/hpsas410i# ls hp-firmware-smartarray-14ef73e580-6.64-2.i386.rpm libstdc++6_10-20200411-0ubuntu1_amd64.deb libstdc++6_10-20200411-0ubuntu1_i386.deb linux-headers-5.4.0-050400_5.4.0-050400.201911242031_all.deb linux-headers-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb linux-image-unsigned-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb linux-modules-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb soullog.txt usr

root@kam-DL380-G7:/home/kam/hpsas410i# ls -ltr total 77896 -rw-r--r-- 1 root root 6660608 Dec 31 2015 hp-firmware-smartarray-14ef73e580-6.64-2.i386.rpm -rw-r--r-- 1 root root 10898312 Nov 24 2019 linux-headers-5.4.0-050400_5.4.0-050400.201911242031_all.deb -rw-r--r-- 1 root root 8770020 Nov 24 2019 linux-image-unsigned-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb -rw-r--r-- 1 root root 51177700 Nov 24 2019 linux-modules-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb -rw-r--r-- 1 root root 1184100 Nov 24 2019 linux-headers-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb -rw-r--r-- 1 root root 503412 Apr 12 2020 libstdc++6_10-20200411-0ubuntu1_amd64.deb -rw-r--r-- 1 root root 541580 Apr 12 2020 libstdc++6_10-20200411-0ubuntu1_i386.deb drwxr-xr-x 3 root root 4096 Feb 6 19:43 usr -rw-r--r-- 1 root root 6786 Feb 6 20:54 soullog.txt

root@kam-DL380-G7:/home/kam/hpsas410i# ls -l

root@kam-DL380-G7:/home/kam/hpsas410i# dkms install --force -k 5.4.0-42 hpsa-dkms/1.0

Error! Your kernel headers for kernel 5.4.0-42 cannot be found.

Please install the linux-headers-5.4.0-42 package, or use the --kernelsourcedir option to tell DKMS where it's located

root@kam-DL380-G7:/home/kam/hpsas410i# mkdir linheaders

root@kam-DL380-G7:/home/kam/hpsas410i# mkdir linuxheaders

root@kam-DL380-G7:/home/kam/hpsas410i# cp linux. linuxheaders

root@kam-DL380-G7:/home/kam/hpsas410i# ls linuxheaders

linux-headers-5.4.0-050400_5.4.0-050400.201911242031_all.deb linux-headers-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb linux-image-unsigned-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb linux-modules-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb

root@kam-DL380-G7:/home/kam/hpsas410i# cd linuxheaders

root@kam-DL380-G7:/home/kam/hpsas410i/linuxheaders# dpkg -i .deb

dpkg: error: cannot access archive '.deb': No such file or directory

root@kam-DL380-G7:/home/kam/hpsas410i/linuxheaders# dpkg -i *.deb

(Reading database ... 239220 files and directories currently installed.) Preparing to unpack linux-headers-5.4.0-050400_5.4.0-050400.201911242031_all.deb ... Unpacking linux-headers-5.4.0-050400 (5.4.0-050400.201911242031) over (5.4.0-050400.201911242031) ... Preparing to unpack linux-headers-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb ... Unpacking linux-headers-5.4.0-050400-generic (5.4.0-050400.201911242031) over (5.4.0-050400.201911242031) ... Preparing to unpack linux-image-unsigned-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb ... Unpacking linux-image-unsigned-5.4.0-050400-generic (5.4.0-050400.201911242031) over (5.4.0-050400.201911242031) ... Preparing to unpack linux-modules-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb ... Unpacking linux-modules-5.4.0-050400-generic (5.4.0-050400.201911242031) over (5.4.0-050400.201911242031) ... Setting up linux-headers-5.4.0-050400 (5.4.0-050400.201911242031) ... Setting up linux-headers-5.4.0-050400-generic (5.4.0-050400.201911242031) ... /etc/kernel/header_postinst.d/dkms:

root@kam-DL380-G7:/home/kam/hpsas410i/linuxheaders#

I executed the patch file as instructed by wirter ./patch.sh

OUTPUT

5.0-patchset-v2 5.4-patchset-v2 5.7-patchset-v2 dkms

root@kam-DL380-G7:/home/kam/hpsahba/kernel# cd dkms

root@kam-DL380-G7:/home/kam/hpsahba/kernel/dkms# ls

dkms.conf hpsa.c hpsa_cmd.h hpsa.h Makefile MakefileOld patch.sh README.md

root@kam-DL380-G7:/home/kam/hpsahba/kernel/dkms# ./patch.sh

Patching for kernel 5.4

--2021-02-09 02:36:44-- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/plain/drivers/scsi/hpsa.h?h=linux-5.4.y Resolving git.kernel.org (git.kernel.org)... 2604:1380:4020:600::1, 147.75.58.133 Connecting to git.kernel.org (git.kernel.org)|2604:1380:4020:600::1|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 20347 (20K) [text/plain] Saving to: ‘hpsa.h’

hpsa.h 100%[============================>] 19.87K --.-KB/s in 0.02s

2021-02-09 02:36:44 (1.03 MB/s) - ‘hpsa.h’ saved [20347/20347]

--2021-02-09 02:36:44-- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/plain/drivers/scsi/hpsa.c?h=linux-5.4.y Resolving git.kernel.org (git.kernel.org)... 2604:1380:4020:600::1, 147.75.58.133 Connecting to git.kernel.org (git.kernel.org)|2604:1380:4020:600::1|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 279280 (273K) [text/plain] Saving to: ‘hpsa.c’

hpsa.c 100%[============================>] 272.73K --.-KB/s in 0.1s

2021-02-09 02:36:44 (2.32 MB/s) - ‘hpsa.c’ saved [279280/279280]

--2021-02-09 02:36:44-- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/plain/drivers/scsi/hpsa_cmd.h?h=linux-5.4.y Resolving git.kernel.org (git.kernel.org)... 2604:1380:4020:600::1, 147.75.58.133 Connecting to git.kernel.org (git.kernel.org)|2604:1380:4020:600::1|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 28832 (28K) [text/plain] Saving to: ‘hpsa_cmd.h’

hpsa_cmd.h 100%[============================>] 28.16K --.-KB/s in 0.02s

2021-02-09 02:36:44 (1.73 MB/s) - ‘hpsa_cmd.h’ saved [28832/28832]

Applying ../../kernel/5.4-patchset-v2/0001-scsi-hpsa-Add-function-to-check-if-device-is-a-disk-.patch patching file hpsa.c Hunk #1 succeeded at 771 (offset 6 lines). Hunk #2 succeeded at 796 (offset 6 lines). Hunk #3 succeeded at 863 (offset 6 lines). Hunk #4 succeeded at 1720 (offset 6 lines). Hunk #5 succeeded at 1773 (offset 5 lines). Hunk #6 succeeded at 3979 (offset 11 lines). Applying ../../kernel/5.4-patchset-v2/0002-scsi-hpsa-Support-HBA-mode-on-HP-Smart-Array-P410i-c.patch patching file hpsa.c Hunk #2 succeeded at 3073 (offset 4 lines). Hunk #3 succeeded at 4343 (offset 10 lines). Hunk #4 succeeded at 4443 (offset 10 lines). Hunk #5 succeeded at 4533 (offset 10 lines). patching file hpsa.h Applying ../../kernel/5.4-patchset-v2/0003-scsi-hpsa-Add-mask-existing-devices-on-rescan-if-vis.patch patching file hpsa.c Hunk #1 succeeded at 1542 (offset 6 lines). Hunk #2 succeeded at 1576 (offset 6 lines). Applying ../../kernel/5.4-patchset-v2/0004-scsi-hpsa-Ignore-HBA-flag-from-NVRAM-if-logical-devi.patch patching file hpsa.c Hunk #1 succeeded at 4375 (offset 10 lines). Hunk #2 succeeded at 4390 (offset 10 lines). Hunk #3 succeeded at 4457 (offset 10 lines). Applying ../../kernel/5.4-patchset-v2/0005-scsi-hpsa-Name-more-fields-in-struct-bmic_identify_c.patch patching file hpsa_cmd.h Applying ../../kernel/5.4-patchset-v2/0006-scsi-hpsa-Do-not-use-HBA-flag-from-NVRAM-if-HBA-is-n.patch patching file hpsa.c Hunk #1 succeeded at 4353 (offset 10 lines). Hunk #2 succeeded at 4381 (offset 10 lines). Hunk #3 succeeded at 4391 (offset 10 lines). Hunk #4 succeeded at 4469 (offset 10 lines).

patching file hpsa_cmd.h

root@kam-DL380-G7:/home/kam/hpsahba/kernel/dkms#

modprobe -r hpsa

sudo modprobe hpsa hpsa_use_nvram_hba_flag=1

modprobe hpsa

sudo echo "options hpsa hpsa_use_nvram_hba_flag=1" >

/etc/modprobe.d/hpsa.conf

update_initramfs

init 6

after reboot

root@kam-DL380-G7:/home/kam/hpsahba/sudo hpsahba -i /dev/sg1 VENDOR_ID='HP' PRODUCT_ID='P410i' BOARD_ID='0x3245103c' SOFTWARE_NAME='' HARDWARE_NAME='' RUNNING_FIRM_REV='6.64' ROM_FIRM_REV='6.63' REC_ROM_INACTIVE_REV='6.63' YET_MORE_CONTROLLER_FLAGS='0xfa71a216' NVRAM_FLAGS='0x08' HBA_MODE_SUPPORTED=1 HBA_MODE_ENABLED=1

lsblk

no Physical disks were attached . ( sdb sdc sdd ..... etc) only boot disk which i have connected through cdrom port was available as sda, sda1 sda2 sda5

Please guide me where i am doing wrong.

I will really appreciate for your kind help.

My best regards

On Tue, Feb 9, 2021 at 9:27 PM terryjx notifications@github.com wrote:

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.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/im-0/hpsahba/issues/7#issuecomment-776393572, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL2S3CIVZPFVQZJNWEI6VO3S6HVKDANCNFSM4NGTSYXQ .

aleexon commented 3 years ago

one thing I noticed after this command

uname -r

5.8.0-41-generic is active not 5.4

is this normal or any thing we will have to do ?

thanks

On Wed, Feb 10, 2021 at 1:10 AM Alee Xong aleexong@gmail.com wrote:

Hi Terry, Thanks for your reply Your writeup is a marvelous narration . I learned a lot. I m new to linux and tried my best to adapt your command sequence .

Here is the command sequence out put , Please guide me what wrong I am doing. ?

========================================================================================================= linux-headers installation

==================================================================================================

root@kam-DL380-G7:/home/kam/hpsas410i# ls hp-firmware-smartarray-14ef73e580-6.64-2.i386.rpm libstdc++6_10-20200411-0ubuntu1_amd64.deb libstdc++6_10-20200411-0ubuntu1_i386.deb linux-headers-5.4.0-050400_5.4.0-050400.201911242031_all.deb linux-headers-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb

linux-image-unsigned-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb linux-modules-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb soullog.txt usr

root@kam-DL380-G7:/home/kam/hpsas410i# ls -ltr total 77896 -rw-r--r-- 1 root root 6660608 Dec 31 2015 hp-firmware-smartarray-14ef73e580-6.64-2.i386.rpm -rw-r--r-- 1 root root 10898312 Nov 24 2019 linux-headers-5.4.0-050400_5.4.0-050400.201911242031_all.deb -rw-r--r-- 1 root root 8770020 Nov 24 2019 linux-image-unsigned-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb -rw-r--r-- 1 root root 51177700 Nov 24 2019 linux-modules-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb -rw-r--r-- 1 root root 1184100 Nov 24 2019 linux-headers-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb -rw-r--r-- 1 root root 503412 Apr 12 2020 libstdc++6_10-20200411-0ubuntu1_amd64.deb -rw-r--r-- 1 root root 541580 Apr 12 2020 libstdc++6_10-20200411-0ubuntu1_i386.deb drwxr-xr-x 3 root root 4096 Feb 6 19:43 usr -rw-r--r-- 1 root root 6786 Feb 6 20:54 soullog.txt

root@kam-DL380-G7:/home/kam/hpsas410i# ls -l

root@kam-DL380-G7:/home/kam/hpsas410i# dkms install --force -k 5.4.0-42 hpsa-dkms/1.0

Error! Your kernel headers for kernel 5.4.0-42 cannot be found.

Please install the linux-headers-5.4.0-42 package, or use the --kernelsourcedir option to tell DKMS where it's located

root@kam-DL380-G7:/home/kam/hpsas410i# mkdir linheaders

root@kam-DL380-G7:/home/kam/hpsas410i# mkdir linuxheaders

root@kam-DL380-G7:/home/kam/hpsas410i# cp linux. linuxheaders

root@kam-DL380-G7:/home/kam/hpsas410i# ls linuxheaders

linux-headers-5.4.0-050400_5.4.0-050400.201911242031_all.deb linux-headers-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb

linux-image-unsigned-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb linux-modules-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb

root@kam-DL380-G7:/home/kam/hpsas410i# cd linuxheaders

root@kam-DL380-G7:/home/kam/hpsas410i/linuxheaders# dpkg -i .deb

dpkg: error: cannot access archive '.deb': No such file or directory

root@kam-DL380-G7:/home/kam/hpsas410i/linuxheaders# dpkg -i *.deb

(Reading database ... 239220 files and directories currently installed.) Preparing to unpack linux-headers-5.4.0-050400_5.4.0-050400.201911242031_all.deb ... Unpacking linux-headers-5.4.0-050400 (5.4.0-050400.201911242031) over (5.4.0-050400.201911242031) ... Preparing to unpack linux-headers-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb ... Unpacking linux-headers-5.4.0-050400-generic (5.4.0-050400.201911242031) over (5.4.0-050400.201911242031) ... Preparing to unpack linux-image-unsigned-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb ... Unpacking linux-image-unsigned-5.4.0-050400-generic (5.4.0-050400.201911242031) over (5.4.0-050400.201911242031) ... Preparing to unpack linux-modules-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb ... Unpacking linux-modules-5.4.0-050400-generic (5.4.0-050400.201911242031) over (5.4.0-050400.201911242031) ... Setting up linux-headers-5.4.0-050400 (5.4.0-050400.201911242031) ... Setting up linux-headers-5.4.0-050400-generic (5.4.0-050400.201911242031) ... /etc/kernel/header_postinst.d/dkms:

  • dkms: running auto installation service for kernel 5.4.0-050400-generic ...done. Setting up linux-modules-5.4.0-050400-generic (5.4.0-050400.201911242031) ... Setting up linux-image-unsigned-5.4.0-050400-generic (5.4.0-050400.201911242031) ... Processing triggers for linux-image-unsigned-5.4.0-050400-generic (5.4.0-050400.201911242031) ... /etc/kernel/postinst.d/dkms:
  • dkms: running auto installation service for kernel 5.4.0-050400-generic ...done. /etc/kernel/postinst.d/initramfs-tools: update-initramfs: Generating /boot/initrd.img-5.4.0-050400-generic /etc/kernel/postinst.d/zz-update-grub: Sourcing file /etc/default/grub' Sourcing file/etc/default/grub.d/init-select.cfg' Generating grub configuration file ... Found linux image: /boot/vmlinuz-5.8.0-41-generic Found initrd image: /boot/initrd.img-5.8.0-41-generic Found linux image: /boot/vmlinuz-5.4.0-050400-generic Found initrd image: /boot/initrd.img-5.4.0-050400-generic Found linux image: /boot/vmlinuz-5.4.0-42-generic Found initrd image: /boot/initrd.img-5.4.0-42-generic Found memtest86+ image: /boot/memtest86+.elf Found memtest86+ image: /boot/memtest86+.bin done

root@kam-DL380-G7:/home/kam/hpsas410i/linuxheaders#

I executed the patch file as instructed by wirter ./patch.sh

OUTPUT

5.0-patchset-v2 5.4-patchset-v2 5.7-patchset-v2 dkms

root@kam-DL380-G7:/home/kam/hpsahba/kernel# cd dkms

root@kam-DL380-G7:/home/kam/hpsahba/kernel/dkms# ls

dkms.conf hpsa.c hpsa_cmd.h hpsa.h Makefile MakefileOld patch.sh README.md

root@kam-DL380-G7:/home/kam/hpsahba/kernel/dkms# ./patch.sh

Patching for kernel 5.4

--2021-02-09 02:36:44-- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/plain/drivers/scsi/hpsa.h?h=linux-5.4.y Resolving git.kernel.org (git.kernel.org)... 2604:1380:4020:600::1, 147.75.58.133 Connecting to git.kernel.org (git.kernel.org)|2604:1380:4020:600::1|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 20347 (20K) [text/plain] Saving to: ‘hpsa.h’

hpsa.h 100%[============================>] 19.87K --.-KB/s in 0.02s

2021-02-09 02:36:44 (1.03 MB/s) - ‘hpsa.h’ saved [20347/20347]

--2021-02-09 02:36:44-- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/plain/drivers/scsi/hpsa.c?h=linux-5.4.y Resolving git.kernel.org (git.kernel.org)... 2604:1380:4020:600::1, 147.75.58.133 Connecting to git.kernel.org (git.kernel.org)|2604:1380:4020:600::1|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 279280 (273K) [text/plain] Saving to: ‘hpsa.c’

hpsa.c 100%[============================>] 272.73K --.-KB/s in 0.1s

2021-02-09 02:36:44 (2.32 MB/s) - ‘hpsa.c’ saved [279280/279280]

--2021-02-09 02:36:44-- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/plain/drivers/scsi/hpsa_cmd.h?h=linux-5.4.y Resolving git.kernel.org (git.kernel.org)... 2604:1380:4020:600::1, 147.75.58.133 Connecting to git.kernel.org (git.kernel.org)|2604:1380:4020:600::1|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 28832 (28K) [text/plain] Saving to: ‘hpsa_cmd.h’

hpsa_cmd.h 100%[============================>] 28.16K --.-KB/s in 0.02s

2021-02-09 02:36:44 (1.73 MB/s) - ‘hpsa_cmd.h’ saved [28832/28832]

Applying ../../kernel/5.4-patchset-v2/0001-scsi-hpsa-Add-function-to-check-if-device-is-a-disk-.patch patching file hpsa.c Hunk #1 succeeded at 771 (offset 6 lines). Hunk #2 succeeded at 796 (offset 6 lines). Hunk #3 succeeded at 863 (offset 6 lines). Hunk #4 succeeded at 1720 (offset 6 lines). Hunk #5 succeeded at 1773 (offset 5 lines). Hunk #6 succeeded at 3979 (offset 11 lines). Applying ../../kernel/5.4-patchset-v2/0002-scsi-hpsa-Support-HBA-mode-on-HP-Smart-Array-P410i-c.patch patching file hpsa.c Hunk #2 succeeded at 3073 (offset 4 lines). Hunk #3 succeeded at 4343 (offset 10 lines). Hunk #4 succeeded at 4443 (offset 10 lines). Hunk #5 succeeded at 4533 (offset 10 lines). patching file hpsa.h Applying ../../kernel/5.4-patchset-v2/0003-scsi-hpsa-Add-mask-existing-devices-on-rescan-if-vis.patch patching file hpsa.c Hunk #1 succeeded at 1542 (offset 6 lines). Hunk #2 succeeded at 1576 (offset 6 lines). Applying ../../kernel/5.4-patchset-v2/0004-scsi-hpsa-Ignore-HBA-flag-from-NVRAM-if-logical-devi.patch patching file hpsa.c Hunk #1 succeeded at 4375 (offset 10 lines). Hunk #2 succeeded at 4390 (offset 10 lines). Hunk #3 succeeded at 4457 (offset 10 lines). Applying ../../kernel/5.4-patchset-v2/0005-scsi-hpsa-Name-more-fields-in-struct-bmic_identify_c.patch patching file hpsa_cmd.h Applying ../../kernel/5.4-patchset-v2/0006-scsi-hpsa-Do-not-use-HBA-flag-from-NVRAM-if-HBA-is-n.patch patching file hpsa.c Hunk #1 succeeded at 4353 (offset 10 lines). Hunk #2 succeeded at 4381 (offset 10 lines). Hunk #3 succeeded at 4391 (offset 10 lines). Hunk #4 succeeded at 4469 (offset 10 lines).

patching file hpsa_cmd.h

root@kam-DL380-G7:/home/kam/hpsahba/kernel/dkms#

modprobe -r hpsa

sudo modprobe hpsa hpsa_use_nvram_hba_flag=1

modprobe hpsa

sudo echo "options hpsa hpsa_use_nvram_hba_flag=1" >

/etc/modprobe.d/hpsa.conf

update_initramfs

init 6

after reboot

root@kam-DL380-G7:/home/kam/hpsahba/sudo hpsahba -i /dev/sg1 VENDOR_ID='HP' PRODUCT_ID='P410i' BOARD_ID='0x3245103c' SOFTWARE_NAME='' HARDWARE_NAME='' RUNNING_FIRM_REV='6.64' ROM_FIRM_REV='6.63' REC_ROM_INACTIVE_REV='6.63' YET_MORE_CONTROLLER_FLAGS='0xfa71a216' NVRAM_FLAGS='0x08' HBA_MODE_SUPPORTED=1 HBA_MODE_ENABLED=1

lsblk

no Physical disks were attached . ( sdb sdc sdd ..... etc) only boot disk which i have connected through cdrom port was available as sda, sda1 sda2 sda5

Please guide me where i am doing wrong.

I will really appreciate for your kind help.

My best regards

On Tue, Feb 9, 2021 at 9:27 PM terryjx notifications@github.com wrote:

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.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/im-0/hpsahba/issues/7#issuecomment-776393572, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL2S3CIVZPFVQZJNWEI6VO3S6HVKDANCNFSM4NGTSYXQ .

aleexon commented 3 years ago

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 commented 3 years ago

Hi Aleexon,

I'm quite tied up and slow recently and it will last for quite long time and sorry for the late response.

Honestly I have not fully check your posted log yet since it's a little bit long, but I found a few issues at a quick glance, such as you seemed have not installed the kernel source on your system yet, and the source code is essential for the subsequent steps.

Just to help you reproduce the work asap, my suggestion is:

Since some people have already managed to reproduce a good result based on the guide, I believe the guide should be somehow useful.

Sorry but this is the maximum that I can help out here since I'm really running low on bandwidth because of a recent surgery and many other incoming tasks from my job, as you can see, I've not been writing any new post for my tech blog for months already.

Best Regards, Terry YIN

Get Outlook for Androidhttps://aka.ms/ghei36


From: aleexon notifications@github.com Sent: Thursday, February 11, 2021 2:11:04 PM To: im-0/hpsahba hpsahba@noreply.github.com Cc: terryjx terryjx@outlook.com; Author author@noreply.github.com Subject: Re: [im-0/hpsahba] P410i /dev/sg0 report error when enabling HBA mode (#7)

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/im-0/hpsahba/issues/7#issuecomment-777224222, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJP4QOTYO2PIVU3GT547RLTS6NYHRANCNFSM4NGTSYXQ.