Check Linux capacity and Windows free space to see whether a larger WSL 2 disk will help. Before resizing, confirm WSL package release 2.5 or higher, select the affected distribution, and test a backup restore.
The supported resize command raises the virtual disk’s capacity. It can’t create physical storage, fix another mount, or repair filesystem damage.
Prerequisites
You’ll need:
- An existing Windows-hosted WSL 2 distribution.
- WSL package release 2.5 or higher, plus local help showing the resize option.
- PowerShell and the selected distribution’s
dfcommand. - Enough Windows storage for continued growth, an export, and a separate test restore.
- A tested backup and downtime for WSL workloads.
These steps cover Windows systems already running WSL 2. The Windows version alone doesn’t tell you whether resizing is supported. Check the installed WSL package.
Microsoft lists the version requirement and supported command in How to manage WSL disk space. You don’t need an extra Linux disk-management package for these steps.
Quick Diagnosis: WSL 2 Disk Full
| Symptom or scenario | Check first | Recommended action |
|---|---|---|
| Linux filesystem is full; Windows has room | Filesystem containing the failing path | Consider supported expansion after testing a backup |
| Linux has room; Windows storage is exhausted | Windows volume holding the distribution | Free host storage before retrying |
| Only writes under one path fail | That path’s filesystem | Check its mount before resizing the distribution |
| Distribution shows VERSION 2; resize is unavailable | wsl --version and wsl --help | Check the WSL package release separately |
| Filesystem is read-only or the virtual disk won’t mount | Exact error message | Stop expansion and seek recovery guidance |
| Capacity doesn’t increase after resizing | Same distribution and filesystem as before | Save the output and stop further storage changes |
Three storage measurements matter:
| Measurement | What it tells you |
|---|---|
| Windows host free space | Physical space available for the virtual disk to grow |
| Linux filesystem capacity | Space Linux can currently use within that filesystem |
| Virtual disk maximum | Upper limit for the dynamically expanding virtual disk |
Each WSL 2 distribution stores its Linux filesystem in a virtual hard disk, typically ext4.vhdx. It grows as you add data, up to its set limit or the available host storage.
That’s why Linux can show more available space than Windows has. Raising the limit doesn’t reserve the whole target size on Windows at once. But growth still uses physical storage.
1. Identify the distribution and WSL package
Run these commands in PowerShell:
wsl --list --verbose
wsl --version
wsl --help
In the distribution list, record the exact name. Check that its VERSION column is 2. That value identifies WSL 2 architecture.
Then check the WSL version reported by wsl --version. It must meet the documented 2.5 minimum. Local help must also list --manage and --resize.
These are separate checks. VERSION 2 beside Ubuntu doesn’t mean WSL package release 2.5 is installed. Microsoft’s architecture comparison explains WSL 1 and WSL 2.
Set the target for the remaining PowerShell examples:
$Distro = Read-Host 'Enter the exact distribution name from wsl --list --verbose'
Keep using this PowerShell session so the variable stays available.
2. Check the filesystem containing the failing path
Start with the selected distribution’s root filesystem:
wsl -d "$Distro" df -h /
Then check the directory where writes fail. If the failed operation was creating a file, enter its existing parent directory:
$FailingPath = Read-Host 'Enter the existing Linux directory where writes fail'
wsl -d "$Distro" --exec df -h -- "$FailingPath"
-d selects the named distribution. df -h shows filesystem capacity in human-readable units.
Read these columns:
Size: total filesystem capacity.Used: occupied space.Avail: available space.Use%: percentage used.Mounted on: mount containing the supplied path.
Compare both results. A path under /mnt/c, another mounted drive, or a separate filesystem needs its own checks. Expanding the distribution root won’t enlarge those filesystems.
3. Check the actual Windows storage volume
Don’t assume the distribution lives on C:, and don’t rely on Get-PSDrive alone, it only lists available drives and their space, not which drive holds the virtual disk.
First, use Microsoft’s documented disk-path lookup for a read-only registry check for your current Windows user account to locate the selected distribution’s BasePath folder (where its ext4.vhdx file is typically stored):
$DistroKey = Get-ChildItem -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss' |
Where-Object { $_.GetValue('DistributionName') -eq $Distro } |
Select-Object -First 1
$BasePath = if ($DistroKey) { $DistroKey.GetValue('BasePath') -replace '^\\\\\?\\', '' }
$BasePath
Confirm that $BasePath prints a valid Windows path for your distribution. For imported, in-place or custom layouts, confirm the active VHD file from your import/install records; the conventional ext4.vhdx name and directory alone do not prove which disk is active. Stop if you cannot establish that identity. Then derive its drive letter and inspect that volume’s free space:
$HostDrive = (Split-Path -Path $BasePath -Qualifier).TrimEnd(':')
Get-PSDrive -Name $HostDrive
Review the Used, Free, and Root columns for $HostDrive. You can also run Get-Volume -DriveLetter $HostDrive for volume details, or Get-PSDrive -PSProvider FileSystem to inspect separate drives planned for your export and test restore.
If the lookup returns nothing or you can’t confirm the distribution’s host volume, stop before resizing. Recheck the exact $Distro name and confirm you’re signed into the Windows account that owns the distribution, or verify installation and import records instead of guessing.
Common Issues and Solutions
4. Problem: Linux is full, but Windows has free space
Symptoms:
- Writes fail with
No space left on device. - The affected root filesystem has little or no
Avail. - Its Windows host volume still has usable free space.
Cause: The Linux filesystem has reached its current capacity. Supported expansion can help in this case.
Solution:
First, complete the backup checks:
- Stop applications cleanly so their data can be backed up consistently.
- Create an export of the exact distribution.
- Restore that export under a separate distribution name and location.
- Open the restored distribution and verify important files.
- Check relevant application data using the application’s normal validation process.
- Keep the original distribution and the export.
For a standard WSL export/import test, choose a new export filename, an empty restore folder with sufficient free space, and a test name not already shown by wsl --list --quiet. Do not use the original name or unregister the original. These are examples of the documented export/import commands, not a record of testing performed for this article:
$BackupPath = Read-Host 'New full export file path on a volume with sufficient space'
$TestDistro = Read-Host 'Unused test distribution name distinct from the original'
$RestoreFolder = Read-Host 'Empty test restore folder on a volume with sufficient space'
wsl --export "$Distro" "$BackupPath"
wsl --import "$TestDistro" "$RestoreFolder" "$BackupPath" --version 2
wsl -d "$TestDistro" --exec df -h /
Stop after any command error. Successful import should add the separate test name to wsl --list --verbose; then open that test distribution and verify important files and application data. A visible directory alone is not a verified restore.
A successful export doesn’t prove the restore works. Don’t resize until the separate restore passes. Don’t unregister the original distribution.
Budget physical storage separately for the export and the test-restored distribution, which can each consume substantial space. Put the test restore on a volume with enough free capacity, use a distinct test name, and keep the original registered. Use your established backup procedure to export and restore. Microsoft’s WSL command reference documents the available commands.
Next, choose a larger total target capacity. Microsoft accepts integer values with these suffixes:
| Accepted suffixes | Example |
|---|---|
B | 2048B |
M, MB | 2048MB |
G, GB | 768GB |
T, TB | 2TB |
These examples show the syntax. Choose a target larger than the current capacity, with room for expected growth. Decimal values such as 2.5TB aren’t supported.
Set your chosen target:
$TargetSize = Read-Host 'Enter the larger total capacity using an integer and supported suffix'
Review the recorded distribution name, starting capacity, and target before you proceed.
Downtime warning:
wsl --shutdownstops all running WSL distributions. It can also interrupt WSL-backed Docker workloads. Save work, stop applications cleanly, and prevent tools from restarting WSL during resizing.
After testing the backup and stopping workloads, run:
wsl.exe --shutdown
wsl --manage "$Distro" --resize "$TargetSize"
The target sets the new total, rather than extra space to add. For example, a 768GB target requests a total capacity of 768GB.
Let the operation finish and save its actual output. If it reports an error, stop instead of trying manual disk-editing commands.
Verification:
Repeat the baseline check against the same distribution:
wsl -d "$Distro" df -h /
wsl -d "$Distro" --exec df -h -- "$FailingPath"
Get-PSDrive -PSProvider FileSystem
Confirm that root filesystem Size increased and review Avail. The filesystem uses some space for its own records. Its displayed size needn’t match the target exactly.
Check important files, restart required applications, and retry the original failing operation. Check Windows free space again.
5. Problem: Linux has space, but Windows is full
Symptoms:
- Linux reports available filesystem capacity.
- Writes fail as the Windows host volume runs out of space.
- Expanding the virtual maximum doesn’t resolve the failure.
Cause: Linux reports capacity within its virtual disk. Windows must still provide physical storage as that disk grows.
Solution:
- Confirm the Windows volume holding the affected distribution.
- Check that volume’s physical free space.
- Stop workloads that consume storage.
- Arrange more host capacity through your normal storage-management process.
- Retry writes only after you’ve restored enough free space.
An external SSD can hold backups, but its free space doesn’t enlarge the volume holding the active distribution. A NAS can hold retained backups, but allow for transfer time and access during a restore.
Verification: Check host free space again, then retry the original write. If the filesystem becomes read-only or mounting fails, stop and follow the health-error guidance below.
6. Problem: The resize command isn’t recognized
Symptoms:
- WSL rejects
--manageor--resize. wsl --versionisn’t available.- The distribution list shows VERSION 2, but resizing remains unavailable.
Cause: WSL 2 architecture and WSL package release are separate checks. The installed package may lack the documented command.
Solution:
wsl --version
wsl --help
On a personally managed host, Microsoft’s documented update command is:
wsl --update
On an organization-managed host, use the approved update process. Microsoft also documents wsl --update --web-download, which downloads from GitHub instead of Microsoft Store. It doesn’t grant permission to bypass policy.
Verification: Recheck the package version and local help after the approved update. Proceed only when the required version and options are available.
If updates are blocked, keep the distribution and backup intact. Escalate rather than trying manual virtual-disk editing.
7. Problem: You’re checking the wrong distribution or mount
Symptoms:
- Capacity differs between terminal sessions.
- Resizing appears unrelated to the failing application.
- Root has room, but a mounted path remains full.
Cause: Commands without -d use the default distribution. Applications can also write to a filesystem outside the distribution root.
Solution:
wsl --list --verbose
$Distro = Read-Host 'Enter the exact affected distribution name'
$FailingPath = Read-Host 'Enter the existing directory where writes fail'
wsl -d "$Distro" df -h /
wsl -d "$Distro" --exec df -h -- "$FailingPath"
Use the distribution running the failing application. Keep names quoted, especially when they contain spaces.
Verification: Confirm the application, distribution, and failing path match. Resize only if that path belongs to the root filesystem and capacity is the limit.
8. Problem: Capacity is unchanged, or a health error appears
Symptoms:
- Root
Sizedoesn’t increase after resizing. - Linux reports
Read-only file system. - WSL reports a VHD mounting failure or an unexpected storage error.
Cause: An unchanged result can mean you checked a different target or the operation failed. Read-only and mounting errors need filesystem-health checks.
Solution:
- Record the complete resize output or error.
- Confirm the exact distribution name.
- Repeat the original root capacity check.
- Compare against the saved baseline.
- Stop if the expected increase is absent or a health error persists.
Verification: Resume workloads only after capacity, file access, and application checks pass. Keep the original distribution and tested backup intact while seeking help. Filesystem repair is a separate procedure.
Error Messages Table
Exact wording varies between WSL releases and applications.
| Message or result | Meaning | Safe next action |
|---|---|---|
No space left on device | A write hit a storage limit | Check the failing path and Windows host space |
--manage or --resize rejected | Required command isn’t available | Check package version and local help |
| Size argument rejected | Syntax or target needs review | Use an integer, supported suffix, and larger total |
Read-only file system | Writes are blocked on that filesystem | Stop expansion and assess filesystem health |
| VHD mounting error | WSL can’t mount the virtual disk normally | Save the exact error and escalate |
| Capacity unchanged | Target or operation needs checking | Compare the same distribution’s root baseline |
Platform-Specific Issues
9. Check Windows host constraints
A distribution showing VERSION 1 falls outside these steps. Treat architecture conversion as a separate change with its own backup. Microsoft’s comparison documentation warns that conversion can take time and fail.
On managed Windows hosts, blocked updates are a stopping point. Follow the organization’s approved process.
Docker-managed storage also needs its own product-specific steps. Use this guide to plan workload downtime. Then consult Docker Desktop’s WSL documentation for its storage context.
Configuration Issues
10. Check targets and defaults before changing capacity
| Common mistake | Correct approach |
|---|---|
Treating VERSION 2 as package release 2.5 | Check wsl --version separately |
Assuming the distribution lives on C: | Confirm its actual host volume |
| Assuming every distribution has the same maximum | Measure the selected filesystem |
Supplying 2.5TB | Choose an integer target with a supported suffix |
| Treating the target as additional capacity | Specify the new total |
| Treating root capacity as mounted-drive capacity | Run df against the failing path |
| Assuming shutdown affects one distribution | Plan interruption across WSL workloads |
Microsoft’s disk-space reference lists a 1TB default maximum and older defaults of 512GB and 256GB. Existing and customized distributions can differ. None of these values promises the same amount of physical Windows storage.
Getting Help
11. Collect evidence before escalating
Run:
wsl --version
wsl --list --verbose
wsl --help
wsl -d "$Distro" df -h /
wsl -d "$Distro" --exec df -h -- "$FailingPath"
Get-PSDrive -PSProvider FileSystem
Include the failing path, confirmed host volume, before-and-after capacity, and complete resize output. Add the Windows version and affected application’s own logs.
For WSL diagnostic collection, follow Microsoft’s WSL issue-reporting instructions. Review logs for private paths and identifying information before sharing.
Use the Microsoft WSL issue tracker or your administrator. Escalate at once for repeated mounting errors, read-only filesystems, blocked updates, or unexpected resize failures.
Prevention Tips
- Monitor Windows free space alongside Linux
dfoutput. - Record each distribution’s host volume and capacity baseline.
- Keep tested exports according to your backup retention policy.
- Review application data growth before the root filesystem fills.
- Schedule WSL updates through the same process used for other host software.
- Include all running distributions and Docker workloads in shutdown plans.
Wrapping Up
Find which storage layer is full, test an export restore, and expand only the affected WSL 2 filesystem. I’d stop at any unexplained health error; extra capacity won’t fix it.
| Step | Action | Applies to |
|---|---|---|
| Diagnose | Check the failing path and host free space | Every disk-full report |
| Prepare | Verify WSL support and test a restore | Before expansion |
| Expand | Shut down workloads and set a larger total | Supported WSL 2 distributions |
| Verify | Compare capacity and check applications | After resizing |
Keep the tested backup and record the new capacity once the checks pass. You’ll have a useful baseline for the next storage review.