Start by checking whether Linux has actually run out of filesystem space. In WSL 2, a distribution’s ext4.vhdx can have a large virtual maximum while using less space on the Windows drive; a read-only mount, meanwhile, calls for filesystem repair rather than resizing. The steps below cover WSL 2 on Windows, with separate procedures for expanding Linux capacity, repairing a read-only disk, and reclaiming host storage.
First, identify which disk-space problem you have
In PowerShell, check the Linux filesystem for the affected distribution. Replace the placeholder with its registered distribution name:
wsl.exe --system -d <distribution-name> df -h /mnt/wslg/distro
Read the Size, Used, and Avail columns. If this command is unavailable, Microsoft suggests updating Store WSL with wsl --update and trying wsl df -h / instead. See Microsoft’s WSL disk-space guidance.
- Linux filesystem full: If available space is near zero, find what is consuming it. If the filesystem has reached its capacity, expand it using the applicable procedure below.
- Windows drive low on space: Check free space in Windows separately. The VHD expands as needed, but its virtual maximum is not space reserved on the host drive.
- Distribution mounted read-only: Treat this as a possible ext4 filesystem problem. Do not try to solve it by increasing the VHD maximum.
For context, Microsoft’s disk-space page, last updated February 5, 2025, gives 1 TB as the current default maximum virtual capacity per WSL VHD. Older WSL defaults cited on that page were 512 GB and 256 GB. Those are virtual capacity limits, not measures of free physical storage on the Windows drive. WSL 1 does not use this WSL 2 VHD repair workflow.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware match#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Expand a WSL 2 disk when Linux is genuinely out of space
Microsoft documents two approaches: the --resize command for WSL 2.5 or later, and a manual DiskPart plus resize2fs procedure for older installations. Confirm your WSL version and distribution name before proceeding. Back up important files before changing a virtual disk.
| Approach | When to use it | What it involves |
|---|---|---|
wsl --manage --resize |
WSL 2.5 or later | Shut down WSL, then run one resize command. No manual VHD selection or separate ext4 resize step is required by the documented command. |
DiskPart and resize2fs |
Older WSL installations without the resize command | Shut down WSL, select and enlarge the correct VHD in elevated Command Prompt using DiskPart, then expand ext4 from the distribution. Requires careful VHD and target-size selection. |
WSL 2.5 or later: use the resize command
-
In PowerShell, stop all WSL instances:
wsl.exe --shutdown -
Set the desired virtual disk size, substituting the distribution name and an integer size:
wsl --manage <distribution-name> --resize <size>Use an accepted integer size such as
2GBor2TB. Microsoft says decimal values such as2.5TBare not supported by this syntax.
Check the Linux filesystem again with df -h to confirm the available capacity. Increasing the VHD maximum does not create free space on the Windows drive; ensure the host has room for the VHD to grow.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Older WSL: use Microsoft’s manual expansion route
This method requires finding the right VHD, using DiskPart from an elevated Command Prompt to increase its virtual maximum, and then running resize2fs in the WSL 2 distribution. Follow Microsoft’s current manual expansion instructions for the exact DiskPart and Linux commands. Do not set a larger maximum than you intend: reducing a virtual disk later is more complicated. This route is not for WSL 1.
To locate the VHD path for a registered distribution, Microsoft documents this PowerShell query:
(Get-ChildItem -Path HKCU:SoftwareMicrosoftWindowsCurrentVersionLxss |
Where-Object { $_.GetValue("DistributionName") -eq '<distribution-name>' }).GetValue("BasePath") + "ext4.vhdx"
Do not open, move, edit, or manipulate the VHD while WSL is using it. Microsoft warns that Windows tools and editors accessing WSL-managed files in AppData can corrupt a distribution; use supported WSL commands and access paths instead.
Repair a WSL distribution mounted read-only
After an unexpected shutdown or power outage, WSL may mount a VHD read-only to avoid data loss. A reported symptom is the message “An error occurred mounting the distribution disk, it was mounted read-only as a fallback,” followed by write failures. Microsoft’s documented recovery uses e2fsck to check and repair the ext4 filesystem. Back up what you can before repair, and never guess the block-device name.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
-
Shut down WSL:
wsl.exe --shutdown -
Attach the affected distribution’s VHD in bare mode. Replace the path with the correct
ext4.vhdxpath:wsl.exe --mount <path-to-ext4.vhdx> --vhd --bare -
List block devices and identify the device belonging to that VHD:
wsl.exe lsblk -
Run the filesystem check against the device you identified, not an assumed
/dev/sdX:wsl.exe sudo e2fsck -f /dev/<device> -
Unmount the attached disk:
wsl.exe --unmount
Microsoft notes two possible obstacles: with only one Linux distribution installed, an “ext file in use” error may prevent lsblk from running; its guidance suggests temporarily installing another distribution, then removing it after repair. If Docker Desktop triggers ERROR_SHARING_VIOLATION, close Docker Desktop and retry.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsRank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Do not use sudo mount -o remount,rw / as a lasting fix. Microsoft warns that changes made that way exist only in memory and are lost when the distribution restarts. Follow Microsoft’s read-only mount repair steps if your device layout or error differs.
Fix the virtual disk system limitation error
If Windows reports “The requested operation could not be completed due to a virtual disk system limitation. Virtual hard disk files must be uncompressed and unencrypted and must not be sparse,” follow Microsoft’s troubleshooting steps for the distribution’s LocalState folder:
-
Locate the affected distribution’s folder under your Windows user profile and open its
LocalStatefolder. -
Clear the folder’s compression attribute. If encryption is enabled, clear that as well. If Windows asks whether to apply the compression change to the folder and all contents, Microsoft says to apply the compression change to the folder only.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.Best Value
SaleAnker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
-
Check the distribution’s sparse-VHD configuration before changing sparse settings or attempting compaction.
Microsoft’s WSL troubleshooting guide states that VHDs involved in this limitation must be uncompressed, unencrypted, and not sparse. Sparse VHD support is a separate WSL feature, so do not assume it is enabled or disable it without checking the current setup.
Reclaim Windows storage after deleting Linux files
Removing files inside Linux frees filesystem blocks, but the Windows-side VHD file may not immediately become smaller. Microsoft describes sparse VHDs as able to shrink automatically as they are used, and documents enabling or disabling sparse mode for an existing distribution with wsl --manage <distro> --set-sparse <true/false>. The sparseVhd setting is an opt-in for newly created VHDs. See Microsoft’s September 2023 WSL update for the feature details. Sparse behavior is distinct from increasing Linux filesystem capacity and may conflict with the file-attribute requirements in the virtual disk limitation error.
Manual Hyper-V compaction with Optimize-VHD is another option only when supported by the installed Windows and Hyper-V setup. Microsoft says the VHD must be detached or attached read-only for applicable modes; optimization may complete without reducing file size if no space can be reclaimed. Its modes have different constraints:
- Full: Scans for zero blocks and is permitted only when the disk is read-only.
- Quick: Reclaims unused blocks without scanning for zero blocks; also read-only-only.
- Retrim: Sends trim requests without reclaiming blocks and requires read-only attachment.
- Pretrimmed and Prezeroed: Do not require read-only attachment, but detect unused space less effectively.
Consult Microsoft’s Optimize-VHD documentation for the cmdlet’s requirements. Do not assume Optimize-VHD -Mode Full applies to every sparse WSL VHD.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

