thopiekar / rcraid-dkms

AMD RAIDXpert driver as DKMS package
Other
126 stars 27 forks source link

[WORK IN PROGESS - DO NOT MERGE] Update driver to 9.3.0 build 283 #44

Closed MarkLTZ closed 2 years ago

Fuzzo commented 2 years ago

Please remember that now also the module named nvme needs to be blacklisted

MarkLTZ commented 2 years ago

@Fuzzo README.md updated. Thanks

MarkLTZ commented 2 years ago

Squashed

Fuzzo commented 2 years ago

Before shrinking my RAID array that now is 100% Windows in order to install Linux, I compiled the kernel module in a VM using the same version of the one used by Linux Mint 20.3 ISO, v5.4.0-91. Once booted Mint with the live USB stick, i unloaded ahci and nvme modules (rmmod) as described in the instructions, then load rcraid and i get these messages from the kernel:

[ 4647.288559] <5>AMD, Inc. rcraid raid driver version 8.1.0 build_number 8.1.0-00039 built gen 09 2022
[ 4647.288561] <5>rcraid built on MintVM by root on dom 9 gen 2022, 13:08:37, CET
[ 4647.288562] <5>rcraid: cmd_q_depth 512, tag_q_depth 16, max_xfer 448, use_swl 0xffffffff
[ 4647.288662] <5>rcraid_probe_one: vendor = 0x1022 device 0x7916
[ 4647.288664] <5>rcraid_probe_one: vendor = 0x1022 device 0x7916
[ 4647.288665] <5>rcraid_probe_one: Total adapters matched 2
[ 4647.289419] <5>rcraid: rc_init_adapter 64 bit DMA enabled
[ 4647.289433] <6>### rc_init_adapter(): RC_EnableZPODD = 0
[ 4647.289502] <3>rcraid:0 request_threaded_irq irq 46
[ 4647.289508] <5>rcraid: card 0: AMD, Inc. AHCI
[ 4647.290280] <5>rcraid: rc_init_adapter 64 bit DMA enabled
[ 4647.290286] <6>### rc_init_adapter(): RC_EnableZPODD = 0
[ 4647.290336] <3>rcraid:1 request_threaded_irq irq 47
[ 4647.290341] <5>rcraid: card 1: AMD, Inc. AHCI
[ 4648.349117] <6>rcraid: rc_event: config change detected on bus 0
[ 4648.349378] scsi host0: AMD, Inc. AMD-RAID
[ 4648.351122] scsi 0:0:24:0: Processor         AMD-RAID Configuration    V1.2 PQ: 0 ANSI: 5
[ 4648.352642] scsi 0:0:24:0: Attached scsi generic sg1 type 3

It looks like the module is correctly loaded, but what I do not understand is where I can found the already existing NTFS partitions partitions. No /dev/sd* appeared, and also lsblk doesn't return nothing. I tried to use the tools lsscsi and inxi -R and i can see the RAID hardware:

RAID:      Hardware-1: Advanced Micro Devices [AMD] Device driver: rcraid 
           Hardware-2: Advanced Micro Devices [AMD] Device driver: rcraid 

But, again, i'm stuck here, i cannot find how to mount the partitions. Anyone can help?

I'd like to thank all the people that worked to fix this crap drivers from AMD...

thopiekar commented 2 years ago

Can you share the original download? Where is it from? AMD website or some OEM?

MarkLTZ commented 2 years ago

Can you share the original download? Where is it from? AMD website or some OEM?

From @Fuzzo https://github.com/thopiekar/rcraid-dkms/files/7864075/raid_linux_driver_930_00276.zip

But I used this one:

https://www.supermicro.com/wdl/driver/AMD/NVMe_RAID/RAID_Linux_Ubuntu_Driver_930_00276.zip

Looking at driver_sdk, they are identical

MarkLTZ commented 2 years ago

