We've made some significant changes and improvements for this release of SNAP (Boot Environment management). I've outlined some of these changes and given some short descriptions.
- Creating a new BE will copy any grub menu customizations made to the original BE's grub entry
- Activating a BE now checks the grub version of the BE being activated and if it's newer than the current version it will run installgrub so that the new BE can boot properly. This fix was back published so that the workaround requiring running update_grub, to update from 2008.05, is no longer needed.
- Support for non-legacy mounted ZFS root. With the addition of ZFS boot we no longer have to set the mountpoint property to "legacy". Also the root dataset of the BE is now mounted readwire in the kernel on bootup.
- Better BE name validation - matches the naming conventions for naming a ZFS dataset with the exception that spaces are not allowed.
- Better error messages throughout beadm and the library.
- BE's now have a uuid which is set as a user property of the BE's root dataset. This is also used to help the zones code know which BE the zone dataset belongs to.
- beadm is now in it's own package (SUNWbeadm) to make it easier to back publish important fixes to earlier releases.
Numerous fixes to both beadm and libbe...
for example things like:
- beadm list now shows correct mountpoint of a mounted BE not just what is in the ZFS mountpont property.
- Improved/more readable beadm list output.
- Fixed beadm list output that was showing unbelievably large amounts of space used. (larger than the total size of the pool.)
etc...
Zones support...
We have added support for ipkg branded zones in this release of SNAP. This allows up to copy a zone, based on that zone in the originating BE, into a new BE when it's created and when a BE is destroyed so is the zone but only those parts of that zone which belonged to that BE. When an inactivate BE is mounted the zones belonging to that BE are also mounted giving us access to that zone for doing updates, etc. Basically all of the beadm functionality supports a BE that contains zones.
In the current structure of a global zone BE (This is the global Boot Environment) the root dataset looks something like
"rpool/ROOT/BE-1" and in keeping with that type of namespace the ipkg branded zones make use of a similar namespace.
For example zone1 would have a root dataset similar to the following:
rpool/zones/zone1/ROOT/zbe mounted at /zones/zone1/root for zone1 when BE-1 is activate and booted.
When a new global zone BE is created the zones that belong to it are also copied into the new BE.
For example if we have BE-1 which contains zone1 and we create BE-2 zone1 will be copied into BE-2. This is done by cloning the dataset for zone1.
For example zone1 in BE-2 would have a root dataset similar to the following:
rpool/zones/zone1/ROOT/zbe-1 mounted at /zones/zone1/root for zone1 when BE-2 is activate and booted.
The dataset for the zone uses information stored in user properties of the dataset to determine which BE the zone belongs to. If there are multiple zone root datasets for a zone that all belong to the same global zone BE a dataset property is used to determine which of these is the active or bootable dataset for that zone. Also because the BE identifier (uuid) is stored as part of the dataset it doesn't change across a rename therefore even when the BE has been renamed the zone will still know which zone root dataset belongs to which BE as well as the BE knowing which zone datasets belong to it.
This ability to have a zone with multiple root datasets for a global BE makes possible zone boot environments. In the near future the BE management tools (beadm/libbe) will be made to work inside a zone as well so that zone BE's can be managed within the zone.
Note: Currently only ipkg branded zones are supported and only on ZFS. Also as implied above beadm and the libraries under it are not supported within the zone itself.
Next on the list of upcoming items is the Sparc support work...
- The only area where SPARC and x86 differ (as far as SNAP) is in the boot menu handling. In x86 we have the grub menu to contend with but on SPARC for ZFS boot there is a simpler boot menu file. These are very similar but are in different locations. The entries in these files are also slightly different as is the boot process that uses these files. The changes to SNAP to support SPARC were simply making changes to the way we dealt with the different boot menu files. This work is done but is not part of the 2008.11 release.