0 Replies Latest reply: Dec 11, 2012 11:11 AM by Cindys-Oracle RSS

    Replacing a root pool disk example

    Cindys-Oracle
      Replacing a root pool disk has several use cases:

      1. Replace a small disk with a larger disk
      2. Replace a failed disk with a replacement disk
      3. Outright move a rpool to a different disk because you want to

      The easiest way is to attach the replacement disk to an existing root pool disk.
      I like this approach better than an outright replacement with zpool replace because
      you can ensure the new disk is bootable while both disks are still attached.

      On an x86 system running S11.1, its even easier (if you reinstall not upgrade) because your
      rpool disk contains an EFI label and you don't have to mess with any labeling.

      On a SPARC system running S11.1 or a SPARC or x86 system running S11, you'll still need to
      apply an SMI (VTOC) label and s0, if necessary.

      See the example below.

      Thanks, Cindy

      1. Create a new BE just to identify that all rpool data is available on the replacement
      disk:

      # beadm list
      BE Active Mountpoint Space Policy Created
      -- ------ ---------- ----- ------ -------
      s11u1_24b NR / 4.02G static 2012-12-05 10:24
      # beadm create s11u1_backup
      # beadm list
      BE Active Mountpoint Space Policy Created
      -- ------ ---------- ----- ------ -------
      s11u1_24b NR / 4.02G static 2012-12-05 10:24
      s11u1_backup - - 172.0K static 2012-12-11 08:46

      2. Identify the existing root pool disk. You can see that this disk has an EFI label because
      the device identifier is d0, not s0.

      # zpool status rpool
      pool: rpool
      state: ONLINE
      scan: none requested
      config:

      NAME STATE READ WRITE CKSUM
      rpool ONLINE 0 0 0
      c0t5000CCA012C8323Cd0 ONLINE 0 0 0

      3. Attach the replacement disk.

      # zpool attach rpool c0t5000CCA012C8323Cd0 c0t5000C500438124F3d0
      Make sure to wait until resilver is done before rebooting.

      You will see a message from FMA that the pool device is DEGRADED. This
      is because the pool data is being resilvered onto the new disk.

      4. Check the resilvering progress:

      # zpool status
      pool: rpool
      state: DEGRADED
      status: One or more devices is currently being resilvered. The pool will
      continue to function in a degraded state.
      action: Wait for the resilver to complete.
      Run 'zpool status -v' to see device specific details.
      scan: resilver in progress since Tue Dec 11 08:49:57 2012
      42.6G scanned out of 71.7G at 132M/s, 0h3m to go
      42.6G resilvered, 59.44% done
      config:

      NAME STATE READ WRITE CKSUM
      rpool DEGRADED 0 0 0
      mirror-0 DEGRADED 0 0 0
      c0t5000CCA012C8323Cd0 ONLINE 0 0 0
      c0t5000C500438124F3d0 DEGRADED 0 0 0 (resilvering)

      5. When resilvering is complete, check that you can boot from the new disk.
      You will need to boot the new disk specifically from either a SPARC boot PROM
      or an x86 BIOS.

      # zpool status
      pool: rpool
      state: ONLINE
      scan: resilvered 71.7G in 0h8m with 0 errors on Tue Dec 11 08:58:45 2012
      config:

      NAME STATE READ WRITE CKSUM
      rpool ONLINE 0 0 0
      mirror-0 ONLINE 0 0 0
      c0t5000CCA012C8323Cd0 ONLINE 0 0 0
      c0t5000C500438124F3d0 ONLINE 0 0 0


      6. If you can boot successfully from the new disk, detach the old disk.

      # zpool detach rpool c0t5000CCA012C8323Cd0

      Confirm your BE info is intact.

      # beadm list
      BE Active Mountpoint Space Policy Created
      -- ------ ---------- ----- ------ -------
      s11u1_24b NR / 4.03G static 2012-12-05 10:24
      s11u1_backup - - 172.0K static 2012-12-11 08:46


      7. If the new disk is larger than the existing disk, you will need to do one of the following
      to see the expanded pool space.

      # zpool set autoexpand=on rpool
      # zpool online -e rpool c0t5000C500438124F3d0

      8. Set the SPARC boot PROM or the x86 BIOS to boot from the new disk.