Before shrinking my RAID array that now is 100% Windows in order to install Linux, I compiled the kernel module in a VM using the same version of the one used by Linux Mint 20.3 ISO, v5.4.0-91. Once booted Mint with the live USB stick, i unloaded ahci and nvme modules (rmmod) as described in the instructions, then load rcraid and i get these messages from the kernel:

[ 4647.288559] <5>AMD, Inc. rcraid raid driver version 8.1.0 build_number 8.1.0-00039 built gen 09 2022
[ 4647.288561] <5>rcraid built on MintVM by root on dom 9 gen 2022, 13:08:37, CET
[ 4647.288562] <5>rcraid: cmd_q_depth 512, tag_q_depth 16, max_xfer 448, use_swl 0xffffffff
[ 4647.288662] <5>rcraid_probe_one: vendor = 0x1022 device 0x7916
[ 4647.288664] <5>rcraid_probe_one: vendor = 0x1022 device 0x7916
[ 4647.288665] <5>rcraid_probe_one: Total adapters matched 2
[ 4647.289419] <5>rcraid: rc_init_adapter 64 bit DMA enabled
[ 4647.289433] <6>### rc_init_adapter(): RC_EnableZPODD = 0
[ 4647.289502] <3>rcraid:0 request_threaded_irq irq 46
[ 4647.289508] <5>rcraid: card 0: AMD, Inc. AHCI
[ 4647.290280] <5>rcraid: rc_init_adapter 64 bit DMA enabled
[ 4647.290286] <6>### rc_init_adapter(): RC_EnableZPODD = 0
[ 4647.290336] <3>rcraid:1 request_threaded_irq irq 47
[ 4647.290341] <5>rcraid: card 1: AMD, Inc. AHCI
[ 4648.349117] <6>rcraid: rc_event: config change detected on bus 0
[ 4648.349378] scsi host0: AMD, Inc. AMD-RAID
[ 4648.351122] scsi 0:0:24:0: Processor         AMD-RAID Configuration    V1.2 PQ: 0 ANSI: 5
[ 4648.352642] scsi 0:0:24:0: Attached scsi generic sg1 type 3

It looks like the module is correctly loaded, but what I do not understand is where I can found the already existing NTFS partitions partitions. No /dev/sd* appeared, and also lsblk doesn't return nothing. I tried to use the tools lsscsi and inxi -R and i can see the RAID hardware:

RAID:      Hardware-1: Advanced Micro Devices [AMD] Device driver: rcraid 
           Hardware-2: Advanced Micro Devices [AMD] Device driver: rcraid 

But, again, i'm stuck here, i cannot find how to mount the partitions. Anyone can help?

I'd like to thank all the people that worked to fix this crap drivers from AMD...

I'm not sure, but it could depends from HW. What is the vendor and model of HDD configured in raid?

Fuzzo commented 2 years ago

They are two ADATA SX8200PNP 1TB

MarkLTZ commented 2 years ago

They are two ADATA SX8200PNP 1TB

Is Vendor ID = 1CC1, Device ID 8201 correct?

If yes, it's not present into src/rc_pci_ids.h, may be this is the problem.

Try with this patch:

diff --git a/src/rc_pci_ids.h b/src/rc_pci_ids.h
index 89f4055..7d8e012 100644
--- a/src/rc_pci_ids.h
+++ b/src/rc_pci_ids.h
@@ -46,8 +46,9 @@

 #define RC_PD_VID_RAM            0x8590  // RAMDISK
 #define RC_PD_VID_HP            0x103C  // DELL
-#define RC_PD_VID_SAMSUNG               0x144D  // Samsung
-#define RC_PD_VID_ASMEDIA               0x1B21
+#define RC_PD_VID_SAMSUNG       0x144D  // Samsung
+#define RC_PD_VID_ASMEDIA       0x1B21  // Asmedia
+#define RC_PD_VID_ADATA                 0x1CC1  // Adata

 #define RC_PD_VID_GENERIC_NVME   0xFFFF
