From: "Theo de Raadt" Subject: Re: PCI_PRODUCT_INTEL_82801HBM_RAID To: jon@elytron.openbsd.amsterdam, tech@openbsd.org Date: Wed, 29 Jan 2025 08:30:32 -0700 Jonathan Gray wrote: > On Thu, Jan 16, 2025 at 07:08:32AM +0000, jon@elytron.openbsd.amsterdam wrote: > > Hello, I would like to share a trivial patch to enable some ahci > > devices. > > The RAID devices are intentionally not listed. > > sys/dev/pci/ahci.c rev 1.163 > > ---------------------------- > revision 1.163 > date: 2010/04/16 22:15:39; author: kettenis; state: Exp; lines: +1 -10; > Remove Intel RAID IDs for now. They can be added back when code has been > written to detect the Intel RAID metadata format such that we no longer risk > overwriting it. If this makes you lose your disks, you'll need to change the > controller type from RAID to AHCI in the BIOS to get them back. > > ok marco@, deraadt@ > ---------------------------- The problem is that these RAID modes use sectors at the end of the disk for a specific purpose. If we expose this mode as a regular OpenBSD disk, it becomes possible for GPT/MBR/disklabel to cover those last few sectors, and they could get changed. If you are expecting to dual-boot, you are in for surprises. A long long time ago, I had a theory that we could detect this situation, parse those RAID configuration offsets, and automatically create a softraid in that instance. It would merge multiple disks in this mode into a softraid sd. If a sole, or unconfigured disk was found, it would create a single-raid. This type of softraid would only read the BIOS/disk configuration, to create a softraid disk-span. It would probably not update the configuration, because that's a lot more code.