Managing ZFS File Systems in Oracle® Solaris 11.2

Exit Print View

Updated: December 2014
 
 

Booting From an Alternate Disk in a Mirrored ZFS Root Pool

Review the following considerations when booting from a mirrored ZFS root pool disk:

  • 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 (SPARC or x86/VTOC).

  • Keep your root pool disks online and attached so that you can boot from any of them, if necessary.

  • You cannot boot directly from a disk that has been detached from the system by using the zpool detach command. You also cannot boot from an active root pool disk that is currently offline. However, on an x86 based system with a modern BIOS and the boot order is set correctly and the root pool is mirrored, the system will boot from the second disk automatically even if the primary boot disk is offline or detached.

  • SPARC: The primary disk in a mirrored root pool is usually the default boot device. You can boot from a different device in a mirrored ZFS root pool, but you will need to boot from the disk specifically. If you want to continue to boot from the remaining root pool device or you want to boot automatically from the remaining root pool disk, you need to update the PROM to specify that default boot device.

    For example, you can boot from either disk (c1t0d0s0 or c1t1d0s0) in this pool.

    # zpool status
    pool: rpool
    state: ONLINE
    scrub: none requested
    config:
    
    NAME      STATE     READ WRITE CKSUM
    rpool     ONLINE       0     0     0
    mirror-0  ONLINE       0     0     0
    c1t0d0s0  ONLINE       0     0     0
    c1t1d0s0  ONLINE       0     0     0

    Enter the alternate disk at the ok prompt.

    ok boot /pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/disk@1

    After the system is rebooted, confirm the active boot device. For example:

    SPARC# prtconf -vp | grep bootpath
    bootpath:  '/pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/disk@1,0:a'
  • x86: On an x86 based system with a modern BIOS and the boot disk order is set properly, the system will boot automatically from the second device if the primary root pool disk is detached, offline, or otherwise unavailable.

    Confirm the active boot device. For example:

    x86# prtconf -v|sed -n '/bootpath/,/value/p'
    name='bootpath' type=string items=1
    value='/pci@0,0/pci8086,25f8@4/pci108e,286@0/disk@0,0:a'
  • SPARC or x86: If you replace a root pool disk by using the zpool replace command, you must install the boot information on the newly replaced disk by using the bootadm command. If you create a mirrored ZFS root pool with the initial installation method or if you use the zpool attach command to attach a disk to the root pool, then this step is unnecessary. The bootadm syntax is as follows:

    # bootadm install-bootloader

    If you want to install the boot loader on an alternate root pool, then use the –P (pool) option.

    # bootadm install-bootloader -P rpool2

    If you want to install the GRUB legacy boot loader, then use the legacy installgrub command.

    x86# installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c0t1d0s0