Hi everyone!
See story below!
- Install Buildtools:
yum install make gcc kernel-devel
-
Download latest driver for your Card - maybe works also for other Adaptec Cards:
https://storage.microsemi.com/en-us/support/raid/
--> Linux Driver Source
-
Unpack the Sourcefolder
-
For the compilation to work for XCP-NG you have to specifiy the C-Preprocessor-Definition: "AAC_CITRIX"! (add "#define AAC_CITRIX" to the beginning of the aacraid.h-File.)
sed -i '1s/^/#define AAC_CITRIX\n/' ~/aacraid-1.2.1-60001/aacraid.h
- Compile
make
- Copy resulting Kernel-Module into the Place where it is called.
cp aacraid.ko /lib/modules/4.19.0+1/updates/
depmod -a
modprobe -v aacraid
dracut -f /boot/initrd-4.19.0+1.img 4.19.0+1
- To check initramfs:
lsinitrd /boot/initrd-4.19.0+1.img | grep aacraid
Reboot and be Happy - hopefully
Story:
I replaced my Adaptec ASR-6405E PCI-Raid-Controller-Card with the ASR-8405E.
Getting the Adaptec ASR-6405E to run was quite a challange for me, see this forum-post how to do it.
With the Kernel and the ALT-Kernel I got no connection to the controller -> If I remember correctly; Maybe I failed to Update Initramfs from my old raid-card-driver which caused this - I am not sure because I am still learning how linux works.
I got the following following Error during boot (and dmesg | head) - not sure anymore what driver was loaded:
AAC0: fib_map_alloc:pci_alloc_consistent failed
After a lot of involvment with the Source-Code of the Driver of Adaptech my insight was that there are two Driver Branches of the so called "aacraid" driver.
One is maintained from Linux Kernel Team (https://www.kernel.org/) and the other from the manufacturer Adaptec (https://storage.microsemi.com/en-us/support/raid/).
XCP-NG 8.2 uses at the moment of this writing the Driver Version from the Linux Branch:
microsemi-aacraid: (built-in) 1.2.1[50877]-custom
Source1: https://github.com/xcp-ng/xcp/wiki/Drivers
https://github.com/torvalds/linux/commit/1cdb74b80f93343d7b44b5d99b28d9b0c46375ba <--???
I don't know how PCI works and I am not a Driver-Developer but the following code-area here is the source of the fib_map_alloc error. It seems that Xenserver has other restrictions on some pci-parameters than the normal Linux kernel - therfore it's necessary to give the Compiler the Preprocessor-Definition "AAC_CITRIX" so that some allocated Memory gets properly managed by the driver to work with XCP-NG.
Filename: comminit.c (Driver Version 56008 from Adaptec-Website)
...
if (aac_is_src(dev)) {
#if(defined(AAC_CITRIX)) /*<------ /*
if (host -> can_queue > 248)
host -> can_queue = 248;
#elif(defined(CONFIG_XEN) && LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19))
if (host -> can_queue > 128)
host -> can_queue = 128;
#else
if (host -> can_queue > (status[3] >> 16) - AAC_NUM_MGT_FIB)
host -> can_queue = (status[3] >> 16) - AAC_NUM_MGT_FIB;
#endif
} else if (host -> can_queue > (status[3] & 0xFFFF) - AAC_NUM_MGT_FIB)
host -> can_queue = (status[3] & 0xFFFF) - AAC_NUM_MGT_FIB;
dev -> max_num_aif = status[4] & 0xFFFF;
}
else
aac_info(dev,
"Driver Init: GET_COMM_PREFERRED_SETTINGS 0x%lx failed\n",
(unsigned long) status[0]);
...
Now the Adapter is working on the latest Adaptec-Driver :-).
Thank You all being a part of this wounderful project!