FS#25591 - No minimum partition size check for btrfs

Attached to Project: Release Engineering
Opened by Martin Schmidt (Blind) - Monday, 15 August 2011, 21:47 GMT
Last edited by Gerardo Exequiel Pozzi (djgera) - Monday, 26 November 2012, 04:51 GMT
Task Type Bug Report
Category AIF
Status Closed
Assigned To Tom Gundersen (tomegun)
Architecture All
Severity Medium
Priority Normal
Reported Version 2010.05
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

In case you want to create a separate /boot partition that is smaller than 256MB, the formatting with btrfs fails. This is not captured in the process, and subsequently, mounting of the (presumably now formatted) partitions fails (completely).

When trying to figure out what the heck happened (partitioning and formatting again a few times :)), the AIF got thoroughly confused at some point.

I only found out what the actual problem was after trying to format everything outside of AIF on the console.
This task depends upon

Closed by  Gerardo Exequiel Pozzi (djgera)
Monday, 26 November 2012, 04:51 GMT
Reason for closing:  Deferred
Comment by Dieter Plaetinck (Dieter_be) - Monday, 15 August 2011, 22:08 GMT
so you made /boot btrfs?
can you let me know what the minimum size should be then for btrfs?
Comment by Martin Schmidt (Blind) - Tuesday, 16 August 2011, 15:52 GMT
Well, mkfs.btrfs complains about the partition being smaller than 256MB (see text above).

Googling a bit:
https://btrfs.wiki.kernel.org/index.php/Getting_started
(check out the "Create the Boot Partition" sub-section). That section appears to give the smallest partition size for a btrfs filesystem.
Personally, I switched to ext2 after that for the /boot partition.

Anyways, there seems to be some weirdness with error checking in that part of AIF, as at some point the whole AIF mounting code completely got out of whack, trying to mount already mounted things (although giving messages that mounting failed), etc. The only recovery was to quit the script.
Comment by Martin Schmidt (Blind) - Wednesday, 17 August 2011, 03:52 GMT
I am sorry, I have missed to put into the report that I am talking about the dev release, in particular 08.13 (with the functional AIF script).
Comment by Dieter Plaetinck (Dieter_be) - Monday, 26 December 2011, 17:16 GMT
aif checks error codes of all mkfs* and similar commands. if something failed and it didn't notice, it means something exited(0) incorrectly.
esp. since the btrfs tools are so early in development, i would expect such things.
if you can tell me exactly how to reproduce this, i could have a better look though.


is the minimum size still the case? the link is dead and some quick googling and looking around in the docs reveals they recommend 260MB for /boot, but they don't explain why or mention any hard limit.
Comment by Martin Schmidt (Blind) - Thursday, 29 December 2011, 00:23 GMT
Hi,

it's been a while since I have last installed; I think I just followed what the procedure was to setup your own partitions, and chose btrfs as well as a partition smaller than 256MB. The webpage I mentioned above moved to:
https://btrfs.wiki.kernel.org/articles/g/e/t/Getting_started.html [check out the "Create the Boot Partition" sub-section]
(probably what you found from google)

This is the output trying to format a 100MB partition:

# mkfs.btrfs /dev/sdb1

WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using

device /dev/sdb1 is too small (must be at least 256 MB)



Comment by Tom Gundersen (tomegun) - Saturday, 10 March 2012, 11:09 GMT
This is an btrfs issue. Close it or reassign to me.
Comment by Tom Gundersen (tomegun) - Saturday, 10 March 2012, 11:45 GMT
@Blind: what is the exit code when you get the warning (echo $?) ?

If non-zero, this is the way it should be. If it is zero we have a problem. Please confirm with latest btrfs and latest util-linux (testing).
Comment by Martin Schmidt (Blind) - Thursday, 22 March 2012, 15:56 GMT
@Tom: Unfortunately, I am currently not running testing. I understand understand your point: btrfs and its tools have changed a lot recently.
I cannot promise when I get to testing it, though. Hopefully soon.

Loading...