change mirrored rpool into rpool and dpool

there were discussion on change the mirrored rpool to two zpool: rpool and dpool
on the ZFS  troubleshoot guide list some methods based on snap

this blog present another simple method that is based on live upgrade (tested on s10u10)
problem: two hdd c0t0d0 and c0t1d0 as mirrored rpool, user want to split the rpool into two zpool: rpool and dpool

  1. zpool split rpool rpool2 c0t1d0s0
  2. zpool destroy rpool2
  3. partition c0t1d0s0 into two slice c0t1d0s0 and c0t1d0s1
  4. zpool create -f rpool2 c0t1d0s0
  5. lucreate -c c0t0d0s0 -n c0t1d0s0 -p rpool2
  6. luactivate c0t1d0s0
  7. init 6
  8. you have two BE c0t0d0s0 and c0t1d0s0 and new root pool is rpool2

if everything is ok

  1. ludelete  -f  c0t0d0s0
  2. zpool destroy -f rpool
  3. partition c0t0d0s0 into two slice c0t0d0s0 and c0t0d0s1 (or use VTOC)
  4. zpool create -f rpool c0t0d0s0
  5. lucreate -n ct0d0s0 -p rpool
  6. luactivate c0t0d0s0
  7. init 6

if everything is ok

  1. ludelete   -f c0t1d0s0
  2. zpool destroy rpool2
  3. zpool attach -f rpool c0t0d0s0 c0t1d0s0 
  4. zpool create -f  dpool mirror  c0t0d0s1 c0t1d0s1

now you have two mirrored rpool and dpool

About laotsao 老曹

HopBit GridComputing LLC Rockscluster Gridengine Solaris Zone, Solaris Cluster, OVM SPARC/Ldom Exadata, SPARC SuperCluster
This entry was posted in Solaris, ZFS. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s