ReFS (Resilient File System)

ReFS is Microsoft’s copy-on-write file system with checksummed metadata, used on Windows Server storage pools, Hyper-V and backup repositories, and on Dev Drive volumes in Windows 11. Its format is undocumented and changes between versions, so third-party support is partial.

Overview

ReFS stores all metadata in B+-tree tables (the Minstore engine) with copy-on-write updates and checksums on metadata. A container table maps virtual cluster numbers to physical clusters. Volumes carry a superblock, checkpoints and a version (v1.x, v3.x).

History

  • Introduced with Windows Server 2012; version 3 arrived with Windows Server 2016.
  • Dev Drive support arrived with Windows 11 23H2.

Structures

Offsets are in bytes from the start of the structure named in each heading. Field names are descriptive and are not an official specification. Fixed-width integers are shown as u/i (unsigned/signed) followed by bit width and byte order.

Add Deleted

OffsetSizeTypeFieldNotes
0x188u64 LE–
0x308u64 LE–

Add Deleted

OffsetSizeTypeFieldNotes
0x22u16 LEKey Flags
0x22u16 LE–

Add Deleted

OffsetSizeTypeFieldNotes
0x08u64 LE–
0x04u32 LEHeader
0x88u64 LE–
0x188u64 LE–
0x308u64 LE–
0x404u32 LEIs Directory
0x808u64 LEFile Id

Build Entry

OffsetSizeTypeFieldNotes
0x08u64 LEFile Id
0x88u64 LETarget
0x108u64 LECreated
0x188u64 LEModified
0x208u64 LEChanged
0x288u64 LEAccessed
0x388u64 LESize
0x404u32 LEAttributes
0x808u64 LE–

Creation Time

OffsetSizeTypeFieldNotes
0x108u64 LE–
0x288u64 LE–

List Folder

OffsetSizeTypeFieldNotes
0x02u16 LE–
0x22u16 LEKey Flags

Load Table

OffsetSizeTypeFieldNotes
0x02u16 LE–
0x88u64 LE–

Scan Slack

OffsetSizeTypeFieldNotes
0x02u16 LEType
0x22u16 LE–
0x88u64 LE–

Scan Slack

OffsetSizeTypeFieldNotes
at4u32 LESize
at + 42u16 LEKey Offset
at + 62u16 LEKey Length
at + 0x0A2u16 LEValue Offset
at + 0x0C2u16 LEValue Length

Add File

OffsetSizeTypeFieldNotes
0x288u64 LECreated
0x308u64 LEModified
0x388u64 LEChanged
0x408u64 LEAccessed
0x484u32 LEAttributes
0x588u64 LESize
0x608u64 LEAllocated Size

Add Named

OffsetSizeTypeFieldNotes
0x102u16 LESnapshot
0x444u32 LE–
0x4C8u64 LE–

Build Data

OffsetSizeTypeFieldNotes
0x04u32 LENode
0x44u32 LE–
0xC4u32 LE–
0x102u16 LE–
0x208u64 LEInline Size
v34 ? 0x34 : 0x308u64 LEAllocated
v34 ? 0x3C : 0x388u64 LESize

Open Read

OffsetSizeTypeFieldNotes
0x22u16 LEExtent Backed
0x188u64 LE–
0x208u64 LESize

Parse

OffsetSizeTypeFieldNotes
0x84u32 LEArker
0x82u16 LE–
0xC2u16 LE–
0xC2u16 LEType
0x104u32 LESub

Reparse Buffer

OffsetSizeTypeFieldNotes
0x84u32 LEAt
at + 42u16 LELength

Reparse Target

OffsetSizeTypeFieldNotes
0x82u16 LESubstitute Offset
0xA2u16 LESubstitute Length
0xC2u16 LEPrint Offset
0xE2u16 LEPrint Length

Parse

OffsetSizeTypeFieldNotes
0x104bytes–
0x188u64 LETotal Sectors
0x204u32 LEBytes Per Sector
0x244u32 LESectors Per Cluster
0x281u8Major
0x291u8Minor
0x2A2u16 LEChecksum Type
0x388u64 LESerial
0x408u64 LEContainer Bytes

Verify

OffsetSizeTypeFieldNotes
0x04u32 LE–
0x08u64 LE–

Refs Const

OffsetSizeTypeFieldNotes
o8u64 LE–
o4u32 LE–
o2u16 LE–

Live Offsets

OffsetSizeTypeFieldNotes
header + (int)start + i * 42u16 LE–
header + 0x104u32 LEStart
header + 0x144u32 LECount

Rows

OffsetSizeTypeFieldNotes
slot2u16 LERow
header + 0x104u32 LEStart
header + 0x144u32 LECount
header + 0x204u32 LEEnd

Try Row

OffsetSizeTypeFieldNotes
row + 42u16 LEKey Offset
row + 62u16 LEKey Length
row + 0x0A2u16 LEValue Offset
row + 0x0C2u16 LEValue Length

Parse

OffsetSizeTypeFieldNotes
offset + i * 88u64 LELcn
offset + 0x221u8Type
offset + 0x231u8Digest Offset
offset + 0x242u16 LELength

Parse Object Value

OffsetSizeTypeFieldNotes
0x421u8Type
0x444u32 LELength

Collect Extents

OffsetSizeTypeFieldNotes
at8u64 LE–
header4u32 LE–
at + 82u16 LE–
at + 0x0C4u32 LE–
at + 0x144u32 LEClusters
header + 0x144u32 LE–

Load Checkpoint

OffsetSizeTypeFieldNotes
0x5C4u32 LEReference Size
0x784u32 LEFlags
0x904u32 LECount
0x944u32 LE–
slot4u32 LEAt

Load Checkpoint

OffsetSizeTypeFieldNotes
0x488u64 LETable
0xA04u32 LE–
0xA42u16 LECompression Format

Load Checkpoint

OffsetSizeTypeFieldNotes
0x08u64 LE–
0x88u64 LE–

Read Checkpoints

OffsetSizeTypeFieldNotes
0x04bytes–
0x608u64 LE–

Read Checkpoints

OffsetSizeTypeFieldNotes
0x04bytes–
0x704u32 LEAt
0x744u32 LECount
(int)at + i * 88u64 LELcn

Other fields read

Read inOffsetSizeTypeFieldNotes
Add Deleted0x22u16 LE–
List Folder0x808u64 LE–
Add File0x04u32 LETag
Build Data0x04u32 LETheir Node
Open Read0x04u32 LEExtents
Open Read0x208u64 LE–
Open Read0x388u64 LE–
Has Signature0x34bytes–
Page Header0x504u32 LEHeader
Load Checkpointrow.Length – 168u64 LE–
Read Page0x04bytes–
Read Volume Label0x02u16 LE–
Record Attributes0x04u32 LEHeader

Constants

Refs File System

NameValueTypeNotes
DeletedIdBase1UL << 63ulong
StrictUtf16new UnicodeEncoding(bigEndian: false, byteOrderMark: false, throwOnInvalidBytes: true)Encoding

Refs Const

NameValueTypeNotes
SuperblockLcn0x1Eint

Checkpoint root indices

NameValueTypeNotes
RootObjectTable0int
RootObjectTableDup5int
RootContainerTable7int
RootContainerTableDup8int

Table ids at page+0x48

NameValueTypeNotes
TableObject0x02ulong
TableObjectDup0x04ulong
TableContainer0x0Bulong
TableContainerDup0x0Culong

Object ids

NameValueTypeNotes
RootDirectory0x600ulong
VolumeInformation0x500ulong
VolumeInformationDup0x501ulong

Directory row types (key u16 @0) and key flags (u16 @2)

NameValueTypeNotes
RowFileName0x30ushort
RowBacking0x40ushort
KeyEmbedded0x01ushort
KeyIndexEntry0x02ushort

Attribute (embedded row) markers and types

NameValueTypeNotes
SingleInstance0x80000001uint
MultiInstance0x80000002uint
AttrStreamExtents0x0003ushort
AttrData0x0080ushort
AttrNamedStream0x00B0ushort
AttrReparse0x00C0ushort
AttrLink0x0039ushort
LiveStream0x1000uint
FileAttributeDirectory0x10000000uint
FileAttributeSparse0x200uint
FileAttributeReparse0x400uint
FileAttributeCompressed0x800uint
FileAttributeEncrypted0x4000uint
ReparseSymlink0xA000000Cuint
ReparseMountPoint0xA0000003uint

Extent row flags (u16 @+8)

NameValueTypeNotes
ExtentWritten0x10ushort
ExtentHole0x20ushort

Refs Checksum

NameValueTypeNotes
Crc64TableBuildCrc64()ulong[]

Refs Node

NameValueTypeNotes
HeaderSize0x28int

Object table (virtual addresses), then its duplicate

NameValueTypeNotes
message“table deeper than expected; the rest was not read”string

Implementation limits

ClassNameValueNotes
Refs File SystemMaxCachedHomes64
Refs VolumeMaxDepth16
Refs VolumeMaxCachedPages512

Signatures and magic strings referenced

TextWhere checked
ReFSHas Signature
FSRSParse
MSB+Page Header
SUPBRead Checkpoints
CHKPRead Checkpoints
MSB+Read Page
SUPBHas Superblock
Structures and constants were extracted from the implementation. Prose sections are a summary from public sources; verify details before relying on them.