[OpenIndiana-discuss] Split-root installations

Jim Klimov jimklimov at cos.ru
Tue Dec 3 18:13:26 UTC 2013


On 2013-12-02 02:06, Jim Klimov wrote:
> I've pursued the idea of a separate SMF service which would take
> care of local ZFS-based split-root systems instead of hacking into
> existing scripts (network or filesystem). All the logic that I've
> earlier added into fs-root and fs-minimal has now moved into the
> new script and service fs-root-zfs. This service declares as its
> dependants the networking services as well as filesystem/root, to
> ensure that it runs before consumers of /usr and other filesystems
> that make up a root hierarchy. In fact, it mounts all of the ZFS
> filesystems which are children of the current bootfs or of the
> $rpool/SHARED dataset, and /var/run in particular, fulfilling
> much of filesystem/minimal in one early blow. This should be
> appreciated by NWAM in particular :)

Additional "ideological" question: this script currently hard-codes
the "$rpool/SHARED" dataset (in the $rpool which contains the current
bootfs) as the container for additional filesystems to mount into
the root hierarchy (like /var/adm and such, if they are stored as
shared).

I guess it might be a more proper solution not to hardcode dataset
names like this (I am not sure what the precedent with $rpool/ROOT
is - whether it is a hardcoded name or a popular default?), but
perhaps to tag the particular shared datasets (individually or via
inheritance) with some ZFS attribute. Again, there are precedents
like "org.opensolaris.libbe:uuid" in the bootfs datasets, or the
"com.sun:auto-snapshot" values. In this case, the question is what
would be the proper name for such attribute? Should it be a flag
value (is set/is not set), or should some specific value be tested;
for example, "org.opensolaris.libbe:shared=(on|off)" ?

Beside that, did anyone review the script or at least the general
idea by now? Would it be an acceptable solution to implement the
local-zfs split-root support?

> It does check for filesystems listed in /etc/vfstab and provided
> by non-ZFS technologies - this script should skip mounting those
> mountpoints and any under them. Also, it only runs for a ZFS root.
>
> The large changes I proposed before to the older scripts are no
> longer needed for the local-ZFS split-root setups; though smaller
> changes (provided in new patches) are still added - to skip
> zfs-mounting in case that the filesystem in question has already
> been mounted.
>
> My local tests were quite successful, so I posted the update at
> the Wiki:
>
> http://wiki.openindiana.org/oi/Advanced+-+Split-root+installation
>
> http://wiki.openindiana.org/download/attachments/27230229/fs-root-zfs
> http://wiki.openindiana.org/download/attachments/27230229/fs-root-zfs.xml
>
> Slight but important fixes to the older fs-root and fs-minimal
> scripts (as well as the whole of the new fs-root-zfs script) can
> be reviewed in this patch:
>
> http://wiki.openindiana.org/download/attachments/27230229/fs-root-zfs.patch



More information about the OpenIndiana-discuss mailing list