JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Administration: ZFS File Systems     Oracle Solaris 11 Information Library
search filter icon
search icon

Document Information


1.  Oracle Solaris ZFS File System (Introduction)

2.  Getting Started With Oracle Solaris ZFS

3.  Oracle Solaris ZFS and Traditional File System Differences

4.  Managing Oracle Solaris ZFS Storage Pools

5.  Managing ZFS Root Pool Components

6.  Managing Oracle Solaris ZFS File Systems

7.  Working With Oracle Solaris ZFS Snapshots and Clones

8.  Using ACLs and Attributes to Protect Oracle Solaris ZFS Files

9.  Oracle Solaris ZFS Delegated Administration

10.  Oracle Solaris ZFS Advanced Topics

11.  Oracle Solaris ZFS Troubleshooting and Pool Recovery

12.  Archiving Snapshots and Root Pool Recovery

Overview of ZFS Recovery Process

ZFS Pool Recovery Requirements

Creating a ZFS Snapshot Archive for Recovery

How to Create a ZFS Snapshot Archive

Recreating Your Root Pool and Recovering Root Pool Snapshots

How to Recreate the Root Pool on the Recovery System

13.  Recommended Oracle Solaris ZFS Practices

A.  Oracle Solaris ZFS Version Descriptions


Recreating Your Root Pool and Recovering Root Pool Snapshots

If you need to recreate your root pool and recover you root pool snapshots, the general steps are as follows:

How to Recreate the Root Pool on the Recovery System

Review the following considerations when recovering your root pool.

  1. Identify and replace the failed root pool disk or system component.

    This disk is generally the default boot device or you can select another disk and then reset the default boot device.

  2. Boot the system from the Oracle Solaris 11 installation media by selecting one of the following.
    • DVD or USB install media (SPARC or x86) – Insert the media and select the appropriate device as the boot device.

      If text-based media is used, select the Shell option from the text installer menu.

    • Live media (x86 only) – The GNOME desktop session can be used during the recovery procedure.

    • Automated installer or a local copy of AI media (SPARC or x86) – From the text installer menu, select the shell option. On a SPARC system, boot the AI media (either locally or over the network), and select the Shell option:

      ok boot net:dhcp
      .Welcome to the Oracle Solaris 11 installation menu 
              1  Install Oracle Solaris
              2  Install Additional Drivers
              3  Shell
              4  Terminal type (currently xterm)
              5  Reboot
      Please enter a number [1]: 3
  3. Prepare the root pool disk.
    1. Confirm that the replacement root pool disk is visible from the format utility.
      # format
      Searching for disks...done
             0. c2t0d0 <FUJITSU-MAY2073RCSUN72G-0401 cyl 14087 alt 2 hd 24 sec 424>
             1. c2t1d0 <FUJITSU-MAY2073RCSUN72G-0401 cyl 14087 alt 2 hd 24 sec 424>
             2. c2t2d0 <SEAGATE-ST973402SSUN72G-0400-68.37GB>
             3. c2t3d0 <SEAGATE-ST973401LSUN72G-0556-68.37GB>
      Specify disk (enter its number): 0
    2. Confirm that the root pool disk has an SMI (VTOC) label and a slice 0 with the bulk of the disk space.

      Review the partition table to confirm that the root pool disk has an SMI label and a slice 0.

      selecting c2t0d0
      [disk formatted]
      format> partition
      partition> print
    3. Relabel the disk with an SMI (VTOC) label, if necessary.

      Use the following shortcut commands to relabel the disk. A caution is that these commands do not provide any error checking so make sure that you are relabeling the correct disk.

  4. Recreate the root pool.
    sysA# zpool create rpool c2t0d0s0
  5. Mount the file system that contains the snapshots from the remote system.
    sysA# mount -F nfs sysB:/tank/snaps /mnt
  6. Restore the root pool snapshots.
    sysA# gzcat /mnt/rpool.snap1.gz | zfs receive -Fv rpool
    receiving full stream of rpool@rpool.snap1 into rpool@rpool.snap1
    received 92.7KB stream in 1 seconds (92.7KB/sec)
    receiving full stream of rpool/export@rpool.snap1 into rpool/export@rpool.snap1
    received 47.9KB stream in 1 seconds (47.9KB/sec)
  7. Set the bootfs property.
    sysA# zpool set bootfs=rpool/ROOT/solaris rpool
  8. Recreate swap and dump devices, if necessary.

    For example:

    sysA# zfs create -V 4G rpool/swap
    sysA# zfs create -V 4G rpool/dump

    For information about sizing swap and dump volumes, see Planning for Swap Space in Oracle Solaris Administration: Devices and File Systems.

  9. Mount the BE.

    The next step requires that the BE is mounted so that the boot blocks can be installed.

    sysA# beadm mount solaris /tmp/mnt
  10. Install the boot blocks on the new disk.
    • SPARC:

      sysA# installboot /tmp/mnt/usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/c2t0d0s0
    • x86:

      sysA# installgrub /tmp/mnt/boot/grub/stage1 /tmp/mnt/boot/grub/stage2 /dev/rdsk/c2t0d0s0
  11. If the same devices will not be used or the devices will be configured in a different way on the original system, clear the existing device information. Then, direct the system to reconfigure the new device information.
    # devfsadm -Cn -r /tmp/mnt
    # touch /tmp/mnt/reconfigure
  12. Unmount the BE.
    #beadm unmount solaris
  13. Activate the boot environment, if necessary.

    For example:

    sysA# beadm list
    BE        Active Mountpoint Space  Policy Created          
    --        ------ ---------- -----  ------ -------          
    solaris-1 -      -          13.26M static 2011-09-28 15:23 
    solaris   -      -          3.87G  static 2011-09-29 08:20 
    # beadm activate solaris
  14. Verify that you can boot successfully from the replacement root pool disk.

    If necessary, reset the default boot device:

    • SPARC: Set up the system to boot automatically from the new disk, either by using the eeprom command or the setenv command from the boot PROM.

    • x86: Reconfigure the system BIOS.