Closed jerodway closed 1 year ago
@jerodway, do you have any special user configuration within your Ubuntu? the Estimated size is provided by wsl, so it might be a configuration colliding with it. Do you have other distros installed and running at the same time? It shouldn't be a issue, but I need more data to know what is going on in your system.
Please try these two commands from PowerShell:
wsl --system -d Ubuntu -e df /mnt/wslg/distro
wsl -d Ubuntu -e df /
And this one from within a WSL shell session inside Ubuntu:
\df /
They should return the same text, but for some reason, in your case, it is behaving differently. It would be nice if you copy-n-paste the output of these three tests into a reply here.
Well, initially I could not get the first command to work at all. After a bit of playing around with it, I sorted out that problem and then wslcompact seemed to just start working. Sorry for bothering you
@Aldo-f , we can continue the conversation here from the duplicated issue #8. It seems you have the same problem @jerodway had. I ask you to do the same test. We need to know what is going on.
@jerodway, maybe you could help with the solution you found in your system.
Thanks.
@Aldo-f , these are the lines compatible with your distro's name. Do you have any special user configuration within your Ubuntu? the Estimated size is provided by wsl, so it might be a configuration colliding with it. Do you have other distros installed and running at the same time? It shouldn't be a issue, but I need more data to know what is going on in your system.
Please try these two commands from PowerShell:
wsl --system -d Ubuntu-18.04 -e df /mnt/wslg/distro
wsl -d Ubuntu-18.04 -e df /
And this one from within a WSL shell session inside Ubuntu-18.04:
\df /
They should return the same text, but for some reason, in your case, it is behaving differently. It would be nice if you copy-n-paste the output of these three tests into a reply here. Please.
Not aware of any special configuration. Installed Lando with Hyperspace (so that installs docker, lando, ...)
Seems GUI support is disabled on host, don't know if that's a requirement.
I could however use wslcompact
to reduce my ext4.vhdx from 15GB to 13GB. (many thanks ;) )
(had to use $env:TEMP="D:\tmp"
'cause I'm out of space on C: )
> wslcompact
WslCompact v8.0 2023.02.13
(C) 2023 Oscar Lopez
wslcompact -h for help. For more information visit: https://github.com/okibcn/wslcompact
Distro's name: Ubuntu-18.04
Image file: C:\Users\aldo\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc\LocalState\ext4.vhdx
Current size: 13479 MB
InvalidOperation: C:\Users\aldo\scoop\apps\wslcompact\current\wslcompact.ps1:79
Line |
79 | … $estimated = ((wsl --system -d "$wsl_distro" -e df /mnt/w …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot index into a null array.
Estimated size: 0 +/- 0 MB
The estimated process time using an SSD is about 0 minutes.
> wsl --system -d Ubuntu-18.04 -e df /mnt/wslg/distro
GUI application support is disabled via C:\Users\aldo\.wslconfig or /etc/wsl.conf.
Error code: Wsl/Service/CreateInstance/WSL_E_GUI_APPLICATIONS_DISABLED
> wsl -d Ubuntu-18.04 -e df /
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdc 1055762868 13180200 988879196 2% /
Inside WSL
> \df /
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdc 1055762868 13180200 988879196 2% /
Thanks!
Finally We know what is going on. With this info I am sure I will be able to solve the issue of size detection.
Has anyone encountered this error:
PS C:\Users\rodwjam> wslcompact WslCompact v7.0 2023.02.08 (C) 2023 Oscar Lopez wslcompact -h for help. For more information visit: https://github.com/okibcn/wslcompact
Distro's name: Ubuntu Image file: C:\Users\canso\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\ext4.vhdx Current size: 28691 MB Cannot index into a null array. At C:\Users\canso\scoop\apps\wslcompact\current\wslcompact.ps1:79 char:17