[3.X] Unreliable rootfs size measurement

Bug #2060050 reported by Paul Mars
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Image
Confirmed
Medium
Paul Mars

Bug Description

Before populating the partitions during a classic image build, ubuntu-image calculates the rootfs size by calling `du -s -B1`. On ZFS, this might return a compressed size, and thus not the real size of the directory once written to another FS (in our case for example ext4).

To fix this, I see several solutions:

- recursively walk the rootfs directory with filepath.Walk and sum everything
- use the `--apparent-size` flag of du

Paul Mars (upils)
Changed in ubuntu-image:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Paul Mars (upils)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.