Score:2

WSL2 export is huge - 118 GB!

bg flag

I wanted to do a back up of my Ubuntu-20.04 WSL image or whatever is called and the tar file that resulted is 118 GB.

The login screen shows a Usage of 22% of 250 GB., so that would be 55GB. But still that's not 118 GB.

Does the wsl --export command archive the whole partition?

What could be the reason?

NotTheDr01ds avatar
vn flag
When you say "login screen", what are you referring to in this case? Something in the message-of-the-day? Thanks!
Kreative Zombie avatar
bg flag
@NotTheDr01ds i am referring to this https://imgur.com/mCa2Nb5
NotTheDr01ds avatar
vn flag
Thanks! Yes, that's the MOTD (message-of-the-day). I don't have one myself, since I'm on another shell (Fish). Let me see what's generating that particular size calculation and why it might be so drastically different than the `--export` size. Can you do a `sudo du -hsx` (human-readable, summary, one-file-system) and see what that reports?
NotTheDr01ds avatar
vn flag
Hmm. Okay, it's `landscape-sysinfo`. Can you run this manually and see what it returns as well?
Kreative Zombie avatar
bg flag
@NotTheDr01ds thank you for your replies. "sudo do -hsx" returns "30G" . "landscape-sysinfo" returns the same results as the image i posted yesterday 22.5 % of 250.92 GB
NotTheDr01ds avatar
vn flag
Ok, so I was suspecting a possible "cached" result from `landscape-sysinfo`, but that's not the case. On 22.04, I've seen issues with it, but I couldn't reproduce those in 20.04, and neither can you, apparently. So that's not it. But now we have *three* different sizes, oddly. 30GB from `du`, 55GB from `landscape-sysinfo`, and 118GB from `wsl --export`. Hmmm.
Kreative Zombie avatar
bg flag
@NotTheDr01ds my main goal is to start a development environment on WSL. Because i'm a noob, i keep trying all kind of tutorials and approaches. I keep installing conda environments and then when i start vcode, that also installs all libraries on top of that. And although i am still unable to run a jupyter notebook on WSL2 , i think i managed to make a 1TB traffic this month just with this task. WSL2 is basically broken with systemd, because all the files that i need are there, i can see them, the network can't. So i guess there's a lot of data that WSL just can't see.
NotTheDr01ds avatar
vn flag
I think we can work through most of those issues, but yes, a lot of tutorials need "tweaks" for WSL. You mention Systemd - Are you running Windows 11 with one of the new WSL releases that supports it? That *may* have an impact on this 118GB image (but I'm not sure yet).
NotTheDr01ds avatar
vn flag
Curious if `tar tvf <export_file>.tar | sort -nk3 | tail -50` shows anything that might be blowing up the size.
Kreative Zombie avatar
bg flag
Hello @NotTheDr01ds Sorry i reply so late. I just gave up and removed that distro and made a new one. Basically it was Anaconda bloating up. I'm going with Miniconda this time and paying more attention when installing envs. Anyway, thank you for your time and answers.
NotTheDr01ds avatar
vn flag
No worries - Glad you got it "resolved". And yes, I tend to stay away from Anaconda unless absolutely necessary. It does seem a bit "bloated".
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.