# aacraid controller error



## SteveG1 (Jul 7, 2022)

Hello,

I hope that someone can help me. I am using an Adaptec 6805 controller with a 4 disk raid 10 setup. When I did: `dd if=/dev/zero of=/dev/da0 bs=1m` it ran for almost 24 hours. I stopped it shortly before it would have filled the disks. There was never an error writing raw data, so it looks like it works just fine without a filesystem.

I setup a freebsd-ufs partition, ran newfs, mounted it,  then used a shell script that creates 100 Meg files and after it runs for a while, this is the error I get:

```
aacraid0: COMMAND 0xc00800009d9b8160 TIMEOUT AFTER 192 SECONDS
aacraid0: shutting down controller...FAILED.
aacraid0: IOP_RESET failed
aacraid0: COMMAND 0xc00800009d9b81d8 TIMEOUT AFTER 744 SECONDS
aacraid0: shutting down controller...FAILED.
aacraid0: IOP_RESET failed
aacraid0: COMMAND 0xc00800009d9b8250 TIMEOUT AFTER 905 SECONDS
aacraid0: shutting down controller...
```
It is always in use when it gets the error. Also, it seems to work better with a block size of 8192 and a frag size of 1024. It is faster and does not fail as quickly. It may be related to `kern.maxphys=131072`, which I need to boot from its built-in SATA controller. I wanted to create a FAT filesystem just to test this issue further. However, it won't let me create a FAT filesystem on da0 because the kernel was built with option `KERN.MAXPHYS=131072`.

I have tried many different things, but nothing has completely fixed this issue. Any thoughts on what I can do? 

Thanks!


----------



## Phishfry (Jul 7, 2022)

SteveG1 said:


> Any thoughts on what I can do?


Dump the hardware RAID10 and use software RAID.
Why are you using hardware RAID10? Any particular reason?


----------



## richardtoohey2 (Jul 7, 2022)

There’s a change in 13.1 but not sure if remotely connected to what you are asking:

Max I/O size has been reduced to avoid DMA issues in aacraid(4). 572e3575dba


----------



## diizzy (Jul 7, 2022)

I found some posts over at FreeNAS's forum telling you to use something else and Adaptec also seems to have dropped support for that controller aswell. Could be worth looking into getting some kind of cheap AHCI based controller instead based on ASM1164/ASM1166 or JMB585 to save you some hassle.


----------



## SteveG1 (Jul 7, 2022)

Thank you all for responding. 



> Dump the hardware RAID10 and use software RAID.
> Why are you using hardware RAID10? Any particular reason?



Well, I am not really sure. I guess that I should have it setup as JBOD and then use ZFS.



> Max I/O size has been reduced to avoid DMA issues in aacraid(4). 572e3575dba



I looked at this and maybe this is the issue. I am not sure either, but a value that has changed somewhere is causing this issue.




> I found some posts over at FreeNAS's forum telling you to use something else and Adaptec also seems to have dropped support for that controller aswell. Could be worth looking into getting some kind of cheap AHCI based controller instead based on ASM1164/ASM1166 or JMB585 to save you some hassle.



I have thought about this. I was trying to use a LSI card under Linux, but it would crash all the time. Switching to this card stopped the crashes. Although, I don't want to bash any OS, I am glad there is alteratives to Linux and I would like to be completely moved over to FreeBSD very soon. I am using SAS drives, and I only have a PCIe slot available in this system, so I am kind of limited on what I can use.

I have thought about moving to NVMe drives and then using them with ZFS. Not sure if that is the way to go or not. 

Althought, if I could find someone who could make the changes to the kernel to fix this issue, I may try to pay someone to help me.


----------



## SirDice (Jul 13, 2022)

SteveG1 said:


> I was trying to use a LSI card under Linux


I'd use that LSI card on FreeBSD. LSI based cards have, in general, quite good support on FreeBSD. (mpt(4), mps(4), mfi(4), mrsas(4)).


----------



## Phishfry (Jul 13, 2022)

Phishfry said:


> Dump the hardware RAID10 and use software RAID.
> Why are you using hardware RAID10? Any particular reason?


This was harsh, but no sense beating around the bush.
Hardware RAID locks you into the hardware.
That alone is enough reason to run away.
Software RAID on both UFS and ZFS is hardware independent.
Both can do RAID10.


----------



## SteveG1 (Jul 21, 2022)

I am still looking for a solution to this issue. I am running SAS drives and so I need a controller that supports them.


----------

