Go to main content

Managing Devices in Oracle® Solaris 11.4

Exit Print View

Updated: November 2020
 
 

How to Replace a ZFS Root Pool Disk

The root pool disk is installed automatically when the system is installed. Use this procedure if you need to replace a root pool disk or attach a new disk as a mirrored root pool disk.

Before You Begin

Before you perform this procedure, ensure that you have completed the following tasks:

  1. Become an administrator.
  2. Replace the root pool on the new disk.
    # zpool replace root-pool disk
  3. Replace the failed disk or attach a new disk.
    • To replace a failed disk with a new disk:
      1. If the new disk is not online, bring it online.
        # zpool online root-pool disk
      2. Verify that the new disk is resilvered.
        # zpool status root-pool
      3. (Optional) Install Oracle Solaris and then boot the system.
      4. Apply the boot blocks after the new disk is resilvered.
        # bootadm install-bootloader

        For more information about booting Oracle Solaris systems, see Booting and Shutting Down Oracle Solaris 11.4 Systems.

      5. Verify that the boot blocks are installed by rebooting the system to run level 3.
        # init 6
    • To attach a new disk to create a mirrored root pool or attach a larger disk to replace a smaller disk:
      1. Attach the new disk to the ZFS pool.
        # zpool attach root-pool disk new-disk

        The following example attaches the new disk c2t1d0s0 to the current rpool on c2t0d0s0.

        # zpool attach rpool c2t0d0s0 c2t1d0s0

        The zpool attach command also automatically applies the boot blocks.

      2. Verify that you can boot from the new disk.
      3. If you are replacing an old disk with a new disk, detach the old disk after the system boots from the new disk.
        # zpool detach root-pool old-disk

        For example, if you are replacing c2t0d0s0 with c2t1d0s0, you would type the following command:

        # zpool detach rpool c2t0d0s0
  4. Set up the system to boot automatically from the new disk.
    • SPARC: Either use the eeprom command or the setenv command from the SPARC boot PROM.
    • x86: Reconfigure the system's BIOS.