From: Henning Schild <henning.schild@siemens.com>
To: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
Cc: isar-users@googlegroups.com, felix.moessbauer@siemens.com,
Joe MacDonald <Joe_MacDonald@mentor.com>
Subject: Re: [PATCH v4 1/5] expand-on-first-boot: support resizing a btrfs
Date: Tue, 13 Dec 2022 22:22:00 +0100 [thread overview]
Message-ID: <20221213222200.199bc0e6@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <CAJGKYO4FeaSZQYWtONtDDu4KDzQj+My67zEMy7H24zZKapbe6A@mail.gmail.com>
Am Tue, 13 Dec 2022 18:01:49 +0100
schrieb "Roberto A. Foglietta" <roberto.foglietta@gmail.com>:
> On Tue, 13 Dec 2022 at 11:15, <henning.schild@siemens.com> wrote:
> >
> > From: Henning Schild <henning.schild@siemens.com>
> >
> > This adds support for resizing btrfs filesystems if they are in that
> > last partition. It also prepares for potentially other filesystems
> > to come in the future by introducing a switch-case.
> >
> > The mounting logic is taken from the systemd-growfs patches we had
> > to revert again. Some filesystems need to online for resizing, but
> > in order to find the filesystem of a partition (without udev)
> > mounting it and letting the kernel detect seems a good idea.
> >
>
> It is possible to avoid the udevadm settle constraints only because
> the boot device [1] is the same as the rootfs device. The boot device
> should be mapped by the kernel at boot time, so it would be available
> but not necessarily present in /dev partition if this has no static
> links or devfs mounted at the time of mount. If udevd is the demon
> that we choose to populate the /dev then it would be better to wait
> until it settles down. The stats about boot time on different
> platforms will show that only hardware slow to detect has a larger
> boot time.
>
> [1] in some embedded devices the boot device is an internal and small
> device dedicated to the boot while the rootfs is on a separate
> plug-able device.
>
> I have no clue how this would matter in the case of ISAR.
The whole thing is about only one device and its last partition, not
more! And we clearly expect boot and root to reside on the same
mass-storage. Or any other last partition (my series was also manually
tested against another /data partition to be grown).
Thanks for approving that we do not need to "udevadm settle" in that
case!
For any more advanced scenario people can always run whatever they
want, possibly systemd-repart. Isar is all about a single image for one
mass storage device, it can be used for more but such code will have to
live in layers.
With btrfs we could have one filesystem with multiple
devices/partitions and the code i (and you and Joe) proposed here will
likely not work. Let us keep things simple in the core while allowing
layers to do whatever they please.
expand-on-first-boot is for the "normal rpi case" where a stand-alone
image gets flashed to one device of which we only know the final size
when we boot it up. Not just rpi ... it could also be your qemuamd64
image flashed to an ssd/hdd in any PC.
ciao,
Henning
> Best regards, R-
>
next prev parent reply other threads:[~2022-12-13 21:22 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-13 10:15 [PATCH v4 0/5] expand-on-first-boot btrfs and CI testing henning.schild
2022-12-13 10:15 ` [PATCH v4 1/5] expand-on-first-boot: support resizing a btrfs henning.schild
2022-12-13 16:45 ` Roberto A. Foglietta
2022-12-13 17:18 ` Henning Schild
2022-12-13 20:44 ` Roberto A. Foglietta
2022-12-13 21:05 ` Henning Schild
2022-12-13 21:20 ` Roberto A. Foglietta
2022-12-14 3:33 ` Moessbauer, Felix
2022-12-14 6:50 ` Roberto A. Foglietta
2022-12-14 7:10 ` Roberto A. Foglietta
2022-12-13 17:01 ` Roberto A. Foglietta
2022-12-13 21:22 ` Henning Schild [this message]
2022-12-13 22:15 ` Roberto A. Foglietta
2022-12-13 10:15 ` [PATCH v4 2/5] meta-isar: introduce an example to use btrfs henning.schild
2022-12-13 10:15 ` [PATCH v4 3/5] CI: improve cibuilder readability henning.schild
2022-12-13 10:15 ` [PATCH v4 4/5] meta-isar: install expand-on-first-boot in most images and add space henning.schild
2022-12-13 10:15 ` [PATCH v4 5/5] CI: expect a message about filesystem resize vom expand script henning.schild
2022-12-13 10:25 ` [PATCH v4 0/5] expand-on-first-boot btrfs and CI testing Henning Schild
2022-12-20 9:37 ` Uladzimir Bely
2022-12-20 15:08 ` Henning Schild
2022-12-21 10:25 ` Uladzimir Bely
2022-12-21 12:13 ` Henning Schild
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221213222200.199bc0e6@md1za8fc.ad001.siemens.net \
--to=henning.schild@siemens.com \
--cc=Joe_MacDonald@mentor.com \
--cc=felix.moessbauer@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=roberto.foglietta@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox