Home / Reference / NVRAM

NVRAM/NVMEM deep-dive: how ONTAP makes writes durable

NVRAM (on older platforms) and NVMEM (the non-volatile memory on newer AFF/FAS systems) is the small, battery-or-capacitor-backed log that sits between your clients and the disk. It is the reason ONTAP can acknowledge a write in microseconds, survive a power loss without losing acknowledged data, and hand a whole node's storage to its HA partner without missing a beat. This page walks the write path, the mirroring, the crash replay, and the commands that tell you it's healthy.

NVRAM write acknowledgement flow

What NVRAM/NVMEM actually is

Physically it's a few gigabytes of very fast, non-volatile storage on the node — historically a battery-backed DRAM card, today persistent memory (NVMEM) on the system board of AFF/FAS platforms. Functionally it is a write log: a record of writes that have been acknowledged to clients but not yet written to disk. It is not a cache in the read sense, and it is not where data permanently lives — data stays there only for the few seconds between acknowledgment and the next consistency point (CP).

Both serve the identical logical role, so the rest of this page says "NVRAM" and means either.

The write path, start to finish

Follow a single client write (NFS/SMB/block) through the system:

  1. Client sends the write. The node's protocol engine accepts the data into memory buffers.
  2. Log to NVRAM: the write (data + metadata describing where it will go) is appended to the local NVRAM log.
  3. Mirror to partner: the log entry is copied over the HA interconnect to the partner node's NVRAM. This mirror is the key to lossless takeover.
  4. Acknowledge: only after the entry is durable in both NVRAMs does ONTAP reply to the client. This is the durability point: once the client gets the ack, the write will survive any single-node failure.
  5. Background flush: at the next CP, WAFL writes the data blocks to disk and the log entries are retired (space in NVRAM is freed).

Two properties fall straight out of this design:

Why the mirror makes takeover lossless

If node A dies, its data disks are owned by partner B (in an HA pair). B has a copy of every acknowledged write that hasn't hit disk yet — the NVRAM mirror. So B can:

  1. Take over A's storage (storage failover / takeover),
  2. Replay A's NVRAM log entries into the WAFL filesystems on A's disks,
  3. Serve A's volumes as if nothing happened — no acknowledged write is lost, no filesystem inconsistency, no client data loss.

This is the famous "zero data loss on takeover" claim, and it rests entirely on the NVRAM mirror. If the mirror were broken or the log full, ONTAP would (safely) stop acknowledging writes rather than risk acknowledging something it couldn't make durable — you'd see that as latency or protocol errors, and it's a health condition worth treating as an emergency.

Exam angle: "What makes takeover lossless?" — the NVRAM/NVMEM mirror over the HA interconnect. Data acknowledged to the client is in both nodes' NVRAM; the surviving partner replays the log. No mirror, no lossless takeover.

Crash and power-loss behavior

Different failure modes, same guarantee — no loss of acknowledged writes:

One nuance: a node replays its own NVRAM log on reboot before serving data, and the HA partner replays the mirrored log after takeover. The filesystems themselves need no repair because WAFL metadata is only ever updated atomically at CPs (see the WAFL page). NVRAM replay restores data, not metadata structure.

Health checks and commands

NVRAM health is a "check before anything big" item: before firmware upgrades, before planned takeovers, and whenever you see unexplained write latency.

storage failover show                        # HA pair state + takeover capability
system node hardware nvram show              # NVRAM/NVMEM status per node
system node hardware battery show            # battery status (legacy NVRAM platforms)
system node run -node node1 sysconfig -a     # hardware summary incl. NVRAM (nodeshell)

What healthy looks like:

If you ever see NVRAM mirror loss during normal operation, the system will throttle or stop write acknowledgments — that's the safety valve doing its job. It's a support case, not a "wait and see" item.

Takeover/giveback: the operational side

Planned and unplanned takeover both use the same machinery — the surviving node replays the mirrored log and serves both nodes' storage:

storage failover takeover -ofnode node1      # take over node1 (planned: add -bypass-... checks as advised)
storage failover giveback -ofnode node1      # return storage once node1 is healthy
storage failover show-takeover               # what a takeover would require

Operational notes from the field:

Quick reference

QuestionAnswer
What is NVRAM/NVMEM?The non-volatile write log that makes acknowledged writes durable before they hit disk
Why is it mirrored?So the HA partner can replay writes after a takeover — zero acknowledged-write loss
Why is client write latency low?Clients are acked from NVRAM, not from disk; disk flushes happen in the background at CPs
What happens on reboot?The node replays its own NVRAM log before serving data
How do I check it?storage failover show, system node hardware nvram show, system node hardware battery show
NVRAM mirror broken — now what?Writes stop being acked (safety valve). Support case immediately.

Next in the series: copy-on-write and snapshots — how the same root-flip design that protects WAFL also gives you instant snapshots.