Friday, January 6, 2012

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

No comments:

Post a Comment