dkms compilation error pve6.2

auranext

Well-Known Member
Jun 5, 2018
54
2
48
123
Hello,

On pve5.3 and pve6.2 we experience many disk errors with p840 hardware disk controller and hpsa module version 3.4.20.170 and fewer.

Randomly the driver do not respond to IO requests which results in disk reset.
a higher version (3.4.20.188) of hpsa seems to fix the pb.

https://sourceforge.net/projects/cciss/files/hpsa-3.0-tarballs/

To test this version we need to compile the appropriate hpsa module.

Steps:
# apt-get update ; apt-get install pve-headers-5.4.78-2-pve
# apt-get install dkms build-essential
# tar xjvf hpsa-3.4.20-188.tar.bz2
# cd hpsa-3.4.20/drivers/
# sudo cp -a scsi /usr/src/hpsa-3.4.20.188
# dkms add -m hpsa -v 3.4.20.188
# dkms build -m hpsa -v 3.4.20.188
# dkms install -m hpsa -v 3.4.20.188

dkms build return an error :

DKMS make.log for hpsa-3.4.20.188 for kernel 5.4.78-2-pve (x86_64)
Mon 11 Jan 2021 03:44:36 PM CET
make: *** No targets. Stop.

I have already tested to compil hpsa 3.4.20.196 version

dkms build return an error :

DKMS make.log for hpsa-3.4.20.196 for kernel 5.4.78-2-pve (x86_64)
Mon 11 Jan 2021 04:27:23 PM CET
make -C /lib/modules/5.4.78-2-pve/build M=/var/lib/dkms/hpsa/3.4.20.196/build EXTRA_CFLAGS+=-D modules
make[1]: Entering directory '/usr/src/linux-headers-5.4.78-2-pve'
CC [M] /var/lib/dkms/hpsa/3.4.20.196/build/hpsa.o
<command-line>: error: macro names must be identifiers
In file included from /var/lib/dkms/hpsa/3.4.20.196/build/hpsa.c:61:
/var/lib/dkms/hpsa/3.4.20.196/build/hpsa_kernel_compat.h: In function ‘hpsa_compat_init_scsi_host_template’:
/var/lib/dkms/hpsa/3.4.20.196/build/hpsa_kernel_compat.h:958:7: error: ‘struct scsi_host_template’ has no member named ‘use_clustering’
hostt->use_clustering = ENABLE_CLUSTERING;
^~
/var/lib/dkms/hpsa/3.4.20.196/build/hpsa_kernel_compat.h:958:26: error: ‘ENABLE_CLUSTERING’ undeclared (first use in this function); did you mean ‘APIC_CLUSTERID’?
hostt->use_clustering = ENABLE_CLUSTERING;
^~~~~~~~~~~~~~~~~
APIC_CLUSTERID
/var/lib/dkms/hpsa/3.4.20.196/build/hpsa_kernel_compat.h:958:26: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/hpsa/3.4.20.196/build/hpsa.c: At top level:
/var/lib/dkms/hpsa/3.4.20.196/build/hpsa.c:1084:13: error: initialization of ‘int (*)(struct scsi_device *, unsigned int, void *)’ from incompatible pointer type ‘int (*)(struct scsi_device *, int, void *)’ [-Werror=incompatible-pointer-types]
.ioctl = hpsa_ioctl,
^~~~~~~~~~
/var/lib/dkms/hpsa/3.4.20.196/build/hpsa.c:1084:13: note: (near initialization for ‘hpsa_driver_template.ioctl’)
/var/lib/dkms/hpsa/3.4.20.196/build/hpsa.c:1089:19: error: initialization of ‘int (*)(struct scsi_device *, unsigned int, void *)’ from incompatible pointer type ‘int (*)(struct scsi_device *, int, void *)’ [-Werror=incompatible-pointer-types]
.compat_ioctl = hpsa_compat_ioctl,
^~~~~~~~~~~~~~~~~
/var/lib/dkms/hpsa/3.4.20.196/build/hpsa.c:1089:19: note: (near initialization for ‘hpsa_driver_template.compat_ioctl’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:275: /var/lib/dkms/hpsa/3.4.20.196/build/hpsa.o] Error 1
make[1]: *** [Makefile:1757: /var/lib/dkms/hpsa/3.4.20.196/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.4.78-2-pve'
make: *** [Makefile:103: default] Error 2

does anyone know this pb ?
some help would be appreciated...

thank you
 
Randomly the driver do not respond to IO requests which results in disk reset.
a higher version (3.4.20.188) of hpsa seems to fix the pb.
any link to the bugreport where this is fixed? (would help in understanding the problem and also to point potential other users who run into it there...

make: *** No targets. Stop.
my guess is that something went wrong during setting up the paths
what's inside /usr/src/hpsa-3.4.20.188 ? does it have a Makefile?

any output from the dkms add command?!
 
Thank you for your attention

I'm not sure that this fixes the bug, that's why I would like to test it.
the link to release changelog

https://sourceforge.net/projects/cciss/files/hpsa-3.0-tarballs/
Version 3.4.20-188 - January 2020 - Corrected reset handler to wait for all outstanding commands to a device to complete before returning. - Increased the timeout value for commands sent to the controller device for heavy I/O situations when RAID volumes are being created. - Corrected SCSI command status issue after reset. To work around an OS bug where SCSI command status is not cleared after a device reset - Updated kernel compatibility.

Bash:
root@CLIPVE03:~/hpsa-buildir/hpsa-3.4.20/drivers# ls -lah /usr/src/hpsa-3.4.20.188
total 513K
drwxr-xr-x 2  600  600   10 Oct 25  2019 .
drwxr-xr-x 6 root root    6 Jan 11 17:48 ..
-rw-r--r-- 1  600  600  382 Oct 25  2019 dkms.conf
-rw-r--r-- 1  600  600 281K Oct 25  2019 hpsa.c
-rwxr-xr-x 1  600  600  29K Oct 25  2019 hpsa_cmd.h
-rwxr-xr-x 1  600  600  19K Oct 25  2019 hpsa.h
-rw-r--r-- 1  600  600  30K Oct 25  2019 hpsa_kernel_compat.h
-rw-r--r-- 1  600  600   37 Oct 25  2019 Makefile
-rw-r--r-- 1  600  600 3.1K Oct 25  2019 Makefile.alt
-rw-r--r-- 1  600  600   17 Oct 25  2019 Module.supported

dkms add command output success
Tomorrow I will reproduce the command and catch the output

best regards
 
dkms add -m hpsa -v 3.4.20.188


Creating symlink /var/lib/dkms/hpsa/3.4.20.188/source ->
/usr/src/hpsa-3.4.20.188

DKMS: add completed.

=> dkms add completed without error
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!