6

Similar to this question, but for Broadcom/LSI controllers: Can MegaRAID controllers use the onboard disk cache for JBOD drives? (I would like to enable the controller's hardware cache and then use mdraid on the drives directly.)

This would increase performance by coalescing random writes in the controller's write cache for sequential writeback by the controller.

I found this in the storcli that hints at the possibility:

# storcli  /c0 show all 2>&1 | grep -i cache  | grep -i jbod
Support JBOD Write cache = No

Question: How do you set "Support JBOD Write cache" to yes? What setting changes are needed using storecli (or another command) to enable JBOD writeback caching?

I know that storcli /c1/e56/s3 set jbod will set a disk to JBOD mode, but I'm not sure how to tell it to be cached in write-back mode. Has anyone seen this option or used it in production? Any detail you can provide would be greatly appreciated.

After googling for Support JBOD Write cache = Yes, it seems that all ocurrences also have Support JBOD = Yes and Enable JBOD = Yes. Perhaps this a pre-requisite?

(nb, I understand the effects of cache safety, so please only comment on the setting change. Also, I know that I can create a RAID0 LUN w/ caching, but that is not what this question asks.)

KJ7LNW
  • 251

2 Answers2

7

It's generally a bad idea, and there's a good reason why you’ll have a hard time finding a RAID controller that allows caching for drives previously set to JBOD mode. LSI MegaRAID isn’t one of them, just FYI. No matter what you do or configure in MegaCLI, you won't get the on-board cache enabled and actually used in JBOD mode. Why? Because modern data integrity-checking file systems like the notorious ZFS and even the 'record-eating file system,' aka ReFS, absolutely require full hardware access. For instance, ReFS periodically issues a FLUSH command after performing metadata, data, and in-place superblock updates. It does NOT want this sequence to be disrupted, delayed, reordered, or ignored by RAID or HDD caches. Data integrity beats performance every time—it’s the rule!

You can trick MegaRAID into using the cache by creating a single-disk RAID0 LUN, but that’s a terrible idea. It might work most of the time, but sooner or later, you’ll end up facing data loss—refer to the ReFS example above. People used to do this as a workaround back when they had to use ZFS, VMware vSAN, or Storage Spaces (Direct) but only had RAID cards without HBA mode. Bottom line: this is not a production scenario.

-4

HP uses MegaRAID controllers therefore the suggested "single-disk RAID0 config" is what you are looking for. If one day you decide to ditch MegaRAID, and move to pure JBOD, you will be able to connect those "single-disk RAID0" disks to a dumb HBA without a problem.