2

Using Smart Storage Admin, I am trying to enable DWC.

Using this following command, I confirm slot0 is the only option and it is healthy.

sudo /opt/smartstorageadmin/ssacli/bin/ssacli ctrl all show status

HPE Smart Array P816i-a SR Gen10 in Slot 0 (Embedded)
   Controller Status: OK
   Cache Status: OK
   Battery/Capacitor Status: OK

Then I get the full status, however for this example I will grep only lines referencing cache.

sudo /opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot=0 show  | grep -i cache
   Write Cache Bypass Threshold Size: 1040 KiB
   Wait for Cache Room: Disabled
   Cache Board Present: True
   Cache Status: OK
   Cache Ratio: 10% Read / 90% Write
   Configured Drive Write Cache Policy: Default
   Unconfigured Drive Write Cache Policy: Default
   Total Cache Size: 4.0
   Total Cache Memory Available: 3.8
   No-Battery Write Cache: Disabled
   Cache Backup Power Source: Batteries

Now I notice that it says Configured and Unconfigured Drive Write Cache Policy are both Default.

So I try to enable dwc, but it gets mad about a 'usage' parameter.

sudo /opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot=0 modify dwc=enable

Error: Parameter "usage" must be specified.

I know that, based on the help docs, usage can be unconfigured, configured, or hbc.

<target> modify [drivewritecache=enable|disable|default|?]
                [usage=configured|unconfigured|hba] [forced]
   Enables or disables the physical drive write cache policy for the
   controller.The target can be any valid controller target that supports drive
   write cache policy.

Online I have found a number of PDFs that mention using wildcards when trying to enable drive write cache and they referenced usage as if it is a target state to be used for only enabling it on drives that match this state. Based on this logic, it seems I would want to use 'usage=unconfigured' to enable it on this drive. Am I wrong in my logic?

wazoox
  • 6,918
  • 4
  • 31
  • 63
user3661841
  • 121
  • 1
  • 1
  • 2
  • Just as a side note, there isn’t a situation I can think of where you would want the actual disk (drive) write cache to be enabled on a Smart Array controller. This is not an option that you should want to turn on. – ewwhite Apr 10 '19 at 16:51
  • Can you elaborate? I am relatively new to working with these controllers. – user3661841 Apr 10 '19 at 17:08
  • @ewwhite I'm curious what the default policy of that controller is, since the status listing just says: `Drive Write Cache Policy: Default`. Besides, it really depends how the controller firmware deals with disks that have their write-caches enabled. It would be a safe setting iff the controller properly flushes the drive's write cache before removing the contents from its own cache. – maxschlepzig May 06 '20 at 21:52

1 Answers1

2

Before activating the write caches of the disk drives you should be clear on the implications.

The controller has its own write cache (4 GB in your case) whose content can be preserved by a battery during power outages, for some time. That means in case of a power loss, after the power comes back and you boot the hardware the controller firmware can flush its cache before dealing with new writes.

In contrast to that, the write cache of the disk drives isn't protected by the controller's battery.

When you connect your disk drive to a simple controller that doesn't come with an extra write-cache, the OS usually enables the disk's write cache for performance reasons (or perhaps rather it doesn't disable it as it's enabled by default). But the OS then also sends flush-cache commands when necessary (e.g. when the software calls fsync()).

Now the question is how your hardware RAID controller deals with disks that have the write cache enabled. When it writes back a batch from its own cache either

  1. it immediately removes it from its own cache (simple but unsafe), or
  2. it only removes it after the flush-cache command was acknowledged by the drive (safe)

Since we are talking about expensive enterprise hardware one could be tempted to assume that the controller surely implements the 2nd strategy.

However, the HP Smart Array Configuration Guide contains this warning:

CAUTION: Because physical drive write cache is not battery-backed, you could lose data if a power failure occurs during a write process. To minimize this possibility, use a backup power supply.

HPE Smart Array SR Gen10 Configuration, 3rd Edition, 2018, page 86, art Number: 882375-003

Which means that HP controllers implement the first, i.e. the unsafe strategy when it comes to flushing the controller cache to a write-cache enabled drive.


Your listing says Drive Write Cache Policy: Default. Do you know what's the default drive write cache policy of that controller? Perhaps it already enables the disks write cache, by default ...

FWIW, I can't find anything about what the default drive write cache policy actually is in the HP manuals.


The configured/unconfigured distinction refers to drives that are assigned to some disk group or not. IOW, active/in-use vs. inactive/just-connected.

Apparently some controllers support changing this attribute only for unconfigured devices, while others support changing this for all.

maxschlepzig
  • 895
  • 7
  • 16