Categories
ReFS

ReFS 3.4 is not ready for Production. Don’t use it.. yet.

I love the new features that ReFS (version 3.4 as of now) brings. Each feature sounds wonderful. Self-healing, large volumes, checksums, etc.. it all sounds good.. on paper.

But when used, they all fall flat on how easy it is to break ReFS. (seriously!)

A reboot at the wrong time can totally fry the ReFS volume. Simply gone. Poof. Little chance of recovery. I’ve seen it happen multiple times on multiple servers. No known way to repair the now-RAW partition. There is a recovery tool ReFSUtil.exe built-in to Windows, but I haven’t had any success recovering anything useful with it.

Just thinking.. why doesn’t any file system (that I know about) have at least 3 master file tables? One at the beginning, middle, and end of the drive? Think of the speed increase when searching for files, and the added resiliency! The drive heads would never have to seek more than 1/3 of the platter to read from the MFT.

Sigh. I should write my own FS.. just give me a team and a few decades lol.

Categories
ReFS

ReFS Utility (ReFSutil) Usage

The ReFSUtil executable has four main modes of operation:

  • fixboot – Repair boot sectors.
  • leak – Leak Detection and Fixing.
  • triage – Handle corruptions.
  • salvage – Salvage operations for corrupt volume.

The command I’ve found most useful is “salvage“, which I’ll go into at the end of this article.

WARNING: If data deduplication is turned on for these volumes, anything recovered may be missing parts of the files. As far as I can tell, ReFSutil does not reconstruct the full data from a deduplicated file.


The “fixboot” command offers this help:

WARNING: THIS OPERATION CHANGES BOOT SECTOR(S) OF A VOLUME AND CAN RESULT IN TOTAL LOSS OF DATA.

Usage: refsutil fixboot [-f] [-w] [-smr] [-x]
<drive> Drive letter in format “L:”.
<MajorVersion> Major version of the ReFS volume.
<MinorVersion> Minor version of the ReFS volume.
<ClusterSize> Cluster size of the volume. Either 4096 or 65536.
-f Ignore any valid boot sector found. Fix boot sector based on input parameters.
-w <Dir> Actually write to the boot sector(s) if needed and backup the current boot sector(s)
into the backup directory.
-smr Specifies this if volume is of SMR format. Cluster size must be 65536.
-x Force the volume to dismount first if necessary. All opened handles to
the volume would then be invalid.Example: refsutil fixboot D: 3 3 4096
Example: refsutil fixboot D: 3 1 65536 -f -w c:backup

Personally, I have not used the fixboot option as I think I’ve never had to repair the boot sector on an ReFS volume. AFAIK, ReFS volumes are not bootable at the time of this article? (Sorry I don’t have any more information on this command.)


The “leak” command offers this help:

—- Leak Detection and Fixing —-
Usage: refsutil leak /a /x /v /d /q /t /s
/a If leak detection finds a corruption, setting this switch attempt to fix it and re-run leak
detection. With this switch set leak detection will be restarted once for every corrupted
directory found on the volume.
/x Operate holding an exclusive lock on the volume. Without this switch leak detection will
create a snapshot of the volume for processing.
/v Verbose output.
/d Diagnose only. Leaks will be printed to stdout, but not fixed.
/q Query required space for operation.
/t Number of threads to spawn for leak detection. Specifying a value of 0 will run leak detection
synchronously (this is not recommended). Default is 4.
/s Run operation using as a scratch buffer. must be able to grow to the value reported by /q. Ommision of this switch will create a scratch buffer in TEMP.
Drive letter in format “L:”, or a path to the volume mount point.
Note that providing /d alongside /a will triage all found directory/file corruptions, but will not fix leaks.
Eg: refsutil leak D: /a /t 4 /s R:scratch.tmp
Eg: refsutil leak D: /a /d /v /t 4
Eg: refsutil leak D: /q

The “triage” command offers this help:

—- Triage and corruption handling —-
Usage: refsutil triage [/s ] [/v]
/s Scrub the directory corresponding to . Is the file id for the directory. This will scrub all files under the given directory.
/v Verbose output.
Drive letter in format “L:”, or a path to the volume mount point.
Example: refsutil triage D: /s 15100
Example: refsutil triage D: /s 16040 /v

Again, I haven’t had any ReFS corruption to test this out, or even know how to find the of a directory.

The “salvage” command offers this help:

Attempts to diagnose heavily damaged ReFS volumes, identify remaining files,
and copy those files to another volume. (Be sure where you copy the rescued files to has the same (or more) storage space than the corrupted volume.)

ReFS Salvage has a Scan Phase and a Copy Phase.
In automatic mode, the Scan Phase and Copy Phase will run sequentially.
In manual mode, each phase can be run separately.
Progress and logs are saved in a working directory to allow phases to be run separately as well as Scan Phase to be paused and resumed.

Here are the automatic mode Command Line Usages:

Quick Automatic Mode Command Line Usage:
refsutil salvage -QA <source volume> <working directory> <target directory> <options>

