JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris ZFS Administration Guide     Oracle Solaris 11 Express 11/10
search filter icon
search icon

Document Information

Preface

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

Managing ZFS Root Pool Components (Overview)

Oracle Solaris 11 Express Installation Requirements for ZFS Support

Oracle Solaris 11 Express Release Requirements

General ZFS Storage Pool Requirements

ZFS Storage Pool Space Requirements

ZFS Storage Pool Configuration Requirements

Managing Your ZFS Root Pool

Installing a ZFS Root Pool

How to Update Your ZFS Boot Environment

How to Configure a Mirrored Root Pool

Managing Your ZFS Swap and Dump Devices

Adjusting the Sizes of Your ZFS Swap and Dump Devices

Troubleshooting ZFS Dump Device Issues

Booting From a ZFS Root File System

Booting From an Alternate Disk in a Mirrored ZFS Root Pool

Booting From a ZFS Root File System on a SPARC Based System

Booting From a ZFS Root File System on an x86 Based System

Booting For Recovery Purposes in a ZFS Root Environment

How to Boot ZFS for Recovery Purposes

Recovering the ZFS Root Pool or Root Pool Snapshots

How to Replace a Disk in the ZFS Root Pool

How to Create Root Pool Snapshots

How to Recreate a ZFS Root Pool and Restore Root Pool Snapshots

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

A.  Oracle Solaris ZFS Version Descriptions

Index

Booting From a ZFS Root File System

Both SPARC based and x86 based systems boot with a boot archive, which is a file system image that contains the files required for booting. When booting from a ZFS root file system, the path names of both the boot archive and the kernel file are resolved in the root file system that is selected for booting.

Booting from a ZFS file system differs from booting from a UFS file system because with ZFS, a device specifier identifies a storage pool, not a single root file system. A storage pool can contain multiple bootable ZFS root file systems. When booting from ZFS, you must specify a boot device and a root file system within the pool that was identified by the boot device.

By default, the dataset selected for booting is the one identified by the pool's bootfs property. This default selection can be overridden by specifying an alternate bootable dataset that is included in the boot -Z command on a SPARC system or by selecting an alternate boot device from the BIOS on an x86 based system.

Booting From an Alternate Disk in a Mirrored ZFS Root Pool

You can attach a disk to create a mirrored ZFS root pool after installation. For more information about creating a mirrored root pool, see How to Configure a Mirrored Root Pool.

Review the following known issues regarding mirrored ZFS root pools:

Booting From a ZFS Root File System on a SPARC Based System

On a SPARC based system with multiple ZFS BEs, you can boot from any BE by using the beadm activate command.

During an installation and beadm activation process, the ZFS root file system is automatically designated with the bootfs property.

Multiple bootable datasets can exist within a pool. By default, the bootable dataset entry in the /pool-name/boot/menu.lst file is identified by the pool's bootfs property. However, a menu.lst entry can contain a bootfs command, which specifies an alternate dataset in the pool. In this way, the menu.lst file can contain entries for multiple root file systems within the pool.

When a system is installed with a ZFS root file system, an entry similar to the following is added to the menu.lst file:

title solaris
bootfs rpool/ROOT/solaris
title solaris-1
bootfs rpool/ROOT/solaris-1

When a new BE is created, the menu.lst file is updated automatically.

On a SPARC based system, two boot options are available:

Example 5-1 Booting From a Specific ZFS Boot Environment

If you have multiple ZFS BEs in a ZFS storage pool on your system's boot device, you can use the beadm activate command to specify a default BE.

For example, the following ZFS BEs are available as described by the beadm output:

# beadm list
BE        Active Mountpoint Space  Policy Created          
--        ------ ---------- -----  ------ -------          
solaris   -      -          19.18M static 2011-01-13 15:31 
solaris-1 NR     /          8.48G  static 2011-01-13 15:44

If you have multiple ZFS BEs on your SPARC based system, you can use the boot -L command. For example:

ok boot -L                                 
Boot device: /pci@0/pci@0/pci@2/scsi@0/disk@3,0:a  File and args: -L
1 solaris
2 solaris-1
Select environment to boot: [ 1 - 2 ]: 2

To boot the selected entry, invoke:
boot [<root-device>] -Z rpool/ROOT/solaris-1

Program terminated
ok boot -Z rpool/ROOT/solaris-1

Booting From a ZFS Root File System on an x86 Based System

The following entries are added to the /pool-name/boot/grub/menu.lst file during the installation process or beadm activate operation to boot ZFS automatically:

title Oracle Solaris 11 Express snv_152
findroot (pool_rpool,0,a)
bootfs rpool/ROOT/solaris
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS
module$ /platform/i86pc/$ISADIR/boot_archive

If the device identified by GRUB as the boot device contains a ZFS storage pool, the menu.lst file is used to create the GRUB menu.

On an x86 based system with multiple ZFS BEs, you can select a BE from the GRUB menu. If the root file system corresponding to this menu entry is a ZFS dataset, the following option is added.

-B $ZFS-BOOTFS

Example 5-2 x86: Booting a ZFS File System

When booting from a ZFS file system, the root device is specified by the boot -B $ZFS-BOOTFS parameter. For example:

title Oracle Solaris 11 Express snv_152
findroot (pool_rpool,0,a)
bootfs rpool/ROOT/solaris
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS
module$ /platform/i86pc/$ISADIR/boot_archive

Example 5-3 x86: Fast Rebooting a ZFS Root File System

The fast reboot feature provides the ability to reboot within seconds on x86 based systems. With the fast reboot feature, you can reboot to a new kernel without experiencing the long delays that can be imposed by the BIOS and boot loader. The ability to fast reboot a system drastically reduces down time and improves efficiency.

You must still use the init 6 command when transitioning between BEs with the beadm activate command. For other system operations where the reboot command is appropriate, you can use the reboot -f command. For example:

# reboot -f

Booting For Recovery Purposes in a ZFS Root Environment

Use the following procedure if you need to boot the system so that you can recover from a lost root password or similar problem.

If you need to recover a root pool or root pool snapshot, see Recovering the ZFS Root Pool or Root Pool Snapshots.

How to Boot ZFS for Recovery Purposes

Keep multiple boot environments to prevent a system boot failure. Follow these steps if your system won't boot because of a problem with the BE contents.

  1. Boot from the Oracle Solaris 11 Express Live CD or from an Oracle Solaris 11 Express AI server.
  2. At the terminal prompt, import the root pool.
    # zpool import rpool
  3. Mount the ZFS BE on /a
    # beadm mount solaris-1 /a
  4. Modify the BE contents to resolve the boot failure.

    For example, review the menu.lst file to determine if the boot entries are correct.

    # cat /a/rpool/boot/menu.lst
    title solaris
    bootfs rpool/ROOT/solaris
    title solaris-1
    bootfs rpool/ROOT/solaris-1

    If a password or shadow entry is preventing a console login, then correct that problem.

    # cd /a/etc
    # vi passwd
  5. If necessary, set the TERM type.
    # TERM=vt100
    # export TERM
  6. Update the boot archive
    # bootadm update-archive -R /a
  7. Reboot the system.
    # init 6