Today's halfbaked idea comes courtesy of Isilon's latest "Ship-It Day" — when engineering is required to do something silly for a day.

The motivation is, it would be nice to be able to use nextboot(8) from ddb(4).

The general design is this:

  1. GEOM gets a new queryable attribute (GEOM::ddbwriter), much like GEOM::kerneldump, that signifies we would like to write to this partition during ddb.
  2. GEOM exposes the dumper information to kernel callers via a new ioctl, DIOCGDDBWRITER.
  3. There is a general kernel interface to configure a system nextboot-writer, much like 'dumpdev' and set_dumpdev.
  4. There is an ioctl to configure a file as the nextboot.conf file (FIONEXTBOOT).
  5. UFS groks FIONEXTBOOT. It uses DIOCGDDBWRITER on the underlying volume to determine the media dump parameters, then narrows them to describe just the first data block of the ioctl target vnode. Then it configures the general nextboot writer interface via (3).
  6. There is an rc script. It runs at boot and makes sure nextboot.conf exists, and pads it out to 512 bytes of spaces. It uses a C helper to ioctl FIONEXTBOOT the file.

Github link

Open problems:

  1. Handling unlink and reclaim on the nextboot.conf vnode. (rename too?)

  2. Handling ffs_write or truncate and block reallocation on the nextboot.conf vnode.


ConradMeyer/DDBNextBoot (last edited 2016-09-25T21:25:30+0000 by ConradMeyer)