Hi,
That’s a check of btrfs filesystem.
see the commit of btrfs-progs:
http://git.kernel.org/cgit/linux/kernel/git/kdave/btrfs-progs.git/commit/...
btrfs-progs: Add minimum device size check
Btrfs has global block reservation, so even mkfs.btrfs can execute
without problem, there is still a possibility that the filesystem can't
be mounted.
For example when mkfs.btrfs on a 8M file on x86_64 platform, kernel will
refuse to mount due to ENOSPC, since system block group takes 4M and
mixed block group takes 4M, and global block reservation will takes all
the 4M from mixed block group, which makes btrfs unable to create uuid
tree.
This patch will add minimum device size check before actually mkfs.
The minimum size calculation uses a simplified one:
minimum_size_for_each_dev = 2 * (system block group + global block rsv)
and global block rsv = leafsize << 10
From: libguestfs-bounces(a)redhat.com [mailto:libguestfs-bounces@redhat.com] On Behalf Of fu
lirong
Sent: Tuesday, May 19, 2015 10:01 AM
To: libguestfs(a)redhat.com
Subject: [Libguestfs] libguestfs error: mkfs_btrfs
Hi all :
there is a problem on libguestfs-1.29.40 after command :make check
libguestfs: error: mkfs_btrfs: /dev/vda1: device /dev/vda1 is too small (must be at least
256 MB)
FAIL: test_btrfs_image_0
3/515 test_btrfstune_enable_skinny_metadata_extent_refs_0
libguestfs: error: btrfstune_enable_skinny_metadata_extent_refs: /dev/vda1: btrfstune:
invalid option -- 'x'
usage: btrfstune [options] device
-S value enable/disable seeding
FAIL: test_btrfstune_enable_skinny_metadata_extent_refs_0
4/515 test_btrfstune_enable_extended_inode_refs_0
libguestfs: error: btrfstune_enable_extended_inode_refs: /dev/vda1: btrfstune: invalid
option -- 'r'
usage: btrfstune [options] device
-S value enable/disable seeding
FAIL: test_btrfstune_enable_extended_inode_refs_0
5/515 test_btrfstune_seeding_0
libguestfs: error: btrfstune_seeding: /dev/vda1: btrfstune: invalid option --
'f'
I found two patch
https://www.redhat.com/archives/libguestfs/2012-May/msg00018.htmlvirt-mak... Fix
estimation when making btrfs (but there is no virt-make-fs under tools)
https://www.redhat.com/archives/libguestfs/2012-April/msg00008.html New API: mkfs-btrfs
for creating btrfs filesystems ( It was patched in libguestfs-1.29.40)
It seems stupid, but I can't find the answer, I am sorry