If WSL reports “no space left on device,” first check the Linux filesystem’s available space; a large Windows drive does not guarantee that the distribution has room, and increasing the WSL virtual disk’s limit does not create physical host storage. For WSL 2, the right fix depends on whether Linux has filled its filesystem, the virtual disk needs a larger limit, the ext4 filesystem has been mounted read-only, or Windows is rejecting the VHD’s file attributes.
First identify which disk-space problem you have
These steps apply primarily to WSL 2, whose Linux filesystem is stored in an ext4 virtual hard disk file, usually named ext4.vhdx. WSL 1 does not use this same VHD repair workflow. Microsoft’s current guidance lists a default maximum virtual capacity of 1 TB per WSL VHD; older WSL versions used defaults of 512 GB or 256 GB. These are virtual limits, not the amount of free space on the Windows drive.
From PowerShell, check the Linux filesystem’s capacity, replacing the placeholder with the distribution name shown by wsl --list --verbose:
wsl.exe --system -d <distribution-name> df -h /mnt/wslg/distro
Read the Size, Used, and Avail columns. If the command is unavailable, update Store WSL with wsl --update and try again, or use:
Recommended Free Tools
#1 Best Overall
- Get NVMe solid state performance with up to 1050MB/s read and 1000MB/s write speeds in a portable, high-capacity drive(1) (Based on internal testing; performance may be lower depending on host device & other factors. 1MB=1,000,000 bytes.)
- Up to 3-meter drop protection and IP65 water and dust resistance mean this tough drive can take a beating(3) (Previously rated for 2-meter drop protection and IP55 rating. Now qualified for the higher, stated specs.)
- Use the handy carabiner loop to secure it to your belt loop or backpack for extra peace of mind.
- Help keep private content private with the included password protection featuring 256‐bit AES hardware encryption.(3)
- Easily manage files and automatically free up space with the SanDisk Memory Zone app.(5). Non-Operating Temperature -20°C to 85°C
wsl df -h /
Also check free space on the Windows drive separately. The VHD grows as needed, so its displayed virtual capacity can exceed the physical space available to it on the host. Microsoft documents these checks and the capacity distinction in its WSL disk-space guide.
- Linux shows little or no available space: Find what is using space, or expand the WSL 2 disk limit if the filesystem has reached its capacity.
- Linux still has available space: Look for the specific full location, such as an application’s data directory, package cache, or container storage. Enlarging the VHD will not fix a different full filesystem or directory.
- WSL starts read-only or writes fail after a mount warning: Treat this as a filesystem repair problem, not a capacity problem.
- Windows reports a virtual disk system limitation: Check the VHD’s compression, encryption, and sparse status before attempting a resize.
Expand a full WSL 2 virtual disk
Microsoft’s simpler resize command requires WSL 2.5 or later. Check your installed WSL version with wsl --version. The resize value must be an integer size string: Microsoft says decimal values such as 2.5TB are not supported. Before choosing a new limit, make sure the Windows host has enough real storage for the VHD to grow.
WSL 2.5 or later: use the manage command
- In PowerShell, confirm the exact distribution name with
wsl --list --verbose. - Shut down running WSL instances:
wsl.exe --shutdown. - Set the new virtual disk size, using a supported integer value such as
200GBor1TB:wsl --manage <distribution-name> --resize <size>. - Start the distribution and repeat the capacity check to confirm the change.
The command expands the VHD and its filesystem. Choose the target carefully: setting a larger virtual maximum does not reserve that amount of physical Windows storage, but the VHD can consume more host space as Linux writes data.
Rank #2
- Solid state performance with up to 800MB/s read speeds in a portable drive. (Based on internal testing; performance may be lower depending on host device, interface, usage conditions and other factors. 1MB=1,000,000 bytes.)
- Back up your content and memories on a storage solution that fits seamlessly into your mobile lifestyle.
- Take it with you on your adventures—up to two-meter drop protection means this durable drive can take a beating. (Based on internal testing.)
- Secure it to your belt loop or backpack for extra peace of mind thanks to the tough rubber hook.
- From Sandisk, a brand professional photographers trust to take on assignments.
Older WSL versions: Microsoft’s manual route
If your WSL installation does not support --manage ... --resize, Microsoft documents a longer process using DiskPart on Windows and resize2fs in the Linux distribution. It requires shutting down WSL, identifying the correct distribution VHD, increasing its virtual maximum in DiskPart, then starting the WSL 2 distribution and expanding the ext4 filesystem. The DiskPart portion requires an elevated Command Prompt. Follow the steps in Microsoft’s manual expansion instructions exactly; selecting the wrong VHD or setting an unintended maximum can cause problems, and reducing a virtual disk later is more complicated. This route is not for WSL 1.
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 →Clear out junk files and repair common Windows errorsFree Scan →To look up the VHD path for a named distribution, Microsoft provides this PowerShell query:
(Get-ChildItem -Path HKCU:SoftwareMicrosoftWindowsCurrentVersionLxss |
Where-Object { $_.GetValue("DistributionName") -eq '<distribution-name>' }).GetValue("BasePath") + "ext4.vhdx"
Do not open, edit, or move the VHD while WSL is using it. Microsoft warns that directly modifying or accessing WSL-managed files under the Windows profile with Windows tools or editors can corrupt a distribution. Use supported WSL paths and commands instead.
Rank #3
- Capacity Display Variance: 500GB external ssd often appears as around 465GB on Windows. MacOS can show full 500 GB capacity. This is binary calculation difference and doesn’t affect SSD hard drive actual physical storage
- 1050 MB/s Speed: Instantly access to your files with blazing-fast 10Gbps external SSD read up to 1050MB/s and write up to 1000MB/s. LED Light indicates USB SSD instant activity
- Data Security: Solid state drives S.M.A.R.T. health diagnostics and adaptive TRIM optimizing data block management ensures consistent write speeds and extends the longevity of the portable SSD
- USB-C & USB-A Cable: Both cables featuring rapid USB 3.2 Gen2, this USB SSD effortlessly bridges devices, enabling seamless cross-platform file transfers and backup between computers, smartphones, tablets and iPhone
- Always Fast: No slowdowns for large file transfers. With SLC caching (25% of current available capacity allocated as high-speed cache), this external SSD delivers steady 10Gbps for transfers within the cache capacity
Repair a WSL distribution mounted read-only
After a sudden shutdown or power outage, WSL may mount a distribution read-only to protect against data loss. One reported startup message is “An error occurred mounting the distribution disk, it was mounted read-only as a fallback.” If this is your symptom, back up important data where possible before filesystem repair, then follow Microsoft’s sequence. You need the correct distribution’s ext4.vhdx path and must identify the block device rather than guessing its name.
- Close WSL applications and shut down WSL:
wsl.exe --shutdown. - Attach the VHD in bare mode, substituting its actual path:
wsl.exe --mount <path-to-ext4.vhdx> --vhd --bare. - List block devices:
wsl.exe lsblk. Identify the device corresponding to the attached VHD. - Run the filesystem check and repair against that device:
wsl.exe sudo e2fsck -f /dev/<device>. Replace the placeholder with the device identified bylsblk; do not assume a name such as/dev/sdX. - Detach the VHD:
wsl.exe --unmount.
e2fsck checks and repairs the ext4 filesystem. Microsoft notes two possible blockers: if only one Linux distribution is installed, an “ext file in use” error may prevent lsblk from running in this workflow; the documented workaround is to install another distribution temporarily and remove it after repair. If Docker Desktop causes ERROR_SHARING_VIOLATION, close Docker Desktop and retry. Do not rely on sudo mount -o remount,rw / as a repair: Microsoft says changes made that way are only in memory and disappear when the distribution restarts. See Microsoft’s read-only disk recovery instructions.
Fix the virtual disk system limitation error
If Windows displays “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,” address the VHD’s file attributes rather than treating it as ordinary Linux disk exhaustion. Microsoft’s WSL troubleshooting guide directs users to the distribution’s Windows profile folder and its LocalState directory, then to clear compression and encryption if enabled. If Windows asks whether to apply the compression change to the folder and all contents, Microsoft says to apply it to the folder only.
Rank #4
- Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
Sparse VHDs are a separate WSL storage feature, so check the installed WSL version and the distribution’s sparse configuration before changing attributes or using a compaction utility. Microsoft documents enabling or disabling sparse mode for an existing distribution with:
wsl --manage <distribution-name> --set-sparse <true/false>
In a September 2023 announcement, Microsoft described sparse VHDs as automatically shrinking the WSL virtual hard disk as it is used. The setting is not a guarantee that every configuration shrinks after every deletion. Microsoft’s WSL September 2023 update describes sparse behavior and the command.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Reclaim Windows storage after deleting Linux files
Removing files inside Linux and reducing the Windows-side VHD file are different operations. Deleting Linux files frees filesystem space, but the VHD file on Windows may not immediately become smaller. Sparse VHD behavior can reclaim space automatically when configured and supported; for an existing distribution, the command is wsl --manage <distribution-name> --set-sparse <true/false>. Review the sparse setting and the virtual disk limitation guidance before changing it.
Best Value
- MADE FOR THE MAKERS: Create; Explore; Store; The T7 Portable SSD delivers fast speeds and durable features to back up any endeavor; Build your video editing empire, file your photographs or back up your blogs all in an instant
- SHARE IDEAS IN A FLASH: Don’t waste a second waiting and spend more time doing; The T7 is embedded with PCIe NVMe technology that brings fast read and write speeds up to 1,050/1,000 MB/s¹, making it almost twice as fast as the T5
- ALWAYS MAKE THE SAVE: Compact design with massive capacity; With capacities up to 4TB, save exactly what you need to your drive – from large working files to game data and everything in between
- ADAPTS TO EVERY NEED: Whether using a PC or mobile phone, count on the T7 for extensive compatibility²; It’s a true team player when it comes to heavy-duty application usage or file-saving
- HI RESOLUTION VIDEO RECORDING: Record Ultra High Resolution (4K 60fs) videos directly onto the T7 Portable SSD with your favorite camera or mobile devices; Supports iPhone 15 Pro Res 4K at 60fps video and more³
Hyper-V’s Optimize-VHD is another possible compaction tool, but its requirements and results vary by mode. Microsoft says it reclaims unused blocks and rearranges allocation, yet can complete without reducing the file size if no optimization is possible. Its documentation for Optimize-VHD specifies:
| Mode | What it does | Attachment requirement in Microsoft’s documentation |
|---|---|---|
Full |
Scans for zero blocks. | VHD must be read-only. |
Quick |
Reclaims unused blocks without scanning for zero blocks. | VHD must be read-only. |
Retrim |
Sends trim requests without reclaiming blocks. | VHD must be read-only. |
Pretrimmed |
Optimizes based on pre-trimmed data. | Does not require read-only attachment; unused-space detection is less effective. |
Prezeroed |
Optimizes based on pre-zeroed data. | Does not require read-only attachment; unused-space detection is less effective. |
Do not assume Optimize-VHD -Mode Full is appropriate for every sparse WSL VHD. Follow Microsoft’s attachment requirements for the selected mode, and do not run compaction while WSL is using the disk.
Quick Recap
Keep WSL disk changes safe
- Confirm the target distribution before resizing, attaching, or repairing a VHD.
- Check Linux filesystem usage and Windows host free space separately.
- Back up important files before filesystem repair or manual disk operations.
- Never guess the block device shown to
e2fsck; identify it withlsblk. - Do not use Windows editors or file-management tools to alter WSL-managed VHD contents directly.
- Prefer the supported resize command when your WSL version provides it; use the manual procedure only when required by your version.
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.




