How to Create an ReFS Volume Using PowerShell

In this tutorial, we’ll explain step by step how to create an ReFS volume using PowerShell.

Resilient File System (ReFS) is a file system designed by Microsoft to maximise data availability, address some of the shortcomings of older file systems and scale efficiency to large datasets. It’s already gained significant popularity among systems administrators, so we thought it was only sensible that we dedicate some time to it on our blog. That and the fact that we’ve already talked about NTFS quite a lot.

However, before we get stuck in, if you don’t know much about ReFS, you might want to check out our article What is ReFS and How Does it Work? or our article entitled ReFS vs NTFS, where we took a look at the main differences between the two file systems. And if you don’t know much about NTFS either, you might also want to take a look at our article entitled What is NTFS and What Does It Do?

 

How to Create an ReFS Volume Using PowerShell

Before you get started…

To successfully complete this tutorial, you will need the following:

 

Creating an ReFs Volume Using PowerShell

First, you will need to open PowerShell, either as an administrator or a user with administrator privileges. Then, you need to retrieve information about the available disks on the system.

To do this, run the cmdlet “Get-Disk”. There are several modifiers you can use with this command, but for this tutorial, we’ll use “Format-Table” to display the information in a table.

# Get-Disk | Format-Table

Alternatively, you can use the modifier “Format-List” to show more detailed information.

# Get-Disk | Format-List

NOTE: Personally, I tend to use “Format-List” so I can see more detailed information and choose the fields that I’m interested in for later queries.

Using the Get-Disk command to show the available disks
Using the Get-Disk command to show the available disks

When you first see this information, you might not immediately understand what you’re looking at, especially if you’re only just starting to work with disks. If that’s the case, perhaps you should open the graphic interface to get a clearer understanding, just for now.

To do this, type “Computer Management” in the search bar and click on the app in the results.

Running Computer Management from the search bar
Running Computer Management from the search bar

In the Computer Management window, you will need to click on Storage > Disk Management on the left-hand side of the screen. You will then be able to see the available disks on your system.

Part 1 - In Disk Management, you can see the available disks and their status
Part 1 – In Disk Management, you can see the available disks and their status

The number of disks that you see at this point and their status will depend on your system configurations. However, for the sake of this tutorial, we’re going to imagine that our second disk is offline and unallocated. So, we need to first change the disk status to “Online”.

To do this, run the cmdlet “Set-Disk”:

# Set-Disk -Number <Disk_Number> -IsOffline $False

Where…

  • <Disk_Number> is the disk number. Remember that the system disk is disk number “0”.
  • IsOffline $False sets the disk status to “online”.

NOTE: Doing this for multiple disks at once can cause problems, so we recommend only running this command for one disk at a time.

Here is what this command would look like for our second disk:

# Set-Disk -Number 1 -IsOffline $False

Once this is done, run the “Get-Disk” command again with the modifier “Format-Table” to see that the disk status has changed.

# Get-Disk | Format-Table

Alternatively, you could open “Computer Management” again and go to “Storage > Disk Management”.

Setting Disk 1 to online
Setting Disk 1 to online

So far, the disk is online but hasn’t been partitioned and has no volumes. So, the next step is to create a partition, allocated a drive letter and format it using ReFS.

To do this, we’ll use the pipe symbol to feed the output of the “Get-Disk” command into the “New-Partition” command in the following way:

# Get-Disk <Disk_Number> | New-Partition -UseMaximumSize -DriveLetter <Drive_Letter>  | Format-Volume -FileSystem <File_System> -NewFileSystemLabel “<FS_Label>” -SetIntegrityStreams $false

Where…

  • <Disk_Number> is the disk number. Remember that the system disk is disk number “0”.
  • <Disk_Letter> is the letter you want to give to the volume.
  • <File_System> is the file system that you want to use to partition to disk, which in this case is ReFS.
  • <FS_Label> to label that we want to give the FS, for example, “NachoData”.

Here’s an example of what this might look like:

# Get-Disk 1 | New-Partition -UseMaximumSize -DriveLetter X | Format-Volume -FileSystem REFS -NewFileSystemLabel “NachoData” -SetIntegrityStreams $false

Partitioning the disk, formatting it using ReFS and allocating it a drive letter
Partitioning the disk, formatting it using ReFS and allocating it a drive letter

At this point, the new drive should appear on Windows Explorer.

Checking that the new drive appears on Windows Explorer
Checking that the new drive appears on Windows Explorer

 

Summary

In this tutorial, you’ve learnt how to create an ReFS volume using PowerShell. This tutorial has looked at Windows Server 2022, but the process is also valid for 2016 and 2019. This is the simplest way to create a drive and, as you can see, it’s really not complicated at all.

We hope that you’ve found this tutorial interesting. We’ll certainly be back with more articles about ReFS in the future. In the meantime, if you have any problems or questions, please don’t hesitate to get in touch with us.

Thanks for choosing Jotelulu!

Categories:Servers

Fill out the form and one of our Sales team will contact you soon.

growth@jotelulu.com  |  jotelulu.com 

You can unsubscribe from these communications at any time. For more information,  check our Privacy Policy.

 

We make the difficult easy

Existing Disaster Recovery tools often require advanced knowledge to manage, demanding expertise that is difficult to acquire.

Jotelulu’s Disaster Recovery aims to make the difficult easy and offers a very simple deployment based on a three-step configuration:

Origin (Primary Site)
Determine the origin location of the subscription on which the Disaster Recovery service will be established.

Destination (Recovery Site)
Set the destination location (availability zone) where you want the Recovery Site to be deployed.

Replication characteristics
Specify the data related to the number of copies to be kept and the frequency at which the replication will be performed.