-
Notifications
You must be signed in to change notification settings - Fork 836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how-to-repair-a-vhd-mounting-error? the tutorial not work at all! #10169
Comments
PS F:\wsl\Debian> wsl.exe sudo e2fsck -f /dev/sdc |
PS F:\wsl\Debian> wsl --shutdown PS F:\wsl\Debian> wsl --shutdown PS F:\wsl\Debian> wsl --shutdown |
PS F:\wsl\Debian> wsl --shutdown |
(base) root@DESKTOP-D2P8H7D:/mnt/f/wsl/Debian# lsblk |
Facing the same error and I can't access my
I had to |
|
@ethever the error message is obivous You could use the
Make sure you specify the root user otherwise you'll be greeted by:
|
Debian is my default distribution: PS F:\wsl\Debian> wsl --list
Windows Subsystem for Linux Distributions:
Debian (Default)
Ubuntu
docker-desktop-data
docker-desktop
PS F:\wsl\Debian> wsl --shutdown
PS F:\wsl\Debian> wsl --list
Windows Subsystem for Linux Distributions:
Debian (Default)
Ubuntu
docker-desktop-data
docker-desktop
PS F:\wsl\Debian>
PS F:\wsl\Debian>
PS F:\wsl\Debian> wsl --mount .\ext4.vhdx --vhd --bare
The operation completed successfully.
PS F:\wsl\Debian> wsl --system -u root e2fsck -f /dev/sdc
Failed to attach disk 'F:\wsl\Debian\ext4.vhdx' to WSL2: 另一个程序正在使用此文件,进程无法访问。
Error code: Wsl/Service/CreateInstance/MountVhd/0x80070020
PS F:\wsl\Debian> But i try it using PS F:\wsl\Debian> wsl -d Ubuntu -u root e2fsck -f /dev/sdc
e2fsck 1.46.5 (30-Dec-2021)
/dev/sdc: recovering journal
Pass 1: Checking inodes, blocks, and sizes
Inode 501800 extent tree (at level 1) could be shorter. Optimize<y>? yes
Inode 1056183 extent tree (at level 1) could be shorter. Optimize<y>? yes
Inode 1955138 extent tree (at level 1) could be shorter. Optimize<y>? yes
Inode 3313721 extent tree (at level 1) could be shorter. Optimize<y>? yes
Inode 3349709 extent tree (at level 1) could be shorter. Optimize<y>? yes
Pass 1E: Optimizing extent trees
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sdc: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sdc: 3516340/16777216 files (0.2% non-contiguous), 67104763/67108864 blocks |
Extremely appriciate this. |
This worked for me! thanks for posting this. I just would add that after e2fsck is completed successfully, unmount the vhd using |
Windows Version
Microsoft Windows [Version 10.0.19044.2965]
WSL Version
WSL version: 1.2.5.0 Kernel version: 5.15.90.1 WSLg version: 1.0.51 MSRDC version: 1.2.3770 Direct3D version: 1.608.2-61064218 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.19044.2965
Are you using WSL 1 or WSL 2?
Kernel Version
Linux version 5.15.90.1-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Fri Jan 27 02:56:13 UTC 2023
Distro Version
Debian
Other Software
non
Repro Steps
visit and try https://learn.microsoft.com/en-us/windows/wsl/disk-space#how-to-repair-a-vhd-mounting-error.
Expected Behavior
should repaired
Actual Behavior
PS F:\wsl\Debian> wsl --shutdown
PS F:\wsl\Debian> wsl.exe --mount .\ext4.vhdx --vhd --bare
The operation completed successfully.
PS F:\wsl\Debian> wsl.exe sudo e2fsck -f /dev/sdc
Failed to attach disk 'F:\wsl\Debian\ext4.vhdx' to WSL2: 另一个程序正在使用此文件,进程无法访问。
Error code: Wsl/Service/CreateInstance/MountVhd/0x80070020
PS F:\wsl\Debian>
Diagnostic Logs
Why ?
The text was updated successfully, but these errors were encountered: