On 12/06/2015 02:07 AM, Avi Deitcher wrote:
Each time SmartOS boots, it needs to figure out if there is a global zone installed on one of the disks/partitions, find that global zone, and load it.
This is imprecise. It needs to find its "zones" ZFS pool. Unless explicitly instructed otherwise SmartOS imports all ZFS pools it can find. It does this via the mechanism implemented by "zpool import". The "zones" pool is the one that it created during "installation" which includes the filesystems that store configuration.

If no global zone is found, it needs to run the setup script. If a global zone is found, it needs to load the config from that zone and not run the setup script... unless the user wants to run the script. And what if there are multiple global zones on different partitions?
Just to harp on it a bit more, a "global zone" isn't a filesystem or a pool, it's just the context in which software runs that hasn't been started in a (non-global) zone. ZFS pools and the filesystems within them are a different issue, and like Ian said, don't have multiple pools with the same name in a SmartOS machine; it will cause headaches. If it can't find the "zones" pool it will run the setup script unless you've booted in a way that indicated that you don't want to (see the menu.lst file shipped on the ISO)

Are these all kernel-load options that set up as part of grub? Is it a logical flow? How do I control it?
There are some things you can add to the kernel command line to limit which zpools get imported, but it's by name, so again, don't have multiple pools with the same name.

Where can I find a clear step by step description of the boot process from live media, so I can understand how it works and where I can customize? E.g.
In the code? I'm not sure if there's a single place with the whole boot process documented outside the codebase.

The process is pretty simple for the most part: https://github.com/joyent/smartos-live/blob/master/overlay/generic/lib/svc/method/fs-joyent#L79-L180

If provided a list of zpools to import, import those with "zpool import <poolname>", otherwise, run "zpool import" and then import all found pools (again with "zpool import <poolname>". All intelligence on scanning the disks for pools is delegated to the ZFS tools.

Once it's done that, it mounts up the filesystems that store critical configuration and finishes booting.

If you have a specific question about your use case, perhaps you might want to ask that as well...

-Nahum


-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com

Reply via email to