Fuzzo commented 2 years ago

Thanks for the help, i'll try. May you please explain where i can get the Vendor and Device IDs (from Windows and/or from the live Linux with ahci/nvme modules loaded)? Just to be sure to correctly match them...

MarkLTZ commented 2 years ago

Thanks for the help, i'll try. May you please explain where i can get the Vendor and Device IDs (from Windows and/or from the live Linux with ahci/nvme modules loaded)? Just to be sure to correctly match them...

from Linux IDK, from windows you can find it from details of loaded driver inside the Device Manager

Fuzzo commented 2 years ago

Sorry but I don't know what Linux IDK is but I recompiled the kernel module with the patch and the messages at load are different:

[  788.873701] <5>Advanced Micro Devices, Inc. rcraid raid driver version 9.3.0 build_number 9.3.0-00276 built gen 17 2022
[  788.873702] <5>rcraid built on MintVM by root on lun 17 gen 2022, 18:52:41, CET
[  788.873774] <5>rcraid: cmd_q_depth 512, tag_q_depth 16, max_xfer 2048, use_swl 0xffffffff
[  788.873877] <5>rcraid_probe_one: counting supported adapters
[  788.873885] <5>rcraid_probe_one: matched supported adapter - vendor = 0x1022 device 0x7916
[  788.873886] <5>rcraid_probe_one: matched supported adapter - vendor = 0x1022 device 0x7916
[  788.873892] <5>rcraid_probe_one: Total adapters matched 2
[  788.874710] <5>rcraid: rc_init_adapter 64 bit DMA enabled
[  788.874726] <3>rc_init_adapter(): hardware.vaddr = ffffb162c0081000
[  788.874727] <6>### rc_init_adapter(): RC_EnableZPODD = 0
[  788.874876] <3>rcraid:0 irq 46
[  788.874878] rcraid 0000:07:00.0: msi_enabled 1, msix_enabled 0
[  788.874885] <5>rcraid: card 0: Advanced Micro Devices, Inc. AHCI

[  788.875784] <5>rcraid: rc_init_adapter 64 bit DMA enabled
[  788.875794] <3>rc_init_adapter(): hardware.vaddr = ffffb162c008b000
[  788.875796] <6>### rc_init_adapter(): RC_EnableZPODD = 0
[  788.875967] <3>rcraid:1 irq 47
[  788.875970] rcraid 0000:08:00.0: msi_enabled 1, msix_enabled 0
[  788.875978] <5>rcraid: card 1: Advanced Micro Devices, Inc. AHCI

[  788.878222] <1>rc_msg_init: init controller 0 Done
[  788.878936] <1>rc_msg_init: init controller 1 Done
[  790.028111] <6>rcraid: rc_event: config change detected on bus 0
[  790.028372] scsi host0: Advanced Micro Devices, Inc. AMD-RAID
[  790.029964] scsi 0:0:24:0: Processor         AMD-RAID Configuration    V1.2 PQ: 0 ANSI: 5
[  790.031441] scsi 0:0:24:0: Attached scsi generic sg1 type 3

But again i'm not able to see any block devices associated to my array... Suggestions? Anybody made this driver working with NMVE array may please post rcraid-related kernel log?

MarkLTZ commented 2 years ago

Sorry I hope @thopiekar could help you.

Theoretically driver version 9.3.0 should support raid on nvme. I was busy during past days, but this evening I will try on my home desktop and I will let you know.

If someone find a driver with version higher than 9.3.0 build 276, please post here the official download link.

Thanks

MarkLTZ commented 2 years ago

Updated with latest build for 9.3.0 found on AMD support website

MarkLTZ commented 2 years ago

because 9.3.0 broke x470/x570 supports i close ths PR

alissonmoon commented 3 days ago

Pessoal, temos alguma novidade? Vi que este tópico está fechado, este assunto (Driver AMD-RAID para Linux) está acontecendo em algum outro lugar?