* Minimum size of Btrfs volume ?
@ 2020-08-23 13:26 Bill Dietrich
2020-08-23 15:08 ` A L
2020-08-24 2:10 ` Chris Murphy
0 siblings, 2 replies; 4+ messages in thread
From: Bill Dietrich @ 2020-08-23 13:26 UTC (permalink / raw)
To: linux-btrfs
[-- Attachment #1.1.1: Type: text/plain, Size: 562 bytes --]
[Noob here, sorry if I'm doing anything wrong.]
What is the minimum size of a simple single-disk Btrfs volume,
and where is it documented ? I can't find that info.
I'm told the minimum size is about 109 MB (114294784 bytes).
True ? Is there any way to get around that, at mkfs-time ?
I'd like to use Btrfs inside a VeraCrypt container, and that's
a fairly big minimum size for that use.
I'm using Btrfs on Ubuntu GNOME 20.04 desktop.
Thanks,
Bill Dietrich
bill@billdietrich.me
-- Email domain proudly hosted at https://migadu.com
[-- Attachment #1.1.2: OpenPGP_0xF790D4D71624804B.asc --]
[-- Type: application/pgp-keys, Size: 2465 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 704 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Minimum size of Btrfs volume ?
2020-08-23 13:26 Minimum size of Btrfs volume ? Bill Dietrich
@ 2020-08-23 15:08 ` A L
2020-08-23 15:13 ` A L
2020-08-24 2:10 ` Chris Murphy
1 sibling, 1 reply; 4+ messages in thread
From: A L @ 2020-08-23 15:08 UTC (permalink / raw)
To: Bill Dietrich, linux-btrfs
---- From: Bill Dietrich <bill@billdietrich.me> -- Sent: 2020-08-23 - 15:26 ----
> [Noob here, sorry if I'm doing anything wrong.]
>
> What is the minimum size of a simple single-disk Btrfs volume,
> and where is it documented ? I can't find that info.
>
> I'm told the minimum size is about 109 MB (114294784 bytes).
> True ? Is there any way to get around that, at mkfs-time ?
> I'd like to use Btrfs inside a VeraCrypt container, and that's
> a fairly big minimum size for that use.
>
> I'm using Btrfs on Ubuntu GNOME 20.04 desktop.
>
> Thanks,
>
> Bill Dietrich
> bill@billdietrich.me
>
>
>
> -- Email domain proudly hosted at https://migadu.com
I'm not sure what minium limit is, but you can try using mkfs.btrfs --mixed. This worked with a 50MiB fs on btrfs-progs 5.7:
# btrfs fi us /mnt/loop
Overall:
Device size: 50.00MiB
Device allocated: 9.00MiB
Device unallocated: 41.00MiB
Device missing: 0.00B
Used: 32.00KiB
Free (estimated): 45.16MiB (min: 45.16MiB)
Data ratio: 1.00
Metadata ratio: 1.00
Global reserve: 832.00KiB (used: 0.00B)
Multiple profiles: no
Data+Metadata,single: Size:5.00MiB, Used:28.00KiB (0.55%)
/dev/loop0 5.00MiB
System,single: Size:4.00MiB, Used:4.00KiB (0.10%)
/dev/loop0 4.00MiB
Unallocated:
/dev/loop0 41.00MiB
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Minimum size of Btrfs volume ?
2020-08-23 15:08 ` A L
@ 2020-08-23 15:13 ` A L
0 siblings, 0 replies; 4+ messages in thread
From: A L @ 2020-08-23 15:13 UTC (permalink / raw)
To: Bill Dietrich, linux-btrfs
On 2020-08-23 17:08, A L wrote:
>
> ---- From: Bill Dietrich <bill@billdietrich.me> -- Sent: 2020-08-23 - 15:26 ----
>
>> [Noob here, sorry if I'm doing anything wrong.]
>>
>> What is the minimum size of a simple single-disk Btrfs volume,
>> and where is it documented ? I can't find that info.
>>
>> I'm told the minimum size is about 109 MB (114294784 bytes).
>> True ? Is there any way to get around that, at mkfs-time ?
>> I'd like to use Btrfs inside a VeraCrypt container, and that's
>> a fairly big minimum size for that use.
>>
>> I'm using Btrfs on Ubuntu GNOME 20.04 desktop.
>>
>> Thanks,
>>
>> Bill Dietrich
>> bill@billdietrich.me
>>
>>
>>
>> -- Email domain proudly hosted at https://migadu.com
> I'm not sure what minium limit is, but you can try using mkfs.btrfs --mixed. This worked with a 50MiB fs on btrfs-progs 5.7:
>
> # btrfs fi us /mnt/loop
> Overall:
> Device size: 50.00MiB
> Device allocated: 9.00MiB
> Device unallocated: 41.00MiB
> Device missing: 0.00B
> Used: 32.00KiB
> Free (estimated): 45.16MiB (min: 45.16MiB)
> Data ratio: 1.00
> Metadata ratio: 1.00
> Global reserve: 832.00KiB (used: 0.00B)
> Multiple profiles: no
>
> Data+Metadata,single: Size:5.00MiB, Used:28.00KiB (0.55%)
> /dev/loop0 5.00MiB
>
> System,single: Size:4.00MiB, Used:4.00KiB (0.10%)
> /dev/loop0 4.00MiB
>
> Unallocated:
> /dev/loop0 41.00MiB
>
I was curious, so I went lower. Seems the limit is 16MiB using --mixed:
# fallocate -l 10MiB loop.img
# mkfs.btrfs -M loop.img
btrfs-progs v5.7
See http://btrfs.wiki.kernel.org for more information.
ERROR: 'loop.img' is too small to make a usable filesystem
ERROR: minimum size for each btrfs device is 16777216
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Minimum size of Btrfs volume ?
2020-08-23 13:26 Minimum size of Btrfs volume ? Bill Dietrich
2020-08-23 15:08 ` A L
@ 2020-08-24 2:10 ` Chris Murphy
1 sibling, 0 replies; 4+ messages in thread
From: Chris Murphy @ 2020-08-24 2:10 UTC (permalink / raw)
To: Bill Dietrich; +Cc: Btrfs BTRFS
On Sun, Aug 23, 2020 at 7:26 AM Bill Dietrich <bill@billdietrich.me> wrote:
>
> [Noob here, sorry if I'm doing anything wrong.]
>
> What is the minimum size of a simple single-disk Btrfs volume,
> and where is it documented ? I can't find that info.
>
> I'm told the minimum size is about 109 MB (114294784 bytes).
> True ? Is there any way to get around that, at mkfs-time ?
> I'd like to use Btrfs inside a VeraCrypt container, and that's
> a fairly big minimum size for that use.
>
If this is backed by a loop mounted file on a file system supporting
sparse files:
1. make the backing file a bit bigger than you need, e.g. truncate -s
1g filename
2. cryptsetup open --allow-discards so that trim commands passthrough
dm-crypt to the backing file
3. fstrim /mountpoint - this "shrinks" the backing file by making it a
sparse file, file system size is unchanged
4. If the backing file needs to go on a file system that doesn't
support sparse files, use 'tar --sparse'
--
Chris Murphy
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-08-24 2:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-23 13:26 Minimum size of Btrfs volume ? Bill Dietrich
2020-08-23 15:08 ` A L
2020-08-23 15:13 ` A L
2020-08-24 2:10 ` Chris Murphy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox