Managing ZFS File Systems in Oracle® Solaris 11.2

Exit Print View

Updated: December 2014
 
 

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

If you do not configure a mirrored root pool during an automatic installation, you can easily configure a mirrored root pool after the installation.

For information about replacing a disk in a root pool, see How to Replace a Disk in a ZFS Root Pool (SPARC or x86/VTOC).

  1. Display your current root pool status.
    # zpool status rpool
    pool: rpool
    state: ONLINE
    scrub: none requested
    config:
    
    NAME        STATE     READ WRITE CKSUM
    rpool       ONLINE       0     0     0
    c2t0d0s0    ONLINE       0     0     0
    
    errors: No known data errors
  2. Prepare a second disk for attachment to the root pool, if necessary.
  3. Attach a second disk to configure a mirrored root pool.
    # zpool attach rpool c2t0d0s0 c2t1d0s0
    Make sure to wait until resilver is done before rebooting.

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

  4. View the root pool status to confirm that resilvering is complete.
    # zpool status rpool
    # zpool status rpool
    pool: rpool
    state: DEGRADED
    status: One or more devices is currently being resilvered.  The pool will
    continue to function in a degraded state.
    action: Wait for the resilver to complete.
    Run 'zpool status -v' to see device specific details.
    scan: resilver in progress since Fri Jul 20 13:39:53 2012
    938M scanned
    938M resilvered at 46.9M/s, 7.86% done, 0h3m to go
    config:
    
    NAME      STATE      READ  WRITE  CKSUM
    rpool     DEGRADED      0      0      0
    mirror-0  DEGRADED      0      0      0
    c2t0d0s0  ONLINE        0      0      0
    c2t1d0s0  DEGRADED      0      0      0  (resilvering)

    In the above output, the resilvering process is not complete. Resilvering is complete when you see messages similar to the following:

    resilvered 11.6G in 0h5m with 0 errors on Fri Jul 20 13:57:25 2012
  5. If you attaching a larger disk, set the pool's autoexpand property to expand the pool's size.

    Determine the existing rpool pool size:

    # zpool list rpool
    NAME   SIZE  ALLOC   FREE  CAP  DEDUP  HEALTH  ALTROOT
    rpool  29.8G   152K  29.7G   0%  1.00x  ONLINE  -
    # zpool set autoexpand=on rpool

    Review the expanded rpool pool size:

    # zpool list rpool
    NAME   SIZE  ALLOC  FREE  CAP  DEDUP  HEALTH  ALTROOT
    rpool  279G   146K  279G   0%  1.00x  ONLINE  -
  6. Verify that you can boot successfully from the new disk.