Monday to Saturday 8:00–19:00, Sunday closedFree courier collection throughout Switzerland · drop-off in Lugano, Zurich and Sant'Antonino

Business

Pinned cache and failed cache battery on a RAID controller

A RAID controller with write-back cache tells the server a write is done as soon as it is in the controller's memory. If the virtual disk goes offline before that data reaches the disks, the controller keeps it: the cache is preserved, or pinned. At the next boot it asks what to do with it. One of the answers deletes it permanently.

Published 3 min readBy Mirush Murataj

Cover of the RecDati guide: Pinned cache and failed cache battery on a RAID controller
Preserved or pinned cache contains writes that never reached the disks.

In short

  • Preserved or pinned cache contains writes that never reached the disks.
  • Discarding it loses those writes for good and can damage the file system.
  • Bring the missing disks back first; the controller then writes the cache to them.

What the controller is protecting

With write-back caching, a controller acknowledges writes once they are in its memory and writes them to the disks later. A battery (BBU) or a flash module with a supercapacitor (Dell, Broadcom CacheVault, HPE Flash-Backed Write Cache) keeps that memory safe during a power cut.

When a virtual disk goes offline, for example after two disks dropped out of a RAID 5 or a cable came loose, the controller can no longer write its cached data. It keeps it as preserved cache (Broadcom, Lenovo) or pinned cache (Dell PERC).

The messages you will see

  • Dell PERC at boot: There are offline or missing virtual drives with preserved cache.
  • iDRAC: virtual disk offline, controller with pinned cache.
  • perccli /c0 show preservedcache or storcli /c0 show preservedcache lists the virtual disks concerned.
  • HPE Smart Array: messages about the cache module or a failed backup power source, and the cache disabled.

While pinned cache exists, many controllers refuse to import foreign configurations or create new virtual disks. That is deliberate.

The safe order of steps

  1. Do not choose Discard at the boot prompt, and do not run delete preservedcache.
  2. Find out why the virtual disk is offline: a disk pulled, an enclosure or cable fault, a backplane that lost power.
  3. Restore the missing members in their original slots, then power on. When the virtual disk comes back, the controller flushes the preserved cache to it on its own.
  4. Only after the flush, check the file system and the applications.

If the virtual disk cannot come back because a disk is really dead, do not discard the cache to "unlock" the controller. Have the disks imaged, and keep the controller powered and its cache module untouched.

What is lost if the cache is discarded

Usually a few megabytes to a few gigabytes of writes: the last seconds before the failure. That sounds small, but those writes are often file system journals, database logs and metadata. Losing them can leave NTFS, VMFS or a database inconsistent even after the array is repaired.

A battery or capacitor that has failed

A failing battery is a different problem. When the controller no longer trusts its backup power, it switches the cache to write-through and the server becomes slow, sometimes dramatically. That is protective, not dangerous. The danger is a "force write-back" policy (Always Write Back) set to get the speed back: if power then fails, the cached writes are lost.

Replace the battery or the capacitor module, and leave the policy on write-back with BBU.

When the controller itself has died

The cache memory sits on the controller or its module. Moving the disks to an identical controller restores the array but not the cached writes. For a recovery, keep the original controller and its module together, and tell the lab that preserved cache existed.

See server data recovery, RAID data recovery and Pulled the wrong disk from a RAID: the first 10 minutes.

Frequently asked questions

The server does not boot until I decide what to do with the cache. What now?

Power it off and restore the missing disks or connections first. If that is impossible, have the disks imaged before discarding anything.

Is the cache battery a consumable?

Yes. Batteries typically last three to five years; supercapacitor modules last longer but also fail.

Can the cache contents be read out of the controller?

Not with standard tools. The safe way is to let the controller flush them to the original disks.

Official sources and useful links

  • Broadcom Support: Official Broadcom support: MegaRAID controllers, StorCLI and firmware.
  • Dell Support: Official Dell support: PowerEdge PERC controller guides, firmware and drive firmware updates.

Is your data important?

Do not try anything that could make the fault worse. The diagnosis is free and you get a fixed quote before any work starts.

Request a free diagnosis Server data recovery

Device not responding any more? Unplug it and let us take a look.

Get a price