Skip to content
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

Incorrect wsl disk space #5335

Closed
Mystic8b opened this issue Jun 4, 2020 · 14 comments
Closed

Incorrect wsl disk space #5335

Mystic8b opened this issue Jun 4, 2020 · 14 comments
Labels

Comments

@Mystic8b
Copy link

Mystic8b commented Jun 4, 2020

# Environment
Platform ServicePack Version      VersionString
-------- ----------- -------      -------------
 Win32NT             10.0.19041.0 Microsoft Windows NT 10.0.19041.0
❯ lsb_release -r
Release:        20.04
❯ cat /proc/version
Linux version 4.19.84-microsoft-standard (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Wed Nov 13 11:44:37 UTC 2019

Steps to reproduce

df -h -> enter

Expected behavior

Free space on wsl corresponds to reality

Actual behavior

Free / occupied space does not correspond to reality
image

@benhillis
Copy link
Member

/dev/sdb is not your C drive, it's a VHD that contains your root filesystem.

@Mystic8b
Copy link
Author

Mystic8b commented Jun 4, 2020

Yes, but there should be as much space on it as there is on the current drive, isn’t it?

@therealkenc
Copy link
Collaborator

therealkenc commented Jun 4, 2020

No, because it isn't your drive. There is 250GiB on "it" (by default). Where the "it" here isn't a real drive. It is a virtual block device. The size of the virtual device is 250GiB whether the backing storage for the device lives on a 128 gigabyte ssd or a 128 terrabyte raid array. The size isn't real because the device isn't real.

@Mystic8b
Copy link
Author

Mystic8b commented Jun 4, 2020

Where is 250mb here? There 251GB
I understand that this is a virtual device, but it must have a certain size occupied on the disk, as on the disks of virtual machines in a workstation, etc.

@benhillis
Copy link
Member

@Mystic8b - I don't see MB anywhere in the screenshot you posted, I might be looking at it wrong but I see.

/dev/sdb size=251G used=2.8G
C:\ size=209G Used=98G

@Mystic8b
Copy link
Author

Mystic8b commented Jun 4, 2020

/dev/sdb size=251G used=2.8G
C:\ size=209G Used=98G

Exactly. Where does 251gb come from?
About megabytes, I never said a word

@therealkenc
Copy link
Collaborator

Type-o obv. 250 GiB (shows as 251GiB). That number is arbitrary ref #4373.

@Mystic8b
Copy link
Author

Mystic8b commented Jun 4, 2020

Okay, therealkenc edited his post, first he wrote 250mib
So you want to say that a 250GB virtual disk with a real free space of 111GB is normal?

@therealkenc
Copy link
Collaborator

therealkenc commented Jun 4, 2020

Very normal. You can have a dozen 250 GiB virtual disks (total of 3TiB of space that doesn't really exist) one 128 GiB SSD. [Which is why this is tag by-design already.]

@benhillis
Copy link
Member

@therealkenc is right, the disk is dynamic and that is the maximum size.

@Mystic8b
Copy link
Author

Mystic8b commented Jun 4, 2020

image
benhillis, kapish?

@therealkenc
Copy link
Collaborator

Thought of a clearer way to put this. Your ext4 filesystem is ~250GiB. It doesn't resize every time you consume a few more bytes in Windows.

@Mystic8b
Copy link
Author

Mystic8b commented Jun 4, 2020

damn, okay, it seems there is an opportunity to reduce the size of this disk, even so.
ty

@microsoft microsoft deleted a comment from Mystic8b Jun 4, 2020
@microsoft microsoft locked as too heated and limited conversation to collaborators Jun 4, 2020
@benhillis
Copy link
Member

This isn't constructive.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants