Oracle Solaris ZFS Administration Guide

ProcedureHow to Create Root Pool Snapshots

You can create root pool snapshots for recovery purposes. The best way to create root pool snapshots is to perform a recursive snapshot of the root pool.

The following procedure creates a recursive root pool snapshot and stores the snapshot as a file in a pool on a remote system. If a root pool fails, the remote dataset can be mounted by using NFS and the snapshot file can be received into the recreated pool. You can instead store root pool snapshots as the actual snapshots in a pool on a remote system. Sending and receiving the snapshots from a remote system is a bit more complicated because you must configure ssh or use rsh while the system to be repaired is booted from the Solaris OS miniroot.

For information about remotely storing and recovering root pool snapshots, for the most up-to-date information about root pool recovery, go to this site:

Validating remotely stored snapshots as files or snapshots is an important step in root pool recovery. With either method, snapshots should be recreated on a routine basis, such as when the pool configuration changes or when the Solaris OS is upgraded.

In the following procedure, the system is booted from the zfsBE boot environment.

  1. Create a pool and file system on a remote system to store the snapshots.

    For example:

    remote# zfs create rpool/snaps
  2. Share the file system with the local system.

    For example:

    remote# zfs set sharenfs='rw=local-system,root=local-system' rpool/snaps
    # share
    -@rpool/snaps   /rpool/snaps   sec=sys,rw=local-system,root=local-system   "" 
  3. Create a recursive snapshot of the root pool.

    local# zfs snapshot -r rpool@0804
    local# zfs list
    NAME                        USED  AVAIL  REFER  MOUNTPOINT
    rpool                      6.17G  60.8G    98K  /rpool
    rpool@0804                     0      -    98K  -
    rpool/ROOT                 4.67G  60.8G    21K  /rpool/ROOT
    rpool/ROOT@0804                0      -    21K  -
    rpool/ROOT/zfsBE           4.67G  60.8G  4.67G  /
    rpool/ROOT/zfsBE@0804       386K      -  4.67G  -
    rpool/dump                 1.00G  60.8G  1.00G  -
    rpool/dump@0804                0      -  1.00G  -
    rpool/swap                  517M  61.3G    16K  -
    rpool/swap@0804                0      -    16K  -
  4. Send the root pool snapshots to the remote system.

    For example:

    local# zfs send -Rv rpool@0804 > /net/remote-system/rpool/snaps/rpool.0804
    sending from @ to rpool@0804
    sending from @ to rpool/swap@0804
    sending from @ to rpool/ROOT@0804
    sending from @ to rpool/ROOT/zfsBE@0804
    sending from @ to rpool/dump@0804