You can use the lucreate command to copy an existing ZFS root pool into another ZFS root pool. The copy process might take some time depending on your system.
Figure 11–3 shows the zpool command that creates a ZFS root pool, rpool2, on c0t1d0s5 because a bootable ZFS root pool does not yet exist. The lucreate command with the -n option assigns the name to the boot environment to be created, new-zfsBE. The -p option specifies where to place the new boot environment.
This example shows the same commands as in Figure 11–3 that create a new root pool and then a new boot environment in the newly created root pool. In this example, the zpool create command creates rpool2. The zfs list command shows that no ZFS datasets are created in rpool2. The datasets are created with the lucreate command.
# zpool create rpool2 c0t2d0s5 # zfs list NAME USED AVAIL REFER MOUNTPOINT rpool2 9.29G 57.6G 20K /rpool2 rpool 9.29G 57.6G 20K /.new.lulib.rs.109262 rpool/ROOT 5.46G 57.6G 18K legacy rpool/ROOT/zfsBE 5.46G 57.6G 551M rpool/dump 3.99G - 3.99G - rpool/swap 3.99G - 3.99G - |
The new ZFS root pool, rpool2, is created on disk slice c0t2d0s5.
# lucreate -n new-zfsBE -p rpool2 # zfs list NAME USED AVAIL REFER MOUNTPOINT rpool2 9.29G 57.6G 20K /rpool2 rpool2/ROOT/ 5.38G 57.6G 18K /rpool2/ROOT rpool2/ROOT/new-zfsBE 5.38G 57.6G 551M /tmp/.new.luupdall.109859 rpool2/dump 3.99G - 3.99G - rpool2/swap 3.99G - 3.99G - rpool 9.29G 57.6G 20K /.new.lulib.rs.109262 rpool/ROOT 5.46G 57.6G 18K legacy rpool/ROOT/zfsBE 5.46G 57.6G 551M rpool/dump 3.99G - 3.99G - rpool/swap 3.99G - 3.99G - |
The new boot environment, new-zfsBE, is created on rpool2 along with the other datasets, ROOT, dump and swap. The boot environment, new-zfsBE, is ready to be upgraded and activated.