Go to main content

Managing ZFS File Systems in Oracle® Solaris 11.3

Exit Print View

Updated: May 2019

How to Configure a Mirrored Root Pool (SPARC or x86/EFI (GPT))

This procedure describes how to convert the default root pool installation into a redundant configuration. This procedure applies to most x86 systems and SPARC systems with GPT-aware firmware whose disks have the EFI (GPT) label.

  1. (Optional) Display the current root pool status.
    # zpool status root-pool
  2. Attach a second disk to configure a mirrored root pool.
    # zpool attach root-pool current-disk new-disk

    The correct disk labeling and the boot blocks are applied automatically.

  3. View the root pool status to confirm that resilvering is complete.

    If resilvering has been completed, the output includes a message similar to the following:

    scan: resilvered 11.6G in 0h5m with 0 errors on Fri Jul 20 13:57:25 2014
  4. If the new disk is larger than the current disk, enable the ZFS autoexpand property.
    # zpool set autoexpand=on root-pool

    The following example shows the difference in the rpool's disk space after the autoexpand property is enabled.

    # zpool list rpool
    rpool  29.8G   152K  29.7G   0%  1.00x  ONLINE  -
    # zpool set autoexpand=on rpool
    # zpool list rpool
    rpool  279G   146K  279G   0%  1.00x  ONLINE  -
  5. Verify that you can boot successfully from the new disk.

    Note -  Unexpected behavior might occur if the ZFS configuration consists of a root file system that is built on mirrored iSCSI targets and the second LUN is not available on the same iSCSI target or session as the boot disk. When the system is booted, the boot process would report that opening the second iSCSI LUN failed and the root pool is in a degraded state. However, this status is temporary. The issue automatically resolves after the ZFS performs a quick resilvering. The second LUN then goes online and the state of the root pool goes online as well.