How to split a zfs/zpool mirror for backout purposes?

Hello,

I am upgrading Veritas from 5.1 to 6.0.1/6.0.5 in a Solaris 10 u8 server with OS mirrored (rpool) in zfs/zpool configuration.

I need to split it to have a quick way to backout in case of failure (make splitted mirror side bootable for a quick revert, like booting from it). I remember that I did that in SVM or when OS drive was encapsulated in VxVM, but don't know how to do it in zfs/zpool.

Please your assistance.

$ zpool list
NAME    SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
rpool   136G  83.4G  52.6G    61%  ONLINE  -
$
$ zpool status
  pool: rpool
 state: ONLINE
 scrub: none requested
config:

        NAME          STATE     READ WRITE CKSUM
        rpool         ONLINE       0     0     0
          mirror      ONLINE       0     0     0
            c0t0d0s0  ONLINE       0     0     0
            c0t1d0s0  ONLINE       0     0     0

errors: No known data errors

assuming you did

zpool attach

instead of

zpool add

it should just be a matter of doing

zpool detach

.

Is it necessary to install a boot block prior detach or is it copied during the attach process (sync)?

I've successfully booted from it just by recreating the zpool from the detached volume. it's already got the boot block in it because it was part of the root pool.

---------- Post updated at 09:44 AM ---------- Previous update was at 09:40 AM ----------

so the basic procedure here is to detach the second volume. proceed with your patching and then if you want to recover, destroy the zpool with the remaining volume, and do a zpool import to rebuild the zpool from the detached volume.

If you reattach it... it will sync the bad data over the good. Which isn't really what you want unless you intend to destroy the reserved copy.