GSoC Project Involving the reimplementation of beadm(1)

Trond Endrestøl Trond.Endrestol at fagskolen.gjovik.no
Tue Feb 21 14:16:29 UTC 2017


On Tue, 21 Feb 2017 23:11+0900, Tomoya Tabuchi wrote:

> On Mon, Feb 20, 2017 at 12:52:03PM -0800, Jordan Hubbard wrote:
> > 
> > > On Feb 20, 2017, at 5:15 AM, Tomoya Tabuchi <t at tomoyat1.com <mailto:t at tomoyat1.com>> wrote:
> > > 
> > > I would like to ask a few questions involving this.
> > > First, is there a particular reason why this project is listed in the
> > > ideas list? Aside the fact the current implementation in sh is rather
> > > complicated, I was unable to come up with a reason to justify the
> > > reimplementation.
> > 
> > The current implementation of beadm is very slow and fragile - it writes to all previous boot environments when configuration changes are made which require the regeneration of config data, something which becomes slower as an O(n) property of the number of boot environments, and it does a poor job of handling any number of failure cases which can occur during this process.  It provides also no “seat belts” for the pathological cases where the ZFS boot pool fills up or even approaches the 90% “storage cliff” where ZFS begins to exhibit pathological performance characteristics.

> I did not know about such problems. As for the part regarding the 
> regeneration of config data. I'll look into the current 
> implementation and see if I could come up with a better way to do 
> things.

Could beadm use ZFS user properties to distinguish between BE created 
by beadm, and those created manually or by other tools?

> As for the zpool approaching the "storage cliff", or filling up, it seems straightforward that a doing a usage check before each BE creation, and aborting if limits are exceeded, should suffice. I figure it will be worth searching the existing implementation for any other edge cases in need of "seat belts".
> > 
> >  It also provides no API other than the beadm(1) command itself, which makes it harder to control from 3rd party tools like FreeNAS (which uses beadm extensively).
> In order to provide an API to beadm, splitting the final product into
>  1. an underlying library that does the heavy lifting
>  2. an user-facing beadm(1) command that will make use of the library
> could be a solution. IIRC this is sort of like what is done in libzfs and the
> zfs commands.
> > 
> 
> > It’s on our (iXsystems) own long-term list of things to rewrite from scratch, but we haven’t managed to find the time or resources.  If someone else wanted to do so, we’d be enthusiastic co-conspirators!
> Thank you! I'll do some more research, write a project proposal, and post it on this list when the time comes. I would appreciate it very much if I could then have feedback from you.

-- 
+-------------------------------+------------------------------------+
| Vennlig hilsen,               | Best regards,                      |
| Trond Endrestøl,              | Trond Endrestøl,                   |
| IT-ansvarlig,                 | System administrator,              |
| Fagskolen Innlandet,          | Gjøvik Technical College, Norway,  |
| tlf. mob.   952 62 567,       | Cellular...: +47 952 62 567,       |
| sentralbord 61 14 54 00.      | Switchboard: +47 61 14 54 00.      |
+-------------------------------+------------------------------------+


More information about the freebsd-hackers mailing list