Dev Drive is a new form of storage volume available to improve performance for key developer workloads.
Dev Drive builds on ReFS technology to employ targeted file system optimizations and provide more control over storage volume settings and security, including trust designation, antivirus configuration, and administrative control over what filters are attached.
Important
Dev Drive is currently only available via public preview (see prerequisities). Some information relating to this prerelease product may be substantially modified before it’s commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
How to set up a Dev Drive
To set up a new Dev Drive, open Windows Settings and navigate to System > Storage > Advanced Store Settings > Disks & volumes. Select Create dev drive. *Before setting up a Dev Drive, ensure that the prerequisites are met. You can also set up a Dev Drive using Dev Home’s Machine configuration.
Prerequisites
- Windows 11 Insider Program Build: Dev Channel.
- Recommend 16gb memory (minimum of 8gb)
- Minimum 50gb free disk space
- Dev Drives are available on all Windows SKU versions.
Warning
Dev Drive is intended only for key developer scenarios and any custom settings will still be covered by Group Policy settings in Business or Enterprise work environments.
Set up options
You will be given three options:
- Create new VHD – Build volume on a new virtual hard disk
- Resize an existing volume – Create new unallocated space to build on
- Unallocated space on disk – Use the unallocated space on an existing disk. *This option will only display if you have previously set up unallocated space in your storage.
Create new VHD
When choosing the Create new VHD option to set up a Dev Drive, you will then need to determine the following:
- Virtual hard disk name: Give a name to your VHD (Dev Drive).
- Location: Assign a directory path where the Dev Drive VHD will be located on your machine.
- Virtual hard disk size: Assign the amount of disk space that will be allocated for the volume to use, minimum size is 50GB.
- Virtual hard disk format:
- VHD: Supports virtual disks up to 2040GB in size.
- VHDX: Supports virtual disks up to 64TB in size and offers more resilient protection against unexpected IO failure caused by issues like power outage). Learn more about Managing VHDs.
- Disk type:
- Fixed size – This virtual hard disk file is allocated to the maximum size when created (Recommended for efficiency)
- Dynamically expanding – Grows to maximum size as data is written
Once you complete the process of selecting between these options, your Dev Drive will be created.
Existing storage volumes cannot be converted to be a Dev Drive. The Dev Drive designation happens only at the original format time.
Resize an existing volume or use unallocated space on an existing disk
To Resize an existing volume:
-
Choose a volume to resize.
-
Choose a new size for the volume. You will need to have at least 50GB of unallocated space available, the minimum size needed for a Dev Drive. Once the size is set, select Next.
-
To format a Dev Drive on the new free space, specify the Label (drive name), Drive Letter, and Size allocation. The maximum size will be the amount of free space you allocated in the previous step, the minimum size for a Dev Drive is 50GB.
Congratulations! You’ve now resized your Dev Drive.
To find and use unallocated space on an existing drive, you can open System > Storage > Disks & volumes, look through the page to see whether any storage space is listed as “Unallocated”. Select Create volume and you will be given the choices to Create Simple Volume (a standard NTFS storage volume) or Create Dev Drive. To create a Dev Drive, the steps are the same as above, you will need to add a Label (drive name), Drive Letter, and confirm the Size allocation.
How does Dev Drive work?
A Storage Volume specifies how data is stored on the file system, via directories and files, in a particular format. Windows uses NTFS for the system drive and, by default, for most non-removable drives. The Resilient File System (ReFS) is a newer Microsoft file system format, designed to maximize data availability, scale efficiently to large data sets across diverse workloads, and provide data integrity with resiliency to corruption. It seeks to address an expanding set of storage scenarios and establish a foundation for future innovations.
The Dev Drive utilizes ReFS enabling you to initialize a storage volume specifically for development workloads, providing faster performance, and customizable settings that are optimized for development scenarios. ReFS contains several file system specific optimizations to improve the performance of key developer scenarios.
There is typically a tradeoff between performance and security. Using a Dev Drive places control over this balance in the hands of Developers and Enterprises. Administrators can now choose between these options:
- Real-time protection
- Antivirus performance mode
- Control over filters attached to Dev Drive
Microsoft generally recommends applying the performance mode option when using a Dev Drive.
What should I put on my Dev Drive?
The Dev Drive is intended for:
- Source code repositories and project files
- Package caches
- Build output and intermediate files
Dev Drive is not intended to store developer tools, such as:
- Visual Studio
- MSBuild
- .NET SDK
- Windows SDK, etc.
These tools should be stored on your main C: drive.
Note
IT Admins will want to create per-user Access Control List (ACL) folders for multi-user devices as a best practice to avoid EOP attacks.
Storing package cache on Dev Drive
A package cache is the global folder location used by applications to store files for installed software. These source files are needed when you want to update, uninstall, or repair the installed software. Visual Studio is one such application that stores a large portion of its data in the Package Cache.
-
Npm cache (NodeJS): Create an npm cache directory in your Dev Drive, e.g.
D:packagesnpm
, then set a global environment variablenpm_config_cache
to that path, e.g.setx /M npm_config_cache D:packagesnpm
. If you have already installed NodeJS on your machine, move the contents of%AppData%npm-cache
to this directory. Learn more in the npm docs: npm-cache and npm config: cache. -
NuGet global-packages folder: The NuGet global-packages folder is used by dotnet, MSBuild, and Visual Studio. Create a user specific NuGet directory in your CopyOnWrite (CoW) filesystem. For example:
D:
. Use one of the following ways to change the global-packages folder from the default location to your newly created folder (to manage the globally installed packages):.nugetpackages -
Set a global environment variable
NUGET_PACKAGES
to that path. For example:setx /M NUGET_PACKAGES D:
..nugetpackages -
Set
globalPackagesFolder
, when usingPackageReference
, orrepositoryPath
, when usingpackages.config
, to that path in configuration settings. -
Set the
RestorePackagesPath
MSBuild property (MSBuild only) to that path.To verify the global-packages folder, run the dotnet nuget locals command:
dotnet nuget locals global-packages --list
. The retore will install and download packag
-