OS-8198: Allow bootable-off-ZFS-pool ("standalone") SmartOS

Details

Issue Type:New Feature
Priority:4 - Normal
Status:Closed
Created at:2020-07-17T19:24:20.669Z
Updated at:2021-08-13T22:52:32.311Z

People

Created by:Dan McDonald
Reported by:Dan McDonald
Assigned to:Dan McDonald

Resolution

Fixed: A fix for this issue is checked into the tree and tested.
(Resolution Date: 2020-08-25T23:44:32.065Z)

Related Links

Description

This feature-request tracks Phase I of RFD 176 - "SmartOS and Triton boot from ZFS pool".  Quoting from RFD 176's Phase I section:

The first step is to allow standalone SmartOS installations (i.e. non-Triton
ones) to boot off of a ZFS pool. That pool can either be the `zones` pool,
or one or more dedicated boot pools.

The SmartOS USB/ISO installer must be able to create a bootable zones pool,
or detect a `standalone` pool created during manual-pool-configuration, and
install the Platform Image and Boot Image on to the pool's `boot`
filesystem.

Additionally a new command, `piadm`(1M), will administer bootable SmartOS
pools, including:

Comments

Comment by Dan McDonald
Created at 2020-07-17T19:25:13.821Z

The `standalone` branch of smartos-live contains the WIP for this bug.


Comment by Jira Bot
Created at 2020-07-21T18:45:53.221Z

rfd commit dbaf7386229fef8543f3b20ba047f45edcf806b0 (branch master, by Dan McDonald)

RFD 176: Rewhack to reflect OS-8198 and 3-phase approach. (#149)


Comment by Dan McDonald
Created at 2020-08-06T20:52:03.652Z

Testing notes:

1.) Fresh-installation of piadm-aware bits on bootable zones raidz pool.
1a.) piadm install `latest` from smartos repo.
1b.) piadm install /tmp/foo.iso
1c.) piadm install /tmp/foo.tgz (no boot image)
1d.) piadm install <buildstamp> from smartos repo.
1e.) piadm install URL (of ISO)
1f.) piadm install URL (of .tgz)
1g.) piadm list

2.) Fresh-installation of piadm-aware bits on bootable single-dedicated-disk standalone.  Also create -B for zones for further tests...
2a.) piadm install `latest` from smartos-repo
2b.) piadm install /tmp/foo.iso
2c.) piadm install /tmp/foo.tgz (no boot image)
2d.) piadm install <buildstamp> from smartos repo.
2e.) piadm install URL (of ISO)
2f.) piadm install URL (of .tgz)
2g.) piadm list

3.) Perform various tests on zones that isn't yet officially bootable:
3a.) piadm install latest zones (will fail)
3c.) piadm bootable -e -i <source> (will also fail)
3c.) piadm bootable -e -i <source> zones (will succeed)
3d.) Start doing removals and installations based with NO POOL SPECIFIED. (will fail)
3e.) Disable standalone, activate zones, boot zones.

4.) Construct standalone and alternate as bootable pools, keep zones unbootable.
4a.) (Repeat step 3 tests on zones, but now with two bootables. Commands not specifying a zone will fail with two bootable zones.)
4b.) 3 different PIs on 3 different pools.  Each pool can boot the system.
4c.) piadm bootable -d zones

Comment by Dan McDonald
Created at 2020-08-14T15:54:15.537Z

Revised testing notes:

```

1.) Fresh-installation of piadm-aware bits on bootable zones raidz pool.
1a.) piadm install `latest` from smartos repo.
1b.) piadm install /tmp/foo.iso
1c.) piadm install /tmp/foo.tgz (no boot image)
1d.) piadm install <buildstamp> from smartos repo.
1e.) piadm install URL (of ISO)
1f.) piadm install URL (of .tgz)
1g.) piadm list

2.) Fresh-installation of piadm-aware bits on bootable single-dedicated-disk
standalone. Also create -B for zones for further tests...
2a.) piadm install `latest` from smartos-repo
2b.) piadm install /tmp/foo.iso
2c.) piadm install /tmp/foo.tgz (no boot image)
2d.) piadm install <buildstamp> from smartos repo.
(NOTE: Noise because of umount. Fix that!)
2e.) piadm install URL (of ISO)
2f.) piadm install URL (of .tgz)
2g.) piadm list

3.) Perform various tests on zones that isn't yet officially bootable:
3a.) piadm install latest zones
3c.) piadm bootable -e -i <source>
3c.) piadm bootable -e -i <source> zones
3d.) Start doing removals and installations based with NO POOL.
3e.) Disable standalone, activate zones.

4.) Construct standalone and alternate as bootable pools, keep zones
unbootable.
4b.) 3 different PIs on 3 different pools. Each pool can boot the system.
4c.) piadm bootable -d zones (PASSED)

5.) Move "platform" symlink, and see if "corrupt" gets triggered:
5a.) By list
5b.) By install

6.) (thanks, sjorge) "piadm bootable -e -i <PI-only>.tgz pool"
(Should fail, but leave debris.)
6a.) Inspect debris with piadm list
6b.) `piadm remove` debris

7.) Install time pool testing (post-jlevon CR).
7a.) Hit RETURN (no bootable pool, can't even EFI-activate it)
7b.) Specify "zones" with auto-layout
7c.) Specify "standalone" with auto-layout, should complain loudly.
7d.) Create "zones" and "standalone" manually, should print choices and you
can/should specify one of them
7e.) Use "none" to reset a prior-chosen bootable pool.

```


Comment by Jira Bot
Created at 2020-08-25T23:31:42.835Z

smartos-live commit 2c792f83ac6e31db6ee00655a084320e56ca518b (branch master, by Dan McDonald)

OS-8198 Allow bootable-off-ZFS-pool ("standalone") SmartOS (#942)

Reviewed by: Jason King <jason.king@joyent.com>
Reviewed by: John Levon <john.levon@joyent.com>
Approved by: Brian Bennett <brian.bennett@joyent.com>


Comment by Jira Bot
Created at 2021-08-13T22:52:32.311Z

node-zfs commit 069bd514edac32721dd8346f70ef6e100cdc1c0f (branch master, by Brian Bennett)

TRITON-2242 zfs.js needs to be reconciled across smartos-live, node-zfs and node-zfs/linuxcn (#3)

  • TRITON-2242 zfs.js needs to be reconciled across smartos-live, node-zfs and node-zfs/linuxcn

This includes changes from smartos-live for the following:

  • OS-1751
  • OS-7698
  • OS-8198