Fwd: Disk space issue Chrome OS linux

582 views
Skip to first unread message

Elia Maldini

unread,
Nov 29, 2022, 2:49:41 AM11/29/22
to chromium-...@chromium.org
Hi Team,
I'm not sure if this is the right group where I can ask....

My corporate laptop is a chromebook and I'm used to use the development environment (linux environment) to do some light dev activities.

I started with 15GB of disk size allocated to that environment and I'm pretty sure I'm not using all that space but last week I ran out of space.

In order to try to save some disk space I did a clean-up mainly working on the apt cache but unfortunately I was able to solve the disk space issue only increasing the total space allocated to 20 GB.

Today checking ho the disk is used I'm still confused and I don't know how the disk space is used.

This is the output of two different commands:
 
image.png

Is there anyone who can help me or suggest someone to contact? 

Elia Maldini

eliam...@google.com

Cloud Consultant, Professional Services Organization

Milan, Italy




Mike Frysinger

unread,
Nov 29, 2022, 3:00:16 AM11/29/22
to eliam...@google.com, chromium-...@chromium.org
this group is fine for such questions

can you post an example command & error you're seeing ?

also, if 20G isn't enough, just increase it and forget ?  chrome://os-settings/crostini/details -> Disk size -> change
-mike

--
--
Chromium OS Discussion mailing list: chromium-...@chromium.org
View archives, change email options, or unsubscribe:
https://groups.google.com/a/chromium.org/group/chromium-os-discuss

Tim Hawkins

unread,
Nov 29, 2022, 3:09:39 AM11/29/22
to vap...@chromium.org, eliam...@google.com, chromium-...@chromium.org
/dev/vdb is showing 4GB free, with an original size of 20GB, thats your disk space, when you allocate space to linux it is "preallocated" and uses up the space in chromeos immeadiatly, the linux file system then exists within that new preallocated space. 

---
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-dis...@chromium.org.

Elia Maldini

unread,
Nov 29, 2022, 3:29:21 AM11/29/22
to Tim Hawkins, vap...@chromium.org, chromium-...@chromium.org
The point is that I'm sure I'm not using all that space....this is a more recent view

image.png

image.png

According to that on /dev/vdb I'm using 18G but again I'm not using such space, infact running ncdu I get a result that is more compatible with the real situation (10G)

image.png

I'm using crostini to run Visual Studio Code and develop Terraform code.

Mike Frysinger

unread,
Nov 29, 2022, 4:04:46 AM11/29/22
to Elia Maldini, Tim Hawkins, chromium-...@chromium.org
are you running ncdu as root ?

keep in mind that filesystems have overhead which du doesn't account for (but df does),
du only finds named files (so you can create a file, unlink it, but not release it, e.g. temporary files),
and you're running in a container that is inside of the filesystem, so there will be content not visible from inside the container.

8GB is still a big diff.  you could reboot the VM (or just CrOS) to at least get a clean slate with temporary files.
-mike

Elia Maldini

unread,
Nov 29, 2022, 4:38:40 AM11/29/22
to Mike Frysinger, Tim Hawkins, chromium-...@chromium.org
I've just rebooted the container and I ran ncdu as root but I got the same result 10GB....

This is exactly the same situation I faced when I ran out the space, I was not able to understand where the space is used, so the only solution was to increase the disk size....

Is there anything else I can try to do? Is there any disk shrink or clean tool I can use?

Mike Frysinger

unread,
Nov 29, 2022, 4:59:15 AM11/29/22
to Elia Maldini, Tim Hawkins, chromium-...@chromium.org
more importantly, does `df -h /` still report 18G usage ?

i checked on my side and `df -h /` and `sudo ncdu -x /` used stats are much closer (23G vs 21.7G).

i don't believe it's possible to inspect the state of the entire filesystem outside of the container.  `vsh termina` from crosh is non-root, and /mnt/stateful inside the VM has root owned/readable dirs.

we use btrfs, so i wonder if there's some internal housekeeping going on there.  again, don't know if it's possible to even check since the /dev/vdb is accessible to root (outside the container), and i don't think we gather those kind of stats from feedback reports.  maybe someone else might know if we glean such stats anywhere for you to view.
-mike

Tim Hawkins

unread,
Nov 29, 2022, 6:00:35 AM11/29/22
to Mike Frysinger, Elia Maldini, chromium-...@chromium.org
-T flag on df will show the filesystem type too. 

--sync shoukd sync the filesystem cached stats with the ondisk ones. 

So:

df -Th --sync 

may help 

Peter Marheine

unread,
Nov 29, 2022, 11:43:03 PM11/29/22
to tim.th...@gmail.com, Mike Frysinger, Elia Maldini, chromium-...@chromium.org
You might have more free space than it looks like due to how btrfs allocate blocks; you can get a view of what the filesystem thinks with `btrfs filesystem df /` (you may need to install the btrfs-progs package), which looks like this on my device:
image.png

If you have a very large number of small files (probably less than 2 kilobytes) then the metadata usage might be very large in particular, since the default DUP profile stores two copies of all metadata, and small files can have their data inlined into the metadata which would further increase the storage use.

dragon788

unread,
Nov 30, 2022, 12:24:26 AM11/30/22
to pmar...@chromium.org, tim.th...@gmail.com, Mike Frysinger, Elia Maldini, chromium-...@chromium.org
Not related specifically to ChromeOS Linux aka Crostini, but I recently encountered a bug with free space detection in the ArcVM++ on at least the Dell Latitude 5300/5400 Chromebooks with Play Store enabled whether they were enterprise enrolled or just "managed by" a Google Workspace organization (and possibly even if they weren't associated with a Workspace account). I couldn't update any apps because it claimed I was out of space, but I'm only using ~1TB of a 2TB NVME and it was reporting 3TB out of 4TB used, which still isn't "no free space".

Screenshot 2022-11-22 2.43.26 PM.png

Elia Maldini

unread,
Nov 30, 2022, 7:47:57 AM11/30/22
to dragon788, pmar...@chromium.org, tim.th...@gmail.com, Mike Frysinger, chromium-...@chromium.org
Hi Team,
I did the tests you suggested running the commands you provided, here below the output:

image.png

image.png

With the btrs command I get 15 GB as used space while I see 18G used through the standard df command. I'm quite confused....

Elia Maldini

unread,
Dec 29, 2022, 3:36:32 AM12/29/22
to dragon788, pmar...@chromium.org, tim.th...@gmail.com, Mike Frysinger, chromium-...@chromium.org
Hi Team,
I'm facing again the same issue, this morning I got again the disk space warning

image.png

But checking the disk usage it is hard to understand how it is used:
image.png
image.png

If you compare these results with the ones of the previous email you notice that the disk usage has increased by 2 GiB (more or less) on the mountpoint  /dev/vdb (/dev/kvm). Do you know that path what is used for?
Reply all
Reply to author
Forward
0 new messages