This will perform a Quick Scan Phase followed by a Copy Phase.
This mode runs quicker as it assumes some critical structures of the volume are not corrupted and so there is no need to scan the entire volume to locate them. This also reduces the recovery of stale files/directories/volumes.

Full Automatic Mode Command Line Usage:
refsutil salvage -FA <source volume> <working directory> <target directory> <options>

This will perform a Full Scan Phase followed by a Copy Phase.
This mode may take a long time as it will scan the entire volume for any recoverable files/directories/volumes.

Diagnose Phase Command Line Usage:
refsutil salvage -D <source volume> <working directory> <options>

Attempt to determine if <source volume> is an ReFS volume and determine if the volume is mountable. When a volume is not-mountable, reason(s) will be determined. This is a standalone phase.

Quick Scan Phase Command Line Usage:
refsutil salvage -QS <source volume> <working directory> <options>

Quick Scan <source volume> for any recoverable files.
This mode runs quicker as it assumes some critical structures of the volume
are not corrupted and so there is no need to scan the entire volume to
locate them. This also reduces the recovery of stale files/directories/volumes.
Discovered files will be logged to “foundfiles.<volume signature>.txt” under <working directory>. If the Scan Phase was previously stopped, running with the -QS flag again will resume the scan from where it left off.

Full Scan Phase Command Line Usage:
refsutil salvage -FS <source volume> <working directory> <options>

Scan entire <source volume> for any recoverable files.
This mode may take a long time as it will scan the entire volume for any recoverable files.
Discovered files will be logged to “foundfiles.<volume signature>.txt” under <working directory>. If the Scan Phase was previously stopped, running with the -FS flag again will resume the scan from where it left off.

Copy Phase Command Line Usage:
refsutil salvage -C <source volume> <working directory> <target directory> <options>

Copy all files described in “foundfiles.<volume signature>.txt” to
<target directory>. If Scan Phase is stopped too early,
“foundfiles.<volume signature>.txt” may not have been written yet and so no file will be copied to <target directory>.

Copy Phase with List Command Line Usage:
refsutil salvage -SL <source volume> <working directory> <target directory> <file list> <options>

Copy all the files in <file list> from <source volume> to <target directory>.
The files in <file list> must have first been identified by the Scan Phase though the scan need not have been run to completion.
<file list> can be generated by copying “foundfiles.<volume signature>.txt” to a new file, removing lines referencing files that shouldn’t be restored, and preserving files that should be restored. The PowerShell cmdlet Select-String may be helpful in filtering “foundfiles.<volume signature>.txt” to only include desired paths, extensions, or file names.

Copy Phase with Interactive Console:
refsutil salvage -IC <source volume> <working directory> <options>

Salvage files in an interactive console for advanced users.
This mode also requires files generated from either of the Scan Phases.
Parameter definitions:

<source volume> ReFS volume to process. Drive letter in format “L:”, or a path to the volume mount point.
<working directory> Location to store temporary information and logs. It must not be located on <source volume>.
<target directory> Location where identified files will be copied to.
It must not be located on <source volume>.
<options>
-m Recover all possible files including deleted ones.
This option will be ignored on refsutil salvage v1.
WARNING: Not only this will take longer time to run,
it can lead to unexpected result.
-v Verbose mode
-x Force the volume to dismount first if necessary. All
opened handles to the volume would then be invalid.

Eg: refsutil salvage -QA R: N:WORKING N:DATA -x

Categories
ReFS Windows Server

ReFS (Resilient File System) Overview

Here you go, an “Overview of ReFS” straight from Microsoft Docs.
(Preserved here for posterity, in March 2018)

Applies to: Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

 

The Resilient File System (ReFS) is Microsoft’s newest file system, designed to maximize data availability, scale efficiently to large data sets across diverse workloads, and provide data integrity by means of resiliency to corruption. It seeks to address an expanding set of storage scenarios and establish a foundation for future innovations.

Key benefits

Resiliency

ReFS introduces new features that can precisely detect corruptions and also fix those corruptions while remaining online, helping provide increased integrity and availability for your data:

  • Integrity-streams – ReFS uses checksums for metadata and optionally for file data, giving ReFS the ability to reliably detect corruptions.
  • Storage Spaces integration – When used in conjunction with a mirror or parity space, ReFS can automatically repair detected corruptions using the alternate copy of the data provided by Storage Spaces. Repair processes are both localized to the area of corruption and performed online, requiring no volume downtime.
  • Salvaging data – If a volume becomes corrupted and an alternate copy of the corrupted data doesn’t exist, ReFS removes the corrupt data from the namespace. ReFS keeps the volume online while it handles most non-correctable corruptions, but there are rare cases that require ReFS to take the volume offline.
  • Proactive error correction – In addition to validating data before reads and writes, ReFS introduces a data integrity scanner, known as a scrubber. This scrubber periodically scans the volume, identifying latent corruptions and proactively triggering a repair of corrupt data.

Performance

In addition to providing resiliency improvements, ReFS introduces new features for performance-sensitive and virtualized workloads. Real-time tier optimization, block cloning, and sparse VDL are good examples of the evolving capabilities of ReFS, which are designed to support dynamic and diverse workloads:

  • Mirror-accelerated parity – Mirror-accelerated parity delivers both high performance and also capacity efficient storage for your data.
    • To deliver both high performance and capacity efficient storage, ReFS divides a volume into two logical storage groups, known as tiers. These tiers can have their own drive and resiliency types, allowing each tier to optimize for either performance or capacity. Some example configurations include:
      Performance tier Capacity tier
      Mirrored SSD Mirrored HDD
      Mirrored SSD Parity SSD
      Mirrored SSD Parity HDD
    • Once these tiers are configured, ReFS use them to deliver fast storage for hot data and capacity-efficient storage for cold data:
      • All writes will occur in the performance tier, and large chunks of data that remain in the performance tier will be efficiently moved to the capacity tier in real-time.
      • If using a hybrid deployment (mixing flash and HDD drives), the cache in Storage Spaces Direct helps accelerate reads, reducing the effect of data fragmentation characteristic of virtualized workloads. Otherwise, if using an all-flash deployment, reads also occur in the performance tier.

Note

For Server deployments, mirror-accelerated parity is only supported on Storage Spaces Direct. We recommend using mirror-accelerated parity with archival and backup workloads only. For virtualized and other high performance random workloads, we recommend using three-way mirrors for better performance.

  • Accelerated VM operations – ReFS introduces new functionality specifically targeted to improve the performance of virtualized workloads:
    • Block cloning – Block cloning accelerates copy operations, enabling quick, low-impact VM checkpoint merge operations.
    • Sparse VDL – Sparse VDL allows ReFS to zero files rapidly, reducing the time needed to create fixed VHDs from 10s of minutes to mere seconds.
  • Variable cluster sizes – ReFS supports both 4K and 64K cluster sizes. 4K is the recommended cluster size for most deployments, but 64K clusters are appropriate for large, sequential IO workloads.

Scalability

ReFS is designed to support extremely large data sets–millions of terabytes–without negatively impacting performance, achieving greater scale than prior file systems.

Supported deployments

Storage Spaces Direct

Deploying ReFS on Storage Spaces Direct is recommended for virtualized workloads or network-attached storage:

  • Mirror-accelerated parity and the cache in Storage Spaces Direct deliver high performance and capacity-efficient storage.
  • The introduction of block clone and sparse VDL dramatically accelerates .vhdx file operations, such as creation, merge, and expansion.
  • Integrity-streams, online repair, and alternate data copies enable ReFS and Storage Spaces Direct to jointly to detect and correct corruptions within both metadata and data.
  • ReFS provides the functionality to scale and support large data sets.

Storage Spaces with SAS drive enclosures

Deploying ReFS on Storage Spaces with shared SAS enclosures is suitable for hosting archival data and storing user documents:

  • Integrity-streams, online repair, and alternate data copies enable ReFS and Storage Spaces to jointly to detect and correct corruptions within both metadata and data.
  • Storage Spaces deployments can also utilize block-cloning and the scalability offered in ReFS.

Basic disks

Deploying ReFS on basic disks is best suited for applications that implement their own software resiliency and availability solutions.

  • Applications that introduce their own resiliency and availability software solutions can leverage integrity-streams, block-cloning, and the ability to scale and support large data sets.

Note

ReFS is supported with Storage Spaces, Storage Spaces Direct, and non-removable direct attached drives. ReFS is not supported with hardware virtualized storage such as SANs or RAID controllers in non-passthrough mode. USB drives are also not supported.

Feature comparison

Limits

Feature ReFS NTFS
Maximum file name length 255 Unicode characters 255 Unicode characters
Maximum path name length 32K Unicode characters 32K Unicode characters
Maximum file size 35 PB (petabytes) 256 TB
Maximum volume size 35 PB 256 TB

Functionality

The following features are available on ReFS and NTFS:

Functionality ReFS NTFS
BitLocker encryption Yes Yes
Data Deduplication Yes1 Yes
Cluster Shared Volume (CSV) support Yes Yes
Soft links Yes Yes
Failover cluster support Yes Yes
Access-control lists Yes Yes
USN journal Yes Yes
Changes notifications Yes Yes
Junction points Yes Yes
Mount points Yes Yes
Reparse points Yes Yes
Volume snapshots Yes Yes
File IDs Yes Yes
Oplocks Yes Yes
Sparse files Yes Yes
Named streams Yes Yes
  1. Available on Windows Server, version 1709 and later.

The following features are only available on ReFS:

Functionality ReFS NTFS
Block clone Yes No
Sparse VDL Yes No
Mirror-accelerated parity Yes (on Storage Spaces Direct) No

The following features are unavailable on ReFS at this time:

Functionality ReFS NTFS
File system compression No Yes
File system encryption No Yes
Transactions No Yes
Hard links No Yes
Object IDs No Yes
Short names No Yes
Extended attributes No Yes
Disk quotas No Yes
Bootable No Yes
Page file support No Yes
Supported on removable media No Yes
NTFS storage tiers No Yes

See also

Categories
ReFS

ReFS Recovery

We can keep on hoping..!