Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • Is 7GB the total size of the files, or the size of the filesystem (e.g. because this is an image of a disk containing multiple partitions)? Commented Jun 20, 2015 at 22:58
  • The filesystem initially occupied the entire image file (by virtue of mkfs.btrfs /dev/loop using up all available space). Then I called btrfs fi resize -3G /vol/btrfs. Commented Jun 22, 2015 at 0:35
  • ... so I don't know for sure the exact (byte) size of the filesystem inside the image. But I need to find it out, so that I can truncate the image file appropriately. A mechanism that applies to any other filesystem inside an image file would be a plus. Commented Jun 22, 2015 at 0:46