14

On few consumer laptops I have noticed that the laptop’s firmware provides an option for RAID.

Firmware -> SATA Operation -> RAID ON or AHCI (AHCI and RAID ON are mutually exclusive)

The laptop’s configuration allows only one drive and this is what puzzles me.

From my understanding, RAID configuration is only possible when there are at least two drive’s in the setup and the few of the laptops I have seen have provision for just one drive.

So what is the significance of "RAID ON" here and what does it mean?

Giacomo1968
  • 53,069
  • 19
  • 162
  • 212
samshers
  • 350
  • 4
  • 15

4 Answers4

17

Assuming that the laptop uses an Intel chipset (and CPU), the "RAID" option does more than just RAID. It also enables other parts of Intel Rapid Storage Technology (IRST), especially Intel Smart Response Technology (ISRT, gotta love the abbreviations).

Smart Response Technology is a rather non-descriptive name for tiered storage, notably with SSDs and now possibly Optane. Around the time when SSDs were still quite expensive, it was common for mid-range laptops to come with a large HDD and a small (16-32 GB) mSATA SSD, with the SSD configured as a cache for the HDD. You could get very good performance approaching pure SSD with a lot more space and less cost.

But Smart Response Technology builds on top of Rapid Storage Technology, which is enabled by the "RAID" option in the firmware. So "RAID" is enabled, because it offers the ability to use SRT, and costs nothing extra over AHCI.


As a side note, some modern firmware now have an option for "Optane without RAID" - apparently this is because Optane caching is mutually exclusive with RST RAID.

Bob
  • 60,938
  • 25
  • 191
  • 216
15

AHCI and RAID are mutually exclusive in the BIOS, but not in operation.

In effect, enabling RAID also enables AHCI. In other words, you may see RAID as a superset of AHCI. In tests run by Dell, no performance difference was found between the two modes.

An important point is that it is very easy to convert an existing installation from RAID to AHCI, but the other direction is much harder.

I would suggest not to change this setting in the BIOS. If it is set to RAID, leave it this way. It is true that it doesn't add anything that you need, but it's not harmful in any way. Changing it may cause problems in the future.

References:

harrymc
  • 455,459
  • 31
  • 526
  • 924
  • 1
    ok - got it - RAID is Superset of AHCI. Fine. But why provide a option which is not usable... i.e why provide a RAID setup when there is just one HDD. There is no raid config possible on a laptop with one HDD. ???? – samshers Aug 16 '20 at 11:39
  • RAID is a loose term these days, just like raid 0, there is nothing redundant about raid 0 at all. – Moab Aug 16 '20 at 12:24
  • You have a RAID-capable disk controller, so the BIOS RAID option lets you use that controller, whether you need it at the moment or not. – harrymc Aug 16 '20 at 13:54
  • 20
    @samshers: The author of the UEFI firmware has no idea how large the case will be that the motherboard that his firmware runs on is installed in. There is no way for the author of the UEFI firmware to know that the case is too small for two drives. And it doesn't make commercial sense to develop a special firmware for cases that are so small that you can fit only one drive. – Jörg W Mittag Aug 16 '20 at 18:07
  • @JörgWMittag - Hmmm... When I was in engineering at TI(before they sold their Travelmate laptop division to Acer) and I needed altered or custom settings in a system BIOS for my test bed, I simply asked our firmware lady "Sara" to add the option(or remove, if I had needed for some reason), and within 10 minutes she would modify the code and burn me a new chip. It was no effort at all.... – Hitek Aug 16 '20 at 21:57
  • 1
    There is some harm in that you have to set it to AHCI for Linux to detect the disks correctly. – muru Aug 17 '20 at 03:43
  • 2
    @Hitek That is somewhat concerning, and makes me glad that I didn't purchase or rely on TI Travelmate products. The problem is never getting an engineer to make a change or burn a new image. The problem is performing the full quality assurance (QA) and regression testing that is required any time you make a change. Then there's the support burden that Booga mentioned. As usual, what seems trivial from a pure engineering perspective is anything but. TI certainly follows more rigorous processes today for their ICs. – Cody Gray - on strike Aug 17 '20 at 05:06
  • 1
    @muru That only applies to remapped PCIe/NVMe drives, and should be resolved if [the patch](https://lore.kernel.org/linux-pci/20190620061038.GA20564@lst.de/T/) ever lands. – Bob Aug 17 '20 at 06:58
  • "when there is just one HDD". Are you _sure_? My 2010 ultrabook (128GB SSD) actually has 2x64GB in it. In AHCI mode, Windows (with Intel drivers) does its utmost to hide that from you, and presents it as a single volume. Linux, otoh, needs some finagling to get it as a single volume. – Roger Lipscombe Aug 17 '20 at 08:51
  • 1
    @Hitek If you think it is "trivial" for a vendor to deal with customer support problems with a million PCs that were been sold after they introduced a bug by tinkering with the BIOS, I guess we don't have the same definition of "trivial." (And selling a million PCs per year is less than half a percent of the world total annual sales) – alephzero Aug 17 '20 at 11:46
  • I wasn't trying to argue whether or not removing or adding an option in the BIOS settings was a good idea or not, I was addressing the specific claim that doing so was somehow difficult from a technical stand point. If, after all, a generic BIOS has a setting for enabling or disabling a hardware serial port built into the chipset, but those pins on the chipset are not even connected to anything, then it would make sense for the laptop manufacturer to remove that option from the BIOS settings. Also, I don't know how this would relate to TI. The changes I had made were for internal use only.. – Hitek Aug 17 '20 at 21:02
  • @Hitek Difficulty is always relative and always adds overhead. What you are describing is adding another place for Murphy's Law to strike. Sure, it only adds a very small chance of failure. But if company policy was to ignore small risks, they compound into large risks, and then ultimately your [Space Shuttle explodes due to a brittle frozen O ring](https://en.wikipedia.org/wiki/Space_Shuttle_Challenger_disaster). In the computer industry we have a saying KEEP IT SIMPLE STUPID. – Aron Aug 18 '20 at 04:25
  • @Hitek The fewer SKUs you have for a part (even software/firmware) the less likely someone is going to brick a $100,000 mission critical server box, because they flashed the wrong firmware. – Aron Aug 18 '20 at 04:30
  • How did we go from talking about laptops, to mission critical servers? The ONLY point I was trying to make was that from a technical aspect, it is a simple process to add or remove options from the BIOS setup menu structure. That was my ONLY point... – Hitek Aug 18 '20 at 17:10
  • @Hitek because from a supply chain point of view. Life is substantially easier if they use the same BIOS. Any small changes would require re-certification. – Aron Aug 20 '20 at 01:29
6

There is very little technical difference between RAID and AHCI mode, other than in RAID mode, the chips use different PCI IDs.

The reason is that Microsoft Windows has generic drivers which would take ownership of the AHCI chip, preventing Intel drivers being used. Switching to RAID mode changes the PCI IDs so that the Microsoft drivers no longer recognize the chips as AHCI chips and the Intel drivers (which have more features, such as software RAID) can bind to them.

Other operating systems typically do not recognize RAID mode at all (e.g. GNU/Linux) and require AHCI mode to be used, as RAID mode does not offer any advantages - the chips are the same with the same features.

Therefore RAID mode is merely a hack for Intel's windows drivers to make the AHCI chips artificially incompatible to AHCI.

This is why even laptops that can only use a single disk have a functional RAID/AHCI switch in their firmware - it's an unfortunate result of marketing, where RAID sounds better than AHCI, therefore even your laptop with only one disk has to have a RAID mode.

Another way to view this is as a king of copy protection - if the Intel AHCI chips used the "correct" PCI IDs then the Intel drivers would work with non-Intel AHCI chips, and people would be able to use them to have RAID features for these chips as well, as they are emulated within the driver - the RAID mode acts as a kind of dongle.

Remember Monica
  • 668
  • 6
  • 9
  • I don't think this is entirely correct. An easily visible difference is switching from AHCI to RAID loads the Intel RST Option ROM - which is entirely contained in firmware and has nothing to do with the operating system (if any). Also, while it's been a while since I did such an install, I'm fairly sure creating a RAID array via this option exposes the volume correctly to the OS installer, *before* any special drivers are available. – Bob Aug 17 '20 at 15:02
  • The Intel RST Option ROM is a software component, or in other words, just another driver (though not a windows driver, agreed). Also, I have yet to see a single-disk-slot laptop with the Intel RST option ROM enabled (and this is the platform this question is about). So overall, I think my answer is still correct. – Remember Monica Aug 18 '20 at 00:20
  • Agreed that it's software/firmware, and not specialised hardware, that handles Intel RAID. But the significance is that the option in firmware config does more than just swap a couple PCI IDs around; it also enables other pre-boot functionality beyond just allowing a Windows driver to work. It's something that you need a firmware toggle for and can't achieve by simply changing how operating system functions (well, you could skip the pre-boot parts entirely, but at that point you're using pure OS-level software RAID e.g. mdadm or dynamic disks). – Bob Aug 18 '20 at 00:41
  • Changing PCI IDs is all that is needed to influence option ROM behaviour (PCI option ROMs, just like other software drivers, react to PCI IDs. The option ROM might be invisible or visible depending on the mode, too, but it is still just a driver reacting to the PCI ID), and furthermore, laptops as described in the question don't have such an option ROM, as I already pointed out. What you describe is a made-up theory that conflicts with the evidence. – Remember Monica Aug 18 '20 at 02:37
1

There is a difference between AHCI (andvanced host controller interface) and RAID (redundant array of independent disks).

AHCI lets your computer and your operating system to communicate with disk directly. Hardware RAID is used to represent a set of disks to the operating system as a single device.

There are more differences. On hardware level system will communicate with disk drives via AHCI, but on a software level in AHCI mode you see disks separately, where in RAID your operating system sees it as single device (if they ae true hardware RAID and not fake like early Intel ones). Also if you want to use software RAID, you have to enable AHCI and not RAID.

There is also difference on software level. In RAID mode, OS uses single stream, so theoretically you use PCI bus more efficiently, whereas in AHCI, you use separate streams for each disk, so in theory, the more disks you add, the more likely you will hit the upper limit of PCI bus.

I would go against hardware RAID as in case of disk failure, recovery is going to be pain, since there is no standard RAID format. And disks do crash, especially old HDD ones.

  • +1 for the comment "in case of disk failure, recovery is going to be a pain". Also in the case of disk inconsistency for whatever reason (single failed write). Been there, done that, suffered for it (in the case of Intel "hardware" RAID - this was several years ago). Anyone but me find Intel's Windows drivers and entire RST/SRT software stack buggy and heavyweight? Just say no .... – davidbak Aug 17 '20 at 23:32
  • Of course there is a standard, called DDF, used by the vast majority of hardware raid controllers (i.e. Avago) - I can pull out any RAID from my hardware raid controller and plug it in directly, and it will just work (in GNU/Linux, at least, but probably many other operating systems, too). Similalry, intel uses a de-facto "standard" format called IMSM, again, recognized by many operating systems without issue on non-Intel hardware. – Remember Monica Aug 18 '20 at 